query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Update total base amount field
Обновить поле общая базовая сумма
protected function modifyTotalBaseAmount(SchemaSetupInterface $setup) { $connection = $setup->getConnection(); $connection->modifyColumn( $setup->getTable('mageworx_multifees_fee'), 'total_base_amount', [ 'type' => Table::TYPE_DECIMAL, 'scale' => '2', 'precision' => '10' ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_total()\n {\n $this->db->begin();\n\n // Clean parameters\n if (empty($this->total_localtax1)) $this->total_localtax1=0;\n if (empty($this->total_localtax2)) $this->total_localtax2=0;\n\n // Mise a jour ligne en base\n $sql = \"UPDATE \".MAIN_DB_PREFIX.\"repairdet SET\";\n $sql.= \" total_ht='\".price2num($this->total_ht).\"'\";\n $sql.= \",total_tva='\".price2num($this->total_tva).\"'\";\n $sql.= \",total_localtax1='\".price2num($this->total_localtax1).\"'\";\n $sql.= \",total_localtax2='\".price2num($this->total_localtax2).\"'\";\n $sql.= \",total_ttc='\".price2num($this->total_ttc).\"'\";\n $sql.= \" WHERE rowid = \".$this->rowid;\n\n dol_syslog(\"RepairLine::update_total sql=$sql\");\n\n $resql=$this->db->query($sql);\n if ($resql)\n {\n $this->db->commit();\n return 1;\n }\n else\n {\n $this->error=$this->db->error();\n dol_syslog(\"RepairLine::update_total Error \".$this->error, LOG_ERR);\n $this->db->rollback();\n return -2;\n }\n }", "public function setBase($total);", "public function updateTotalSum(): void\n {\n $this->update([\n 'total_without_vat' => $this->items->sum('total_without_vat'),\n 'total_with_vat' => $this->items->sum('total_with_vat'),\n ]);\n }", "public function updateTotal()\n {\n $this->updateRequested = true;\n $this->saveState();\n }", "function updateAmount()\n\t{\n\t\tglobal $conf;\n\n\t\t$this->errno = 0;\n\t\t$this->db->begin();\n\t\t$total = 0;\n\t\t$nb = 0;\n\t\t$sql = \"SELECT amount \";\n\t\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"bank\";\n\t\t$sql.= \" WHERE fk_bordereau = \".$this->id;\n\n\t\t$resql = $this->db->query($sql);\n\t\tif ( $resql )\n\t\t{\n\t\t\twhile ( $row = $this->db->fetch_row($resql) )\n\t\t\t{\n\t\t\t\t$total += $row[0];\n\t\t\t\t$nb++;\n\t\t\t}\n\n\t\t\t$this->db->free($resql);\n\n\t\t\t$sql = \"UPDATE \".MAIN_DB_PREFIX.\"bordereau_cheque\";\n\t\t\t$sql.= \" SET amount = '\".price2num($total).\"'\";\n\t\t\t$sql.= \", nbcheque = \".$nb;\n\t\t\t$sql.= \" WHERE rowid = \".$this->id;\n\t\t\t$sql.= \" AND entity = \".$conf->entity;\n\n\t\t\t$resql = $this->db->query($sql);\n\t\t\tif (!$resql)\n\t\t\t{\n\t\t\t\t$this->errno = -1030;\n\t\t\t\tdol_syslog(get_class($this).\"::updateAmount ERREUR UPDATE ($this->errno)\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->errno = -1031;\n\t\t\tdol_syslog(get_class($this).\"::updateAmount ERREUR SELECT ($this->errno)\");\n\t\t}\n\n\t\tif ($this->errno === 0)\n\t\t{\n\t\t\t$this->db->commit();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->rollback();\n\t\t\tdol_syslog(get_class($this).\"::updateAmount ROLLBACK ($this->errno)\");\n\t\t}\n\n\t\treturn $this->errno;\n\t}", "public function setBaseRowTotal($baseRowTotal);", "public function getBaseAmount()\n {\n return $this->baseAmount;\n }", "public function set_vat_base_total( $vat_base_total ) {\n\t\t$this->vat_base_total = $vat_base_total;\n\t}", "public function setGross($baseTotal);", "public function addActual($amount)\r\n {\r\n $this->stock_bal = $this->stock_bal + $amount;\r\n\r\n $sql = 'UPDATE stock_accounts SET stock_bal = '.$this->stock_bal.' WHERE account_id = '.$this->account_no;\r\n DatabaseHandler::Execute($sql);\r\n \r\n //return $amount; or balance\r\n\r\n }", "public function updateTotalBillToPaymentsSection(){\n \t$totalAmount=0;\n \t$pos=session()->get('pos');\n foreach($pos as $id=>$productAttribute){\n $totalAmount += $productAttribute['price']*$productAttribute['quantity'];\n }\n $this->emit('totalAmountEvent', $totalAmount);\n }", "public function getTotalAmount();", "function calcular_total(){\r\n\t\t//$this->total = round($this->total, 2);\r\n\t}", "public function get_vat_base_total() {\n\t\treturn $this->vat_base_total;\n\t}", "public function setTotalBillAmountAttribute($input)\n {\n $this->attributes['total_bill_amount'] = $input ? $input : null;\n }", "public function addToTotal($amount) {\n $this->total = $this->getTotal() + $amount;\n }", "public function set_total($value)\n {\n }", "private function updateTotal()\n {\n $pubNub = $this->client->getTotal();\n\n if (! isset($pubNub[0][0])) {\n return true;\n }\n\n $total = Total::orderBy('id', 'desc')->first();\n $total->raised = $pubNub[0][0]->stats->rawtotal;\n $total->save();\n\n event(new TotalWasChanged($total));\n }", "public function base_price_subtotal()\n\t{\n\t\treturn $this->core->round($this->base_price()) * $this->quantity();\n\t}", "public function testUpdateAdditionalCost()\n {\n }", "public function setTotalAttribute($input)\n {\n $this->attributes['total'] = $input ? $input : null;\n }", "public function setRowTotal($amount);", "protected function setAmount($value){\r\n }", "public function calculateAmount();", "public function updateTotal(&$total, Reservation $reservation) {}", "public function amount(){\r\n\t\t\t\r\n\t\t}", "public function legacy_set_total($amount, $total_type = 'total')\n {\n }", "public function setUpdatedAmount($amount){\n $this->response[\"result\"][\"payload\"][\"amount\"] = strval($amount * 100);\n }", "protected function updateBaseAmountPaidOnlineTotal($invoice)\n {\n if ($invoice instanceof Invoice) {\n $invoice->pay();\n $totals = $this->collectTotalAmounts($this->getOrder(), ['base_grand_total']);\n $this->setBaseAmountPaidOnline($totals['base_grand_total']);\n $this->getOrder()->addRelatedObject($invoice);\n }\n }", "public function calculateAmount()\n {\n $amount = 0;\n\n if ($this->insurance == 'True')\n $amount += INSURANCE_PRICE;\n\n foreach ($this->persons as $person)\n {\n if ($person->age <= 12)\n $amount += CHILD_PRICE;\n else\n $amount += ADULT_PRICE;\n }\n\n $this->price = $amount;\n }", "public function getDepositTotal(): float;", "abstract public function setBaseValue(float $amount, string $unit): void;", "function _update_total()\r\n\t{\r\n\t\t$this->itemcount = 0;\r\n\t\t$this->vendor_box_count = array();\r\n\t\t$this->vendor_box_total = array();\r\n\t\t$this->vendor_total = array();\r\n\t\tif(sizeof($this->items > 0))\r\n\t\t{\r\n\t\t\tforeach($this->items as $item)\r\n\t\t\t{\r\n\t\t\t\t$this->vendor_total[$this->vendorguid[$item]] += $this->itemprices[$item] * $this->itemqtys[$item];\r\n\t\t\t\t$this->itemcount += $this->itemqtys[$item];\r\n\t\t\t\t\r\n\t\t\t\t$flag = floor($this->itemqtys[$item]/$this->iteminbox[$item]);\r\n\t\t\t\t$boxs = $this->itemqtys[$item]%$this->iteminbox[$item]?$flag+1:$flag;\r\n\t\t\t\t\r\n\t\t\t\t$this->vendor_box_count[$this->vendorguid[$item]] += $boxs * $this->boxqtys[$item];\r\n\t\t\t $this->vendor_box_total[$this->vendorguid[$item]] += $boxs * $this->boxqtys[$item] * $this->boxunitprices[$item];\r\n\t\t\t}\r\n\t\t\t$MINIGUID = '68231310-4DD4-4006-9F3B-B3021C17FD46';\r\n\t\t\t$vendorarr = $this->get_vendorsguid();\r\n\r\n\t\t\tif(count($vendorarr)==1 && in_array($MINIGUID, $vendorarr))\r\n\t\t\t{\r\n\t\t\t\t$this->set_freight($MINIGUID, 8);\r\n\t\t\t\t$this->set_distance($MINIGUID, 0);\r\n\t\t\t}else if(in_array($MINIGUID, $vendorarr))\r\n\t\t\t{\r\n\t\t\t\t$this->set_freight($MINIGUID, 0);\r\n\t\t\t\t$this->set_distance($MINIGUID, 0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function setTotalPrice($totalPrice);", "public function processTotal()\n {\n $sId = $this->getEditObjectId();\n\n /** @var oxOrder $oOrder */\n $oOrder = $this->getOrderFactory()->create();\n if (!$oOrder->load($sId)) {\n return;\n }\n\n $type = $this->getConfig()->getRequestParameter('actionType');\n $total = $this->getOrderTransactionHelper()->getTotal($oOrder);\n\n //Send request (ship, cancel, refund) to api\n $response = $this->getManager($type)->processAmount($oOrder, $total);\n if (isset($response['error'])) {\n $this->_aViewData['formError'][$type] = $response['error'];\n }\n }", "function updateTotalBill($id, $total){\r\n\r\n\t\t$conn = getConnection();\r\n\r\n\t\t$stmt = $conn->prepare('UPDATE booking SET totalAmount= ? WHERE idreservations= ?');\r\n\t\t$stmt->bind_param(\"ii\", $total, $id);\r\n\r\n\t\t$ret = $stmt->execute();\r\n\t\t$conn->close();\r\n\r\n\t\treturn $ret;\r\n\r\n\t}", "public function updateTotalNetPrice()\n {\n if (!$this->getItems()) {\n return;\n }\n\n $totalNetPrice = 0;\n /** @var Item $item */\n foreach ($this->getItems() as $item) {\n if (!$item->isRecurringPrice()) {\n $totalNetPrice += $item->getTotalNetPrice();\n }\n }\n\n $totalNetPrice += self::getNetShippingCosts();\n\n $this->setTotalNetPrice($totalNetPrice);\n }", "public function calculateAdjustmentsTotal();", "public function SaveTotal() {\n $this->sumTotal += $this->sumThrow;\n }", "public function updated(BudgetPart $budget_part)\n {\n\t $budget_part->budget->insertInputValues([\n\t \t'value_total' => $budget_part->getFinalValue()\n\t ]);\n }", "protected function _initTotals()\n {\n\t\t\n$id =$this->getSource()->getQuoteId();\n$fee = 0;\n\tif(is_numeric($id) && $id > 0) {\n\t\t $resource = Mage::getSingleton('core/resource');\n\t\t$readConnection = $resource->getConnection('core_read');\n\t\t$table = $resource->getTableName('sales/quote_address');\n\t\t$query = 'SELECT beezup_fee FROM ' . $table . ' WHERE quote_id = '.$id.' and address_type = \\'shipping\\' LIMIT 1';\t \n\t\t$fee = $readConnection->fetchOne($query);\n\t}\n\t parent::_initTotals();\n \n \n if ($fee>0) {\n $this->addTotalBefore(new Varien_Object(array(\n 'code' => 'turnkeye_insurance',\n 'value' => $fee,\n 'base_value'=> $fee,\n 'label' => 'Frais de Gestion Cdiscount',\n ), array('shipping', 'tax')));\n }\n\t\t $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid() +$fee,\n 'base_value'=> $this->getSource()->getBaseTotalPaid() + $fee,\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n\t\t\n\t\t $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal() +$fee,\n 'base_value'=> $this->getSource()->getBaseGrandTotal() +$fee,\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\t\t\n // $this->setGrandTotal($this->getGrandTotal() + 20);\n return $this;\n }", "public function get_fee_total()\n {\n }", "public function total($value)\n {\n $this->total = $value;\n }", "public function getTotal_amount()\n {\n return $this->total_amount;\n }", "public function getBaseDiscountAmount();", "public function addTotal($total){\n $this->update([\n 'total' => $total,\n ]);\n }", "function it_exchange_easy_eu_value_added_taxes_addon_taxes_modify_total( $total ) {\n\t$tax_session = it_exchange_get_session_data( 'addon_easy_eu_value_added_taxes' );\n\n\t//error_log(print_r($tax_session,true));\n\n\tif( empty( $tax_session['summary_only'] ) ) {\n\t\t$total += it_exchange_easy_eu_value_added_taxes_addon_get_total_taxes_for_cart( false );\n\t}\n\treturn $total;\n}", "protected function updateData()\n {\n ArticleCategory::updateTotal();\n }", "function update_amounts($value, $key){\n global $data_set;\n $data_set[$key]->amount += $value;\n }", "public function taxed_base_price_subtotal()\n\t{\n\t\treturn $this->core->round( $this->base_tax() + $this->base_price() ) * $this->quantity();\n\t}", "public function setTotalCostsAttribute($input)\n {\n $this->attributes['total_costs'] = $this->attributes['depreciation']+$this->attributes['insurance']+$this->attributes['license']+$this->attributes['repair_maintenance']+$this->attributes['oil']+$this->attributes['tyre']+$this->attributes['contigency_factor'];\n }", "public function get_amount(){\n\t\treturn $this->get_total();\n\t}", "protected function calculate_fee_totals()\n {\n }", "public function actualizarTotalCompra(int $idCompra, int $totalActualizar){\n\n \n $this->db->where('id', $idCompra);\n\n $data = array( \n\n 'total'=> $totalActualizar\n \n \n );\n \n $this->db->update('compras',$data);\n\n }", "protected function calculateTotals()\n {\n $this->attributes['subtotal'] = $this->quantity * $this->price;\n\n $taxFactor = optional($this->taxes)->sum('percentage_decimal') ?? 0;\n\n $tax = $this->is_before_tax\n ? $this->subtotal * $taxFactor\n : $this->subtotal / (1 + $taxFactor) * $taxFactor;\n\n $this->attributes['tax_amount'] = round($tax);\n\n if ($this->is_before_tax) {\n $this->attributes['total'] = $this->subtotal + $this->tax_amount;\n } else {\n $this->attributes['total'] = $this->subtotal;\n }\n }", "public function Deposit($amount) {\r\n $this->_floBal += $amount;\r\n }", "public function recalculateActual()\n {\n $this->totalActual = $this->totalEarned - $this->totalWithdrawed;\n }", "public function set_subtotal($value)\n {\n }", "public function getTotalAmount()\r\n {\r\n return $this->totalAmount;\r\n }", "function prixTotal(){\n $total=0;\n for($i=0,$il=count($this->itemList);$i<$il;$i++){\n $this->total += $this->itemList[$i]->prix;\n }\n return $this->total; // return le total de la commande (prix)\n }", "public function getTotalAmount()\n {\n return $this->total_amount;\n }", "public function getTotalAmount()\n {\n return $this->total_amount;\n }", "public function updateTotalPaid(OrderInterface $order);", "public function getPaymorrowTotalAmount()\n {\n }", "public function getPendingTotal(): float;", "public function total()\n {\n if (isset($this->starting_balance)) {\n $startingBalance = $this->starting_balance;\n } else {\n $startingBalance = 0;\n }\n\n return $this->billable->formatCurrency(max(0, $this->total - $startingBalance));\n }", "public function total(){\n if($this->added>0){\n $this->recalculate();\n }\n\n return number_format($this->data['total'],2);\n }", "private function setAdjustmentAmount()\n {\n foreach ($this->invoice->payments as $payment) {\n $this->adjustment_amount += $payment->paymentables\n ->where('paymentable_type', '=', 'invoices')\n ->where('paymentable_id', $this->invoice->id)\n ->sum(DB::raw('amount'));\n }\n\n\n $this->total_payments = $this->invoice->payments->sum('amount');\n\n return $this;\n }", "public function get_subtotal()\n {\n }", "public function change_amount(){\n $this->is_ajax();\n //CHANGE IN RECORDS DB\n $this->fez->mongo->set(array('items.$.start_amount'=>(int)$_POST['start_amount']))\n ->in('records')\n ->where(array('items.item_id'=>$_POST['item_id']))\n ->go();\n //UPDATE PERIOD DATA\n $p_data = $this->build_period_data($_POST['item_id'],(int)$_POST['start_amount']);\n //PUSH TO PERIOD DATA\n $res = $this->fez->mongo->set(array('items.$.period'=>$p_data))\n ->into('records')\n ->where(array('items.item_id'=>$_POST['item_id']))\n ->go();\n //UPDATE ITEMS DB\n $this->fez->mongo->set(array('start_amount'=>(int)$_POST['start_amount'],'current_owed'=>(int)$_POST['start_amount']))\n ->in('items')\n ->where(array('item_id'=>$_POST['item_id'],'period'=>date('M-y',time())))\n ->go();\n //UPDATE COMMITS DB\n $this->fez->mongo->set(array('owed'=>(int)$_POST['start_amount']))\n ->in('commits')\n ->options(array('multiple'=>true))\n ->where(array('item_id'=>$_POST['item_id'],'period'=>date('M-y',time())))\n ->go();\n\n $this->ret = $res;\n $this->end_call();\n }", "public function setPrixTotal(): self\n\n {\n $this->prixTotal = 0;\n $billets = $this->getBillets()->toArray();\n foreach ($billets as $billet) {\n $this->prixTotal += $billet->getPrix();\n }\n if ($this->demiJournee === true) {\n $this->prixTotal = $this->prixTotal / 2;\n }\n return $this;\n }", "public function setBaseCustomPrice($baseCustomPrice);", "public function calcularTotal() {\n $total = 0;\n foreach ($this->lineadeDocumento as $linea) {\n $total += $linea->getPrecioT();\n }\n $this->total = $total;\n }", "public function setTotal(int $value) { return $this->set('total', $value); }", "public function getAmountTotal()\n {\n return $this->getIfSet('total', $this->data->amount);\n }", "public function setAmount($value) \n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return;\n }", "public function setTotalAmount($value)\n {\n return $this->setPrice($value);\n }", "public static function total() {\n /* Calcolo Totale considerando: IVA, Spedizione, Coupon e sconti vari */\n if( WPXSmartShop::settings()->product_price_includes_vat() ) {\n self::$vatValue = 0;\n } else {\n self::$vatValue = floatval( self::$subtotal * self::$vatPercentage / 100 );\n }\n\n /**\n * @filters\n *\n * @param float $shipping Valore della spedizione\n */\n self::$totalShipping = floatval( apply_filters( 'wpss_summary_order_shipping', self::$shipping ) );\n\n /**\n * @filters\n *\n * @param float $discount Sconto sull'ordine. Default 0\n */\n self::$discount = floatval( apply_filters( 'wpss_summary_order_discount', 0 ) );\n self::$coupon = self::applyOrderCoupon( self::$subtotal );\n self::$total = self::$subtotal + self::$vatValue + self::$shipping - self::$discount - self::$coupon;\n\n WPXSmartShopSession::orderAmount( self::$total );\n WPXSmartShopSession::orderShipping( self::$totalShipping );\n }", "protected function set_total($key, $total)\n {\n }", "public function set_amount($value)\n {\n }", "public function total() {\n }", "protected function totalAmount() : int\n {\n return $this->preCheckoutQuery()->getTotalAmount();\n }", "public function UpdateTotalTransaccion($id)\n {\n $Resumen = Transaccion::getTotalDetalleCuentas($id);\n $Transaction = Transaccion::findOrFail($id);\n $Transaction->monto = $Resumen[0]['sumventa']-$Resumen[0]['sumcobro'];\n $Transaction->save();\n }", "public\n function setBaseAmount(ContractFan $cf)\n {\n $cf->setAmount($cf->getAmountWithoutReduction());\n }", "public function leadorder_change_paymenttotal() {\n if ($this->isAjax()) {\n $mdata=array();\n $error=$this->restore_orderdata_error;\n $postdata=$this->input->post();\n $ordersession=(isset($postdata['ordersession']) ? $postdata['ordersession'] : 0);\n $leadorder=usersession($ordersession);\n if (!empty($leadorder)) {\n $this->load->model('leadorder_model');\n $res=$this->leadorder_model->change_neworder_payment($leadorder, $ordersession);\n $error=$res['msg'];\n if ($res['result']==$this->success_result) {\n $error='';\n }\n }\n $this->ajaxResponse($mdata, $error);\n }\n show_404();\n }", "public function update_users_total_balance( $user_id = NULL, $amount = 0, $point_type = NULL ) {\n\n\t\t\tif ( ! MYCRED_ENABLE_TOTAL_BALANCE || ! MYCRED_ENABLE_LOGGING || $amount == 0 ) return $amount;\n\n\t\t\tglobal $mycred_current_account;\n\n\t\t\tif ( mycred_is_current_account( $user_id ) && $mycred_current_account->balance[ $point_type ] !== false )\n\t\t\t\t$total_balance = $mycred_current_account->balance[ $point_type ]->get( 'accumulated' );\n\n\t\t\telse {\n\n\t\t\t\t$total_balance = mycred_get_user_meta( $user_id, $point_type, '_total', true );\n\t\t\t\t$total_balance = $this->number( $total_balance );\n\n\t\t\t}\n\n\t\t\t$total_balance += $amount;\n\n\t\t\tmycred_update_user_meta( $user_id, $point_type, '_total', $total_balance );\n\n\t\t\tif ( mycred_is_current_account( $user_id ) && $mycred_current_account->balance[ $point_type ] !== false )\n\t\t\t\t$mycred_current_account->balance[ $point_type ]->set( 'accumulated', $total_balance );\n\n\t\t\tdo_action( 'mycred_update_user_total_balance', $total_balance, $user_id, $point_type, $this );\n\n\t\t\treturn $total_balance;\n\n\t\t}", "public function getBaseFee()\n {\n return $this->baseFee;\n }", "public function setTotal($total)\n {\n $this->_total = $total;\n }", "private function updateTotal() : void\n {\n $this->playerScore += $this->player->score();\n $this->computerScore += $this->computer->score();\n $this->roundFinished = true;\n }", "public function setBaseOriginalPrice($baseOriginalPrice);", "protected function get_object_subtotal()\n {\n }", "public function setBaseDiscountAmount($baseDiscountAmount);", "public function getTotalTaxAmount();", "public function calculate_totals()\n {\n }", "function setTotalValue( $value )\r\n {\r\n $this->TotalValue = $value;\r\n setType( $this->TotalValue, \"integer\" );\r\n }", "public function setAmount($anount);", "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n $this->Subtotal = $this->Item()->BuyPrice * $this->Jumlah;\n }", "public function updateTempoTotal(ConnectionInterface $con)\n {\n $this->setTempoTotal($this->computeTempoTotal($con));\n $this->save($con);\n }", "protected function _setTotal($total = 0)\n {\n $this->_total = $total;\n }", "public function getTotalAmount() {\n return $this->totalAmount;\n }" ]
[ "0.7262133", "0.72245413", "0.72189045", "0.7164421", "0.6907943", "0.6829281", "0.6632279", "0.6600816", "0.65419745", "0.6523537", "0.6453955", "0.64459115", "0.640016", "0.6398767", "0.6378414", "0.6365927", "0.6319248", "0.63013184", "0.6274099", "0.6271505", "0.6269284", "0.6242099", "0.62294877", "0.61958116", "0.6193444", "0.61929166", "0.6182552", "0.617921", "0.61712015", "0.61697125", "0.6151201", "0.6147679", "0.613136", "0.6125803", "0.61216986", "0.6119787", "0.6103564", "0.609258", "0.6085552", "0.6080717", "0.60701346", "0.60635227", "0.6061902", "0.6059601", "0.60531306", "0.60486513", "0.60369635", "0.60367376", "0.6017201", "0.60111153", "0.60107756", "0.60032684", "0.59992135", "0.5995324", "0.59799606", "0.59742403", "0.5973336", "0.5962402", "0.5961836", "0.5952456", "0.5946059", "0.5946059", "0.5941688", "0.5918615", "0.5917193", "0.59155643", "0.59126776", "0.589972", "0.58891165", "0.5881344", "0.58745015", "0.58597404", "0.58579445", "0.58465713", "0.58462733", "0.5844438", "0.5842444", "0.58403134", "0.58356005", "0.5833444", "0.582917", "0.58245957", "0.5824484", "0.58243763", "0.5824268", "0.58155525", "0.5812268", "0.5804523", "0.58038455", "0.57969576", "0.5795366", "0.5794936", "0.57869", "0.5783459", "0.57832", "0.5780711", "0.5774316", "0.57721967", "0.57704973", "0.5763707" ]
0.7496829
0
Adds form elements for the "language" plugin to the rule configuration form.
Добавляет элементы формы для плагина "language" в форму настройки правила.
function menu_position_menu_position_rule_language_form(&$form, &$form_state) { // If this is an existing rule, load the variables stored in the rule for this plugin. $variables = !empty($form_state['#menu-position-rule']->conditions['language']) ? $form_state['#menu-position-rule']->conditions['language'] : array(); $form['conditions']['language'] = array( '#type' => 'fieldset', '#title' => t('Language'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#attached' => array( 'js' => array(drupal_get_path('module', 'menu_position') . '/plugins/menu_position.language.js'), ), ); $form['conditions']['language']['language'] = array( '#type' => 'select', '#title' => t('Language'), '#options' => array('' => t('Any language')) + locale_language_list(), '#default_value' => !empty($variables['language']) ? $variables['language'] : '', '#description' => t("Apply this rule only when the language matches the current page's language."), '#weight' => -20, ); // Add a submit handler. $form['#submit'][] = 'menu_position_menu_position_rule_language_form_submit'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menu_position_menu_position_rule_language_form_submit(&$form, &$form_state) {\n // Check if the user has added our plugin's form elements as a condition for\n // the rule.\n if (!empty($form_state['values']['language'])) {\n // Add this plugin's variables to the rule.\n $variables = array(\n 'language' => $form_state['values']['language'],\n );\n $form_state['values']['conditions']['language'] = $variables;\n }\n}", "function culturefeed_entry_ui_attach_language_elements(&$form, $i, $info = NULL) {\n if ($info[0] == 'spoken') {\n $medium = 1;\n }\n else {\n if ($info[0] == 'dubbed') {\n $medium = 2;\n }\n else {\n if ($info[0] == 'subtitles') {\n $medium = 3;\n }\n else {\n $medium = 0;\n }\n }\n }\n\n if ($info[1] == 'Engels') {\n $lang = 1;\n }\n else {\n if ($info[1] == 'Spaans') {\n $lang = 2;\n }\n else {\n if ($info[1] == 'Nederlands') {\n $lang = 3;\n }\n else {\n if ($info[1] == 'Duits') {\n $lang = 4;\n }\n else {\n if ($info[1] == 'Frans') {\n $lang = 5;\n }\n else {\n $lang = 0;\n }\n }\n }\n }\n }\n\n $form['extra']['language']['wrapper'][$i] = array(\n '#type' => 'container',\n '#tree' => TRUE,\n '#prefix' => '<div class=\"language-item-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['extra']['language']['wrapper'][$i]['spoken_language'] = array(\n '#type' => 'select',\n '#title' => t('Language'),\n '#options' => array(\n 0 => '',\n 1 => t('Spoken'),\n 2 => t('Dubbed'),\n 3 => t('Subtitled'),\n ),\n '#default_value' => $medium,\n );\n\n $form['extra']['language']['wrapper'][$i]['in_language'] = array(\n '#type' => 'select',\n '#title' => t('in'),\n '#options' => array(\n 0 => '',\n 1 => t('English'),\n //2 => t('Spanish'),\n 3 => t('Dutch'),\n 4 => t('German'),\n 5 => t('French'),\n ),\n '#default_value' => $lang,\n );\n}", "function islandora_multilingual_admin_form($form, &$form_state) {\n $form = array();\n $form['islandora_multilingual_languages_setup'] = array(\n '#type' => 'tabfield',\n '#title' => t('Enabled Languages'),\n );\n $form['islandora_multilingual_languages_setup']['islandora_languages'] = array(\n '#type' => 'textfield',\n '#title' => t('Languages'),\n '#description' => t('Select languages in which documents may appear'),\n '#size' => 40,\n '#default_value' => variable_get('islandora_languages', 'EN,ES,FR'),\n );\n return system_settings_form($form);\n}", "private function add_plugin_form_elements() {\n $this->unilabeltype->add_form_fragment($this, $this->context);\n }", "protected function getConfigForm()\n {\n $languages_list = Language::getLanguages(false);\n $languages_array= array();\n foreach ($languages_list as $lang){\n $languages_array[] = array( 'id_lang' => $lang['id_lang'], 'name' => $lang['name'] );\n }\n\n $feature_list = Feature::getFeatures($this->selected_language_id, false);\n $features_array= array();\n foreach ($feature_list as $feature) {\n $features_array[] = array('id_feature' => $feature['id_feature'], 'name_feature' => $feature['name'],\n 'name_id_feature' => $feature['id_feature'].\" - \".$feature['name']);\n }\n\n $form_fields[]['form'] = array(\n 'legend' => array(\n 'title' => $this->l('Language'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'select',\n 'name' => 'FEATURE_GROUPS_LANG',\n 'label' => $this->l('Language'),\n 'desc' => $this->l('Choose a language'),\n 'options' => array(\n 'query' => $languages_list,\n 'id' => 'id_lang',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'hidden',\n 'name' => 'ignore_changes',\n 'id' => 'ignore_changes',\n )\n )\n );\n $form_fields[]['form'] = array(\n 'legend' => array(\n 'title' => $this->l('Feature & Group'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'select',\n 'name' => 'FEATURE_GROUPS_FEATURE',\n 'label' => $this->l('Feature'),\n 'desc' => $this->l('Choose a feature'),\n 'options' => array(\n 'query' => $features_array,\n 'id' => 'id_feature',\n 'name' => 'name_id_feature'\n )\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'name' => 'FEATURE_GROUPS_GROUP',\n 'prefix' => '<i class=\"icon icon-sitemap\"></i>',\n 'label' => $this->l('Group'),\n 'desc' => $this->l('Choose a name for the group')\n ),\n array(\n 'name' => 'FEATURE_GROUPS_FEATURE_IMAGE',\n 'type' => 'file',\n 'label' => $this->l(\"Feature's Image\"),\n 'path' => $this->_path,\n 'imagesExtensions' => array( 'jpg','gif','png' ),\n 'display_image' => true\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n );\n $form_fields[]['form'] = array(\n 'legend' => array(\n 'title' => $this->l('Unassigned Group'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 3,\n 'type' => 'text',\n 'name' => 'FEATURE_GROUPS_UNASSIGNED_GROUPS',\n 'label' => $this->l('Unassigned Group'),\n 'desc' => $this->l('Choose a name for the unassigned group')\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n );\n\n return $form_fields;\n }", "public function loadConfigForm(sfEvent $event)\n {\n $form = $event->getSubject();\n\n if (sfSympalConfig::isI18nEnabled())\n {\n $cultures = sfCultureInfo::getCultures(sfCultureInfo::NEUTRAL);\n $languages = array();\n foreach ($cultures as $key => $value)\n {\n $formatted = format_language($value);\n if (!$formatted)\n {\n $formatted = format_language($value, 'en');\n }\n if ($formatted)\n {\n $languages[$value] = $formatted;\n }\n }\n asort($languages);\n $widget = new sfWidgetFormChoice(array('multiple' => true, 'choices' => $languages));\n $validator = new sfValidatorChoice(array('multiple' => true, 'choices' => array_keys($languages)));\n $form->addSetting(null, 'language_codes', 'Available Cultures', $widget, $validator);\n\n $languageForm = new sfFormLanguage(\n sfContext::getInstance()->getUser(), \n array('languages' => sfSympalConfig::getLanguageCodes())\n );\n $widgetSchema = $languageForm->getWidgetSchema();\n $validatorSchema = $languageForm->getValidatorSchema();\n\n $form->addSetting(null, 'default_culture', 'Default Culture', $widgetSchema['language'], $validatorSchema['language']);\n }\n\n $form->addSetting(null, 'default_rendering_module', 'Default Rendering Module');\n $form->addSetting(null, 'default_rendering_action', 'Default Rendering Action');\n $form->addSetting(null, 'breadcrumbs_separator', 'Breadcrumbs Separator');\n $form->addSetting(null, 'elastic_textareas', 'Elastic Textareas', 'InputCheckbox', 'Boolean');\n $form->addSetting(null, 'check_for_upgrades_on_dashboard', 'Check for Upgrades', 'InputCheckbox', 'Boolean');\n\n $form->addSetting('page_cache', 'enabled', 'Enabled?', 'InputCheckbox', 'Boolean');\n\n $form->addSetting('page_cache', 'super', 'Enable Super Cache?', 'InputCheckbox', 'Boolean');\n $form->addSetting('page_cache', 'with_layout', 'With layout?', 'InputCheckbox', 'Boolean');\n $form->addSetting('page_cache', 'lifetime', 'Lifetime');\n }", "protected function form()\n {\n\n\n return Form::make(new LanguageConfig(), function (Form $form) {\n\n $form->radio('type')->options(LanguageConfigType::asSelectArray())->required();\n\n $form->text('name')->required();\n\n $form->isCreating() ? $form->text('slug')->required()->help(\"会自动转为大写\") : $form->hidden('slug');\n\n $form->text('group', '分组')->options(\\App\\Models\\LanguageConfig::AllGroup())->required()->help(\"方便使用分组查询\");\n $form->embeds('content', '内容', function (Form\\EmbeddedForm $form) {\n\n foreach (Language::query()->get() as $lang) {\n $form->textarea($lang->slug, $lang->name)->help(\"可以使用{0}来替换变量\")->required();\n }\n\n });\n\n $form->saving(function (Form $form) {\n $form->slug = Str::upper($form->slug);\n\n $form->slug = str_replace(\"-\", \"_\", $form->slug);\n\n });\n\n });\n }", "public function commonForm(array &$form) {\n /** @var \\Drupal\\language\\ConfigurableLanguageInterface $language */\n $language = $this->entity;\n if ($language->getId()) {\n $form['langcode_view'] = [\n '#type' => 'item',\n '#title' => $this->t('Language code'),\n '#markup' => $language->id(),\n ];\n $form['langcode'] = [\n '#type' => 'value',\n '#value' => $language->id(),\n ];\n }\n else {\n $form['langcode'] = [\n '#type' => 'textfield',\n '#title' => $this->t('Language code'),\n '#maxlength' => 12,\n '#required' => TRUE,\n '#default_value' => '',\n '#disabled' => FALSE,\n '#description' => $this->t('Use language codes as <a href=\":w3ctags\">defined by the W3C</a> for interoperability. <em>Examples: \"en\", \"en-gb\" and \"zh-hant\".</em>', [':w3ctags' => 'http://www.w3.org/International/articles/language-tags/']),\n ];\n }\n $form['label'] = [\n '#type' => 'textfield',\n '#title' => $this->t('Language name'),\n '#maxlength' => 64,\n '#default_value' => $language->label(),\n '#required' => TRUE,\n ];\n $form['direction'] = [\n '#type' => 'radios',\n '#title' => $this->t('Direction'),\n '#required' => TRUE,\n '#description' => $this->t('Direction that text in this language is presented.'),\n '#default_value' => $language->getDirection(),\n '#options' => [\n LanguageInterface::DIRECTION_LTR => $this->t('Left to right'),\n LanguageInterface::DIRECTION_RTL => $this->t('Right to left'),\n ],\n ];\n\n return $form;\n }", "function new_language_form()\n\t{\n\t\tif (!$this->admin_demo())$this->body .= \"<form action=\\\"index.php?mc=languages&page=languages_new\\\" method=\\\"post\\\">\\n\";\n\t\t$this->body .= \"<fieldset id='NewLanguage'><legend>Add New Language</legend><table cellpadding=\\\"3\\\" cellspacing=\\\"0\\\" border=\\\"0\\\" width=\\\"100%\\\">\\n\";\n\t\t//$this->title = \"Languages > Add New Language\";\n\t\t$this->description = \"Enter a name for the new language. The text entries for this new language will be populated from the \\\"Base Language\\\"\n\t\t(first in the language list). Once created you will have the ability to change the text to the new language. When you are through making\n\t\tyour changes to the new language set the new language to \\\"active\\\" using the \\\"edit\\\" link in the language list. This will make your new\n\t\tlanguage a choice for visitors browsing your site. <br><br>\n\n <b>IMPORTANT:</b> To save yourself time we recommend setting up the \\\"Base Language\\\" text to display exactly as you want it to appear before\n creating your new language with this tool.\";\n\t\t$this->body .= \"<tr class=\\\"row_color1\\\">\\n\\t<td align=\\\"right\\\" class=\\\"medium_font\\\">\\n\\t<b>Language Name: </b> \\n\\t</td>\\n\\t\";\n\t\t$this->body .= \"<td class=\\\"medium_font\\\">\\n\\t<input type=\\\"text\\\" name=\\\"c[name]\\\" value=\\\"\\\"\".$show[\"language\"].\"\\\"\\\"> \\n\\t</td>\\n</tr>\\n\";\n\t\tif (!$this->admin_demo()) $this->body .= \"<tr>\\n\\t<td colspan=\\\"2\\\" class=\\\"medium_font\\\" align=\\\"center\\\">\\n\\t<input type=\\\"submit\\\" name=\\\"auto_save\\\" value=\\\"Save\\\">\\n\\t</td>\\n</tr>\\n\";\n\t\t$this->body .= \"</table></fieldset>\\n\";\n\t\t$this->body .= \"</form>\\n\";\n\t\treturn true;\n\t}", "private function translateForm()\n {\n $formTranslation = [\n 'en_GB' => [\n 'plugin_form' => [\n 'label' => 'Tag cloud',\n ],\n 'show' => [\n 'label' => 'Display tag cloud',\n ],\n 'controller' => [\n 'label' => 'Controller selection',\n ],\n 'tagCloudClass' => [\n 'label' => 'Name of the tag class',\n ],\n 'tagCloudMax' => [\n 'label' => 'Maximum number of terms',\n ],\n 'tagCloudSplit' => [\n 'label' => 'Number of ranks',\n ],\n 'tagTime' => [\n 'label' => 'Time period (in days) considered',\n ],\n ],\n ];\n\n $this->addFormTranslations($formTranslation);\n }", "function theme_calendar_framework_languages_overview_form($form) {\n // Load helpers.\n module_load_include('inc', 'calendar_framework');\n\n $rows = array();\n $default = language_default();\n\n // Set form table rows.\n foreach ($form['name'] as $name => $element) {\n // Skip form attributes.\n if (!is_array($element) || !element_child($name)) {\n continue;\n }\n\n // Make the default language checkbox disabled.\n if ($name == $default->language) {\n $form['enabled'][$name]['#attributes']['disabled'] = 'disabled';\n }\n\n // Set form table header.\n $rows[] = array(\n array(\n 'align' => 'center',\n 'data' => drupal_render($form['enabled'][$name]),\n ),\n check_plain($name),\n '<strong>' . drupal_render($form['name'][$name]) . '</strong>',\n drupal_render($form['native'][$name]),\n drupal_render($form['direction'][$name]),\n drupal_render($form['site_default'][$name]),\n drupal_render($form['admin_language'][$name]),\n drupal_render($form['calendar_framework_languages'][$name]),\n drupal_render($form['weight'][$name]),\n l(t('edit'), 'admin/settings/language/edit/'. $name) . (($name != 'en' && $name != $default->language) ? ' ' . l(t('delete'), 'admin/settings/language/delete/' . $name) : ''),\n );\n }\n\n // Set form table header.\n $header = array(\n t('Enabled'),\n t('Code'),\n t('English name'),\n t('Native name'),\n t('Direction'),\n t('Default'),\n t('Admin'),\n t('Calendar'),\n t('Weight'),\n array('data' => t('Operations')),\n );\n\n // Remove admin_language.module options if not exist.\n if (!isset($form['admin_language'][$name])) {\n unset($header[6]);\n $rows = array_map('array_filter', $rows);\n }\n // All; a waste of time!\n // TODO: Rewrite the logic and avoid this if possible.\n if (!_calendar_framework_patch_applied()) {\n unset($header[7]);\n // Temporary dirt:\n foreach ($rows as $index => $row) {\n unset($rows[$index][7]);\n }\n }\n\n // Let it go!\n $output = theme('table', $header, $rows);\n $output .= drupal_render($form);\n return $output;\n}", "function wp_install_language_form($languages)\n{\n}", "function add_localization_options_page() {\n\tif ( function_exists( 'acf_add_options_page' ) ) {\n\t\tacf_add_options_page(\n\t\t\t[\n\t\t\t\t'page_title' => __( 'Localization Settings', 'coop-library-framework' ),\n\t\t\t\t'menu_title' => __( 'Localization', 'coop-library-framework' ),\n\t\t\t\t'menu_slug' => 'localization-settings',\n\t\t\t\t'capability' => 'manage_options',\n\t\t\t\t'icon_url' => 'dashicons-admin-site-alt3',\n\t\t\t]\n\t\t);\n\t}\n\n\tif ( function_exists( 'acf_add_local_field_group' ) ) {\n\t\t$languages = get_language_choices();\n\t\tunset( $languages['en'] );\n\t\tacf_add_local_field_group(\n\t\t\t[\n\t\t\t\t'key' => 'group_5e84bc76ae537',\n\t\t\t\t'title' => __( 'Localization Settings', 'coop-library-framework' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_5e84bc8dd03ab',\n\t\t\t\t\t\t'label' => __( 'Enabled Languages', 'coop-library-framework' ),\n\t\t\t\t\t\t'name' => 'enabled_languages',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'instructions' => __( 'Select the languages you\\'d like to be displayed to site visitors. English content will always be displayed.', 'coop-library-framework' ),\n\t\t\t\t\t\t'required' => 0,\n\t\t\t\t\t\t'conditional_logic' => 0,\n\t\t\t\t\t\t'wrapper' => [\n\t\t\t\t\t\t\t'width' => '',\n\t\t\t\t\t\t\t'class' => '',\n\t\t\t\t\t\t\t'id' => '',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'choices' => $languages,\n\t\t\t\t\t\t'allow_custom' => 0,\n\t\t\t\t\t\t'default_value' => [ 'en' ],\n\t\t\t\t\t\t'layout' => 'vertical',\n\t\t\t\t\t\t'toggle' => 0,\n\t\t\t\t\t\t'return_format' => 'value',\n\t\t\t\t\t\t'save_custom' => 0,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'location' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t'value' => 'localization-settings',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'position' => 'normal',\n\t\t\t\t'style' => 'seamless',\n\t\t\t\t'label_placement' => 'top',\n\t\t\t\t'instruction_placement' => 'label',\n\t\t\t\t'hide_on_screen' => '',\n\t\t\t\t'active' => true,\n\t\t\t\t'description' => '',\n\t\t\t]\n\t\t);\n\t}\n}", "public function loadLanguageForm(){\n\n return view('add_language');\n }", "function _change_lang_form () {\n\t\tif (!$this->ALLOW_LANG_CHANGE) {\n\t\t\treturn false;\n\t\t}\n\t\t// Get available languages\n\t\tforeach ((array)conf('languages') as $lang_info) {\n\t\t\tif (!$lang_info['active']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$lang_names[$lang_info['locale']] = $lang_info['name'];\n\t\t}\n\t\tif (empty($lang_names)) {\n\t\t\treturn false;\n\t\t}\n\t\t$atts = \" onchange=\\\"this.form.submit();\\\"\";\n\t\t// Process footer\n\t\t$replace = array(\n\t\t\t'form_action'\t=> './?object='.str_replace(YF_PREFIX, '', __CLASS__).'&action=change_lang',\n\t\t\t'lang_box'\t\t=> common()->select_box('lang_id', array(t('Language') => $lang_names), conf('language'), false, 2, $atts, false),\n\t\t\t'back_url'\t\t=> WEB_PATH.'?object='.$_GET['object'].($_GET['action'] != 'show' ? '&action='.$_GET['action'] : ''). (!empty($_GET['id']) ? '&id='.$_GET['id'] : ''). (!empty($_GET['page']) ? '&page='.$_GET['page'] : ''),\n\t\t);\n\t\treturn tpl()->parse('system/change_lang_form', $replace);\n\t}", "public function getConfigInputfields() {\n\t\t$inputfields = parent::getConfigInputfields();\n\t\t$defaults = self::getConfigDefaults();\n\t\t$defaultLabel = $this->_('Default value:') . ' ';\n\t\t\n\t\t$f = $inputfields->getChildByName('noLoad'); \n\t\t$f->addOption('uk-form-advanced', $this->_('Do not load Uikit form advanced customizations'));\n\t\t$f->addOption('uk-form-select', $this->_('Do not load Uikit form select customizations'));\n\n\t\t$f = $this->wire('modules')->get('InputfieldURL');\n\t\t$f->attr('name', 'ukURL');\n\t\t$f->label = $this->_('URL to Uikit framework');\n\t\t$f->description = $this->_('Specify a URL/path relative to root of ProcessWire installation.');\n\t\t$f->attr('value', $this->ukURL);\n\t\tif($this->ukURL != $defaults['ukURL']) $f->notes = $defaultLabel . $defaults['ukURL'];\n\t\t$inputfields->add($f);\n\n\t\t$f = $this->wire('modules')->get('InputfieldRadios');\n\t\t$f->attr('name', 'css');\n\t\t$f->label = $this->_('Uikit CSS theme file'); \n\t\t\n\t\t$_ukPath = $this->wire('forms')->frameworksPath() . 'uikit/css/';\n\t\tif(strpos($this->ukURL, '//') !== false) {\n\t\t\t// http URL, we can't identify CSS files there, so use our default \n\t\t\t$ukPath = $_ukPath; \n\t\t} else {\n\t\t\t$ukPath = $this->wire('config')->paths->root . trim($this->ukURL, '/') . '/css/';\n\t\t\tif(!is_dir($ukPath)) {\n\t\t\t\t$f->error(\"Unable to locate path: $ukPath\"); \t\t\t\n\t\t\t\t$ukPath = $_ukPath; \n\t\t\t}\n\t\t}\n\n\t\tforeach(new DirectoryIterator($ukPath) as $file) {\n\t\t\tif($file->isDir() || $file->isDot() || $file->getExtension() != 'css') continue;\n\t\t\t$f->addOption($file->getBasename());\n\t\t}\n\t\t$f->attr('value', $this->css);\n\t\t$f->columnWidth = 33;\n\t\t$inputfields->add($f);\n\t\t\n\t\t$f = $this->wire('modules')->get('InputfieldRadios');\n\t\t$f->attr('name', 'horizontal');\n\t\t$f->label = $this->_('Form style');\n\t\t$f->addOption(0, $this->_('Stacked (default)'));\n\t\t$f->addOption(1, $this->_('Horizontal (2-column)'));\n\t\t$f->attr('value', $this->horizontal);\n\t\t$f->optionColumns = 1; \n\t\t$f->description = $this->_('Please note that individual field column widths (if used) are not applicable when using the *Horizontal* style.'); \n\t\t$inputfields->add($f);\n\t\t\n\t\t$f = $this->wire('modules')->get('InputfieldInteger'); \n\t\t$f->attr('name', 'horizHeaderWidth');\n\t\t$f->label = $this->_('Percent width for label columns (horizontal style only)'); \n\t\t$f->description = $this->_('Specify a value between 5% and 90% percent to determine the width of the label column. The input column will have the remaining percent, i.e. if you specify 30% here, the label column will have 30% width and the input column will have 70% width.');\n\t\t$f->min = 5;\n\t\t$f->max = 90; \n\t\t$f->attr('value', $this->horizHeaderWidth); \n\t\t$f->showIf = 'frUikit_horizontal=1';\n\t\t$inputfields->add($f);\n\t\t\n\t\t$f = $this->wire('modules')->get('InputfieldRadios');\n\t\t$f->attr('name', 'inputSize');\n\t\t$f->label = $this->_('Input size');\n\t\t$f->addOption('small', $this->_('Small'));\n\t\t$f->addOption('', $this->_x('Normal', 'sizeType'));\n\t\t$f->addOption('large', $this->_('Large'));\n\t\t$f->attr('value', $this->inputSize);\n\t\t$f->columnWidth = 34;\n\t\t$inputfields->add($f);\n\n\t\t$f = $this->wire('modules')->get('InputfieldRadios'); \n\t\t$f->attr('name', 'buttonType'); \n\t\t$f->label = $this->_('Submit button type'); \n\t\t$f->addOption('', $this->_x('Default', 'buttonType'));\n\t\t$f->addOption('primary', 'Primary');\n\t\t$f->addOption('success', $this->_('Success'));\n\t\t$f->addOption('danger', $this->_('Danger'));\n\t\t$f->attr('value', $this->buttonType); \n\t\t$f->columnWidth = 33; \n\t\t$inputfields->add($f); \n\n\t\t$f = $this->wire('modules')->get('InputfieldRadios');\n\t\t$f->attr('name', 'buttonSize');\n\t\t$f->label = $this->_('Submit button size'); \n\t\t$f->addOption('mini', $this->_('Mini'));\n\t\t$f->addOption('small', $this->_('Small'));\n\t\t$f->addOption('', $this->_('Medium')); \n\t\t$f->addOption('large', $this->_('Large'));\n\t\t$f->attr('value', $this->buttonSize);\n\t\t$f->columnWidth = 33; \n\t\t$inputfields->add($f); \n\t\n\t\t$f = $this->wire('modules')->get('InputfieldCheckbox'); \n\t\t$f->attr('name', 'buttonFull'); \n\t\t$f->label = $this->_('Full width button?'); \n\t\tif($this->buttonFull) $f->attr('checked', 'checked');\n\t\t$f->columnWidth = 34; \n\t\t$inputfields->add($f); \n\t\t\n\t\treturn $inputfields;\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'narrative',\n 'textarea',\n [\n 'label' => $this->getData('label'),\n 'help_block' => $this->addHelpText($this->getData('help-text-narrative') ? $this->getData('help-text-narrative') : 'Narrative-text'),\n 'attr' => ['rows' => 4],\n 'required' => $this->getData('narrative_required')\n ]\n )\n // ->addSelect(\n // 'language',\n // $this->getCodeList('Language', 'Activity'),\n // trans('elementForm.language'),\n // $this->addHelpText($this->getData('help-text-language') ? $this->getData('help-text-language') : 'activity-xml_lang')\n // )\n ->add(\n 'language',\n 'hidden',\n [\n 'value' => 'en'\n ]\n )\n ->addRemoveThisButton('remove_from_collection');\n }", "public function addLanguages(): void\n {\n\t$languages = $this->recFindLanguages($this->dom->documentElement);\n\tif(!empty($languages)) $this->setXmpBag('dc:language', $languages);\n }", "protected function configureFormTable(array &$form, $type) {\n $info = $form['#language_types_info'][$type];\n\n $table_form = [\n '#title' => $this->t('@type language detection', ['@type' => $info['name']]),\n '#tree' => TRUE,\n '#description' => $info['description'],\n '#language_negotiation_info' => [],\n '#show_operations' => FALSE,\n 'weight' => ['#tree' => TRUE],\n ];\n // Only show configurability checkbox for the unlocked language types.\n if (empty($info['locked'])) {\n $configurable = $this->languageTypes->get('configurable');\n $table_form['configurable'] = [\n '#type' => 'checkbox',\n '#title' => $this->t('Customize %language_name language detection to differ from Interface text language detection settings', ['%language_name' => $info['name']]),\n '#default_value' => in_array($type, $configurable),\n '#attributes' => ['class' => ['language-customization-checkbox']],\n '#attached' => [\n 'library' => [\n 'language/drupal.language.admin',\n ],\n ],\n ];\n }\n\n $negotiation_info = $form['#language_negotiation_info'];\n $enabled_methods = $this->languageTypes->get('negotiation.' . $type . '.enabled') ?: [];\n $methods_weight = $this->languageTypes->get('negotiation.' . $type . '.method_weights') ?: [];\n\n // Add missing data to the methods lists.\n foreach ($negotiation_info as $method_id => $method) {\n if (!isset($methods_weight[$method_id])) {\n $methods_weight[$method_id] = $method['weight'] ?? 0;\n }\n }\n\n // Order methods list by weight.\n asort($methods_weight);\n\n foreach ($methods_weight as $method_id => $weight) {\n // A language method might be no more available if the defining module has\n // been disabled after the last configuration saving.\n if (!isset($negotiation_info[$method_id])) {\n continue;\n }\n\n $enabled = isset($enabled_methods[$method_id]);\n $method = $negotiation_info[$method_id];\n\n // List the method only if the current type is defined in its 'types' key.\n // If it is not defined default to all the configurable language types.\n $types = array_flip($method['types'] ?? $form['#language_types']);\n\n if (isset($types[$type])) {\n $table_form['#language_negotiation_info'][$method_id] = $method;\n $method_name = $method['name'];\n\n $table_form['weight'][$method_id] = [\n '#type' => 'weight',\n '#title' => $this->t('Weight for @title language detection method', ['@title' => mb_strtolower($method_name)]),\n '#title_display' => 'invisible',\n '#default_value' => $weight,\n '#attributes' => ['class' => [\"language-method-weight-$type\"]],\n '#delta' => 20,\n ];\n\n $table_form['title'][$method_id] = ['#plain_text' => $method_name];\n\n $table_form['enabled'][$method_id] = [\n '#type' => 'checkbox',\n '#title' => $this->t('Enable @title language detection method', ['@title' => mb_strtolower($method_name)]),\n '#title_display' => 'invisible',\n '#default_value' => $enabled,\n ];\n if ($method_id === LanguageNegotiationSelected::METHOD_ID) {\n $table_form['enabled'][$method_id]['#default_value'] = TRUE;\n $table_form['enabled'][$method_id]['#attributes'] = ['disabled' => 'disabled'];\n }\n\n $table_form['description'][$method_id] = ['#markup' => $method['description']];\n\n $config_op = [];\n if (isset($method['config_route_name'])) {\n $config_op['configure'] = [\n 'title' => $this->t('Configure'),\n 'url' => Url::fromRoute($method['config_route_name']),\n ];\n // If there is at least one operation enabled show the operation\n // column.\n $table_form['#show_operations'] = TRUE;\n }\n $table_form['operation'][$method_id] = [\n '#type' => 'operations',\n '#links' => $config_op,\n ];\n }\n }\n $form[$type] = $table_form;\n }", "public function settingLanguage() {}", "protected function _showLanguageForm() {\n\t\t// languages available for translation in the translation matrix\n\t\t$translatedLanguages = $this->_tc->getLanguages();\n\t\t\n\t\t// languages available for translation in the app\n\t\t$availableLanguages = $this->_getAppLanguageNodes();\n\n\t\t// Intersection of the above\t\n\t\t$languages = array_intersect($availableLanguages, $translatedLanguages);\n\t\t\n\t\tob_start();\n\t\trequire_once ROOTDIR . '/views/languageform.phtml';\n\t\tViewController::setView(ob_get_clean());\n\t}", "public function buildForm()\n {\n $this\n ->add('value', 'text', ['label' => trans('elementForm.value')])\n ->addCollection('location', 'Activity\\TargetLocation', 'actual_location', [], trans('elementForm.location'))\n ->addAddMoreButton('add_target_location', 'actual_location')\n ->addCollection('dimension', 'Activity\\TargetDimension', 'actual_dimension', [], trans('elementForm.dimension'))\n ->addAddMoreButton('add_actual_dimension', 'actual_dimension')\n ->addComments()\n ->addRemoveThisButton('remove_actual');\n }", "public function displayForm()\n {\n // Get default language\n $default_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\n // Init Fields form array\n $fields_form[0]['form'] = array(\n 'legend' => array(\n 'title' => $this->l('Slack informations'),\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Webhook URL'),\n 'name' => 'EEWEE_SLACK_WEBHOOK_URL',\n 'required' => true,\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Channel default'),\n 'hint' => $this->l('Without #'),\n 'name' => 'EEWEE_SLACK_CHANNEL_DEFAULT',\n 'required' => true,\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Notification new order'),\n 'name' => 'EEWEE_SLACK_NOTIF_ORDER_NEW',\n 'is_bool' => true,\n 'hint' => $this->l('For active Slack notification when new order PrestaShop'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Notification new customer'),\n 'name' => 'EEWEE_SLACK_NOTIF_CUSTOMER_NEW',\n 'is_bool' => true,\n 'hint' => $this->l('For active Slack notification when new customer PrestaShop'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right'\n )\n );\n\n $helper = new HelperForm();\n\n // Module, token and currentIndex\n $helper->module = $this;\n $helper->name_controller = $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;\n\n // Language\n $helper->default_form_language = $default_lang;\n $helper->allow_employee_form_lang = $default_lang;\n\n // Title and toolbar\n $helper->title = $this->displayName;\n $helper->show_toolbar = true; // false -> remove toolbar\n $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.\n $helper->submit_action = 'submit' . $this->name;\n $helper->toolbar_btn = array(\n 'save' => array(\n 'desc' => $this->l('Save'),\n 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name .\n '&token=' . Tools::getAdminTokenLite('AdminModules'),\n ),\n 'back' => array(\n 'href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'),\n 'desc' => $this->l('Back to list')\n )\n );\n // fields_value 01\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(), // Load current value\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n\n return $helper->generateForm($fields_form);\n }", "public function buildForm()\n {\n $this\n ->addSelect('region_code', $this->getRegionCodeList(), trans('elementForm.region_code'))\n ->addSelect('vocabulary', $this->getRegionVocabularyCodeList(), trans('elementForm.vocabulary'))\n ->add('vocabulary_uri', 'text', ['label' => trans('elementForm.vocabulary_uri')])\n ->addNarrative('narrative')\n ->addAddMoreButton('add_narrative', 'narrative');\n }", "function i18n_select_admin_settings() {\n $form['mode'] = array(\n '#type' => 'fieldset',\n '#title' => t('Content selection mode'),\n );\n $form['mode']['i18n_select_missing_translation'] = array(\n '#type' => 'checkbox',\n '#title' => t('When translation is missing, show content in the default language'),\n '#default_value' => variable_get('i18n_select_missing_translation', FALSE),\n );\n\n $form['types'] = array(\n '#type' => 'fieldset',\n '#title' => t('Content to filter by language'),\n );\n $form['types']['i18n_select_nodes'] = array(\n '#type' => 'checkbox',\n '#title' => t('Nodes'),\n '#default_value' => variable_get('i18n_select_nodes', TRUE),\n );\n $form['types']['i18n_select_blocks'] = array(\n '#type' => 'checkbox',\n '#title' => t('Blocks (not implemented)'),\n '#default_value' => variable_get('i18n_select_blocks', TRUE),\n );\n $form['types']['i18n_select_taxonomy'] = array(\n '#type' => 'checkbox',\n '#title' => t('Taxonomy'),\n '#default_value' => variable_get('i18n_select_taxonomy', TRUE),\n );\n // Enable for specific pages. This works pretty much like block visibility\n // Note this page requires 'administer site configuration' so we don't need to check permissions\n $form['pages'] = array(\n '#type' => 'fieldset',\n '#title' => t('Enable for specific pages'),\n );\n $options = array(\n I18N_SELECT_PAGE_NOTLISTED => t('All pages except those listed'),\n I18N_SELECT_PAGE_LISTED => t('Only the listed pages'),\n );\n $description = t(\"Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.\", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));\n if (module_exists('php')) {\n $options += array(I18N_SELECT_PAGE_PHP => t('Pages on which this PHP code returns <code>TRUE</code> (experts only)'));\n $title = t('Pages or PHP code');\n $description .= ' ' . t('If the PHP option is chosen, enter PHP code between %php. Note that executing incorrect PHP code can break your Drupal site.', array('%php' => '<?php ?>'));\n }\n else {\n $title = t('Pages');\n } \n $form['pages']['i18n_select_page_mode'] = array(\n '#type' => 'radios',\n '#options' => $options,\n '#default_value' => variable_get('i18n_select_page_mode', I18N_SELECT_PAGE_NOTLISTED),\n );\n $form['pages']['i18n_select_page_list'] = array(\n '#type' => 'textarea',\n '#title' => '<span class=\"element-invisible\">' . $title . '</span>',\n '#default_value' => variable_get('i18n_select_page_list', 'admin/*'),\n '#description' => $description,\n );\n $form['pages']['i18n_select_page_block'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable always for block content though it may be disabled for the page'),\n '#default_value' => variable_get('i18n_select_page_block', TRUE),\n );\n return system_settings_form($form);\n}", "function addRules() {\n $this->addFormRule(array('Recurring_Form_RecurringContribution', 'validateAvtale'));\n }", "public function init() {\n// \t\t$moduleName->setLabel('Module Name')\n// \t\t->setRequired(true)\n// \t\t->addValidator('NotEmpty', true)\n// \t\t->addFilter('StringTrim');\n\n\t\t$key = new Zend_Form_Element_Text('langKey');\n\t\t$key->setLabel('Language String')\n\t\t->setRequired(true)\n\t\t->addValidator('NotEmpty', true)\n\t\t->addFilter('StringTrim');\n\n\t\t$text = new Zend_Form_Element_Text('langText');\n\t\t$text->setLabel('Text')\n\t\t->setRequired(true)\n\t\t->addValidator('NotEmpty', true)\n\t\t->addFilter('StringTrim');\n\t\t\n\t\t$locale = new Zend_Form_Element_Text('locale');\n\t\t$locale->setLabel('Locale')\n\t\t->setRequired(true)\n\t\t->addValidator('NotEmpty', true)\n\t\t->addFilter('StringTrim');\n\n\t\t$submit = new Zend_Form_Element_Submit('submit');\n\t\t$submit->setLabel('Submit')\n\t\t\t\t->setOptions(array('class' => 'submit'));\n\n\t\t$this->addElement($key)\n\t\t\t\t->addElement($text)\n\t\t\t\t->addElement($locale)\n\t\t ->addElement($submit);\n\t}", "public static function rulesByLanguage($language){\n return [\n $language.'_name' => 'required',\n $language.'_description' => ['required','max:255']\n ];\n }", "protected function configureFormFields(FormMapper $formMapper)\n {\n // get all languages\n $languages = $this->configurationPool->getContainer()->getParameter('languages');\n\n $formMapper\n ->tab('Accommodation', array(\n 'class' => 'col-md-12',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->with(' ', array(\n 'class' => 'col-md-8',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->add('name')\n ->add('translations', 'a2lix_translations_gedmo', array(\n 'translatable_class' => 'DA\\MainBundle\\Entity\\Accommodation',\n 'by_reference' => false,\n 'label' => false,\n 'locales' => array_keys($languages),\n 'fields'=>array(\n 'title'=>array(\n 'field_type'=>'text',\n 'required' => false,\n ),\n 'description'=>array(\n 'field_type'=>'textarea',\n 'required' => false,\n )\n )\n ))\n ->end()\n ->with('Info', array(\n 'class' => 'col-md-4',\n 'box_class' => 'box box-solid box-discover uploadinput',\n // ...\n ))\n ->add('image', 'sonata_type_model_list', array('required' => false))\n ->add('gallery', 'sonata_type_model_list', array('required' => false))\n ->add('price_for_day',null,array('required' => true))\n ->add('price_for_month',null,array('required' => true))\n ->add('rooms')\n ->add('location', 'entity', array(\n 'class' => 'DAMainBundle:Location',\n 'query_builder' => function (EntityRepository $er) {\n return $er->createQueryBuilder('l')\n ->Where('l.category = ?1')\n ->setParameter('1','city')\n ;\n },\n 'choice_label' => 'name'\n ))\n ->add('current_location', 'entity', array(\n 'class' => 'DAMainBundle:Location',\n 'query_builder' => function (EntityRepository $er) {\n return $er->createQueryBuilder('l')\n ->Where('l.category = ?1')\n ->setParameter('1','apartment')\n ->orwhere('l.category = ?2')\n ->setParameter('2','villa');\n },\n 'choice_label' => 'name'\n ))\n ->add('category', 'choice', array(\n 'label'=> 'Category',\n 'choices' => array(\n 'villa' => 'Villa',\n 'apartment' => 'Apartment'\n ),\n 'required' => true,\n 'expanded' => false,\n ))\n ->add('best_price')\n ->end()\n ->end()\n ->tab('Comfort', array(\n 'class' => 'col-md-12',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->with('Comforts', array(\n 'class' => 'col-md-12 ',\n 'box_class' => 'box box-solid box-discover room_admin_block',\n ))\n\n //->add('comfort', 'sonata_type_model', array('multiple' => true, 'by_reference' => false))\n ->add('comfort', 'entity',\n array(\n 'class' => 'DAMainBundle:Comfort',\n 'property' => 'name',\n 'required' => false,\n 'attr'=> array(\n 'class'=> 'list_comfort'\n ),\n 'multiple' => true,\n 'expanded' => true,\n 'group_by' => function($val, $key, $index) {\n switch ($val->getCategory()){\n case 1 :\n return 'Bathroom (Ванная комната) (Լոգարան)';\n break;\n case 2 :\n return 'Bedroom (Спальня) (Ննջարան)';\n break;\n }\n },\n )\n )\n ->end()\n ->end();\n\n\n }", "public static function render_locales_form() {\n //check nonce\n \n // check_ajax_referer( 'pdc-update-profile', 'nonce', true );\n \n $lang_code = ( isset( $_POST['lang'] ) && self::lang_exists($_POST['lang'])) ? esc_html($_POST['lang']) : false;\n \n if( $lang_code != false ) :\n \n //get locales\n $locales = self::get_locales_for_language($lang_code);\n //write_log($locales);\n\n if ( ! empty( $locales ) ) :\n \n //populate fieldset with radio input\n $html = '<fieldset class=\"setlr-locales-form\"><legend>' . __( 'Please choose a locale', 'pdcrequest') . '</legend>';\n \n foreach ( $locales as $locale ) :\n foreach ( $locale as $locale_code => $locale_name ) :\n $html .= '<label class=\"setlr-radio\"><input type=\"radio\" name=\"locale\" value=\"'. esc_attr( $locale_code ) . '\">' . esc_html( $locale_name ) . '</label>';\n endforeach;\n endforeach;\n\n $html .= '<label class=\"setlr-radio\"><input type=\"radio\" name=\"locale\" value=\"\">' . __( 'not important', 'pdcrequest' ) . '</label>';\n \n else :\n //no locale for chosen lang\n $html = '';\n endif;\n\n echo $html;\n exit;\n else :\n \n //wrong language code\n write_log( 'profile wrong language code: ' . esc_html($_POST['lang']));\n \n echo '';\n exit;\n endif;\n }", "public function options_form(&$form, &$form_state) {\n module_load_include('inc', 'whos_amung_us', 'includes/whos_amung_us.admin');\n parent::options_form($form, $form_state);\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Label'),\n '#default_value' => isset($this->options['label']) ? $this->options['label'] : '',\n '#description' => t('The label for this area that will be displayed only administratively.'),\n );\n $options = array(\n 'values' => $this->options,\n );\n $options['values'] += whos_amung_us_default_form_values();\n $form += whos_amung_us_configuration_form(array(), $options, 'views', 'options');\n }", "public function buildForm()\n {\n $this\n ->add('url', 'text', ['help_block' => $this->addHelpText('Organisation_DocumentLink-url')])\n ->addSelect('format', $this->getCodeList('FileFormat', 'Organization'), trans('elementForm.format'), $this->addHelpText('Organisation_DocumentLink-format'))\n ->addNarrative('narrative')\n ->addAddMoreButton('add_narrative', 'narrative')\n ->addCollection('category', 'Organization\\CategoryCodeForm', 'category', [], trans('elementForm.category'))\n ->addAddMoreButton('add_category', 'category')\n ->addCollection('language', 'Organization\\LanguageCodeForm', 'language', [], trans('elementForm.language'))\n ->addAddMoreButton('add_language', 'language')\n ->addCollection('recipient_country', 'Organization\\RecipientCountryForm', 'recipient_country', [], trans('elementForm.recipient_country'))\n ->addAddMoreButton('add_recipient_country', 'recipient_country')\n ->addRemoveThisButton('remove_document_link');\n }", "function init_form_fields()\n {\n $this->form_fields = [\n 'enabled' => [\n 'title' => __('Activar/Desactivar', 'transbank_webpay'),\n 'type' => 'checkbox',\n 'default' => 'yes'\n ],\n 'webpay_test_mode' => [\n 'title' => __('Ambiente', 'transbank_webpay'),\n 'type' => 'select',\n 'options' => [\n 'INTEGRACION' => __('Integraci&oacute;n', 'transbank_webpay'),\n 'PRODUCCION' => __('Producci&oacute;n', 'transbank_webpay')\n ],\n 'default' => 'INTEGRACION'\n ],\n 'webpay_commerce_code' => [\n 'title' => __('C&oacute;digo de Comercio', 'transbank_webpay'),\n 'type' => 'text',\n 'default' => $this->config['COMMERCE_CODE']\n ],\n 'webpay_private_key' => [\n 'title' => __('Llave Privada', 'transbank_webpay'),\n 'description' => __('Contenido de archivo con extensión .key'),\n 'type' => 'textarea',\n 'default' => str_replace(\"<br/>\", \"\\n\", $this->config['PRIVATE_KEY']),\n 'css' => 'font-family: monospace'\n ],\n 'webpay_public_cert' => [\n 'title' => __('Certificado', 'transbank_webpay'),\n 'description' => __('Contenido de archivo con extensión .crt'),\n 'type' => 'textarea',\n 'default' => str_replace(\"<br/>\", \"\\n\", $this->config['PUBLIC_CERT']),\n 'css' => 'font-family: monospace'\n ],\n 'after_payment_order_status' => [\n 'title' => __('Estado de pedido después del pago.'),\n 'description' => __('<strong style=\"color:red;\">DEPRECADO</strong>: Se eliminará en proximas versiones', 'transbank_webpay'),\n 'type' => 'select',\n 'options' => [\n 'wc-pending' => __('Pendiente', 'transbank_webpay'),\n 'wc-processing' => __('Procesando', 'transbank_webpay'),\n 'wc-on-hold' => __('Retenido', 'transbank_webpay'),\n 'wc-completed' => __('Completado', 'transbank_webpay'),\n 'wc-cancelled' => __('Cancelado', 'transbank_webpay'),\n 'wc-refunded' => __('Reembolsado', 'transbank_webpay'),\n 'wc-failed' => __('Fallido', 'transbank_webpay')\n ],\n 'default' => 'wc-processing'\n ]\n ];\n }", "private function createFormElements()\n {\n // Adiciona o campo Assunto\n $this->add([\n \"type\" => \"text\",\n \"name\" => \"subject\",\n \"attributes\" => [\n \"id\" => \"subject\",\n 'required' => true\n ],\n \"options\" => [\n \"label\" => \"Assunto\"\n ]\n ]);\n\n // Adiciona o campo Assunto\n $this->add([\n \"type\" => \"textarea\",\n \"name\" => \"mail-body\",\n \"attributes\" => [\n \"id\" => \"mail-body\",\n 'required' => true,\n \"rows\" => 3\n ],\n \"options\" => [\n \"label\" => \"Corpo do E-mail\"\n ]\n ]);\n }", "public function __construct($name = null)\n {\n parent::__construct('language');\n\n $this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n $this->add(array(\n 'name' => 'file',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'File',\n ),\n ));\n $this->add(array(\n 'name' => 'new',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'New',\n ),\n ));\n $this->add(array(\n 'name' => 'graphs',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Graphs',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAs',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAs',\n ),\n ));\n $this->add(array(\n 'name' => 'save',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Save',\n ),\n ));\n $this->add(array(\n 'name' => 'graphsModHeader',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'GraphsModHeader',\n ),\n ));\n \n $this->add(array(\n 'name' => 'graphsModOpen',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'GraphsModOpen',\n ),\n ));\n $this->add(array(\n 'name' => 'graphsModRemove',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'GraphsModRemove',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModHeader',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModHeader',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModPlease',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModPlease',\n ),\n )); \n $this->add(array(\n 'name' => 'saveAsModTitlePh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModTitlePh',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModButton',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModButton',\n ),\n ));\n $this->add(array(\n 'name' => 'SaveAsModSuccessMes',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'saveAsModSuccessMes',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModTitRequired',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModTitRequired',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModLongerTitle',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModLongerTitle',\n ),\n ));\n $this->add(array(\n 'name' => 'saveAsModShorterTitle',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveAsModShorterTitle',\n ),\n ));\n $this->add(array(\n 'name' => 'saveModPlease',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveModPlease',\n ),\n ));\n $this->add(array(\n 'name' => 'saveModButton',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveModButton',\n ),\n ));\n $this->add(array(\n 'name' => 'saveModeSuccessMes',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveModeSuccessMes',\n ),\n ));\n $this->add(array(\n 'name' => 'language',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Language',\n ),\n ));\n $this->add(array(\n 'name' => 'english',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'English',\n ),\n ));\n $this->add(array(\n 'name' => 'mandarin',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Mandarin',\n ),\n ));\n $this->add(array(\n 'name' => 'spanish',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Spanish',\n ),\n ));\n $this->add(array(\n 'name' => 'french',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'French',\n ),\n ));\n $this->add(array(\n 'name' => 'watchDemo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'WatchDemo',\n ),\n ));\n $this->add(array(\n 'name' => 'about',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'About',\n ),\n ));\n $this->add(array(\n 'name' => 'hiUser',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'HiUser',\n ),\n ));\n $this->add(array(\n 'name' => 'logOut',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LogOut',\n ),\n ));\n $this->add(array(\n 'name' => 'login',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Login',\n ),\n ));\n $this->add(array(\n 'name' => 'register',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Register',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModHeader',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModHeader',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModEmailPh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModEmailPh',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModPasswordPh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModPasswordPh',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModButton',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModButton',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModEmailRequired',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModEmailRequired',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModInvalidEmail',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModInvalidEmail',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModUBCEmReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModUBCEmReq',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModPasswordReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModPasswordReq',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModPasswordLonger',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModPasswordLonger',\n ),\n ));\n $this->add(array(\n 'name' => 'loginModPasswordShorter',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LginModPasswordShorter',\n ),\n ));\n $this->add(array(\n 'name' => 'LoginModSuccessMes',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LoginModSuccessMes',\n ),\n ));\n $this->add(array(\n 'name' => 'regModHeader',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModHeader',\n ),\n ));\n $this->add(array(\n 'name' => 'regModFullnamePh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModFullnamePh',\n ),\n ));\n \n $this->add(array(\n 'name' => 'regModUsernamePh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModUsernamePh',\n ),\n ));\n $this->add(array(\n 'name' => 'regModEmailPh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModEmailPh',\n ),\n ));\n $this->add(array(\n 'name' => 'regModPasswordPh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordPh',\n ),\n ));\n $this->add(array(\n 'name' => 'regModPassConfirmPh',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPassConfirmPh',\n ),\n ));\n $this->add(array(\n 'name' => 'regModButton',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModButton',\n ),\n ));$this->add(array(\n 'name' => 'regModFullnameReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModFullnameReq',\n ),\n ));\n $this->add(array(\n 'name' => 'regModUsernameReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModUsernameReq',\n ),\n ));\n $this->add(array(\n 'name' => 'regModEmailReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModEmailReq',\n ),\n ));\n $this->add(array(\n 'name' => 'regModInvalidEmail',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModInvalidEmail',\n ),\n ));\n $this->add(array(\n 'name' => 'regModUBCEmailReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModUBCEmailReq',\n ),\n )); \n $this->add(array(\n 'name' => 'regModPasswordReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordReq',\n ),\n )); \n $this->add(array(\n 'name' => 'regModPasswordLonger',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordLonger',\n ),\n )); \n $this->add(array(\n 'name' => 'regModPasswordShorter',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordShorter',\n ),\n )); \n $this->add(array(\n 'name' => 'regModPasswordConfReq',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordConfReq',\n ),\n )); \n $this->add(array(\n 'name' => 'regModePasswordConfLonger',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModePasswordConfLonger',\n ),\n )); \n $this->add(array(\n 'name' => 'regModPasswordConfShorter',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModPasswordConfShorter',\n ),\n )); \n $this->add(array(\n 'name' => 'regModSuccessMes',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'RegModSuccessMes',\n ),\n )); \n $this->add(array(\n 'name' => 'startWriting',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'StartWriting',\n ),\n )); \n $this->add(array(\n 'name' => 'logModErrMes',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'LogModErrMes',\n ),\n )); \n $this->add(array(\n 'name' => 'wantedLanguage',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'WantedLanguage',\n ),\n )); \n $this->add(array(\n 'name' => 'saveModGoSaveAs',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'SaveModGoSaveAs',\n ),\n ));\n \n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => 'Go',\n 'id' => 'submitbutton',\n ),\n ));\n }", "public function setLanguage();", "public static function hookConfigForm()\n {\n $publicAppendToItemsShow = get_option('item_relations_public_append_to_items_show');\n $relationFormat = get_option('item_relations_relation_format');\n\n require dirname(__FILE__) . '/config_form.php';\n }", "function editLanguage($language){\r\r\n $this->current_language = $language;\r\r\n $all_mods = $GLOBALS[\"core\"]->listModules();\r\r\n array_unshift($all_mods, \"core\");\r\r\n\r\r\n $GLOBALS[\"CNT_lang\"][\"title\"] = $_SESSION[\"translate\"]->it(\"Update [var1]\", $this->fullname($language)) . CLS_help::show_link(\"language\", \"editLanguage\");\r\r\n\r\r\n $content = $this->link_to_admin().\"<br />\r\r\n<form action=\\\"index.php\\\" method=\\\"post\\\">\r\r\n\".PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Search for Missing Translations\"), \"lang_edit_com[search_for_missing]\").\"<br /><br />\r\r\n\".PHPWS_Form::formTextField(\"lng_search_phrase\", NULL, 30).\"\r\r\n\".PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Search for Phrase\"), \"lang_edit_com[search_phrase]\").\"<br /><br />\r\r\n\".PHPWS_Form::formTextField(\"lng_search_translation\", NULL, 30).\"\r\r\n\".PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Search for Translation\"), \"lang_edit_com[search_translation]\").\"<br /><br />\";\r\r\n\r\r\n$content .= PHPWS_Form::formHidden(array(\"lng_adm_op\"=>\"edit_lang_action\", \"module\"=>\"language\", \"language\"=>$language)).\"<hr />\r\r\n<b>\".$_SESSION[\"translate\"]->it(\"Create New Entry\").\"</b><br />\r\r\n<table cellpadding=\\\"4\\\">\r\r\n <tr>\r\r\n <th>\".$_SESSION[\"translate\"]->it(\"Phrase\").\"</th><th>\".$_SESSION[\"translate\"]->it(\"Translates To\").\":</th><th>\".$_SESSION[\"translate\"]->it(\"Module\").\"</th>\r\r\n </tr>\r\r\n <tr>\r\r\n <td>\".PHPWS_Form::formTextField(\"lang_new_phrase\").\"</td><td>\".PHPWS_Form::formTextField(\"lang_new_trans\").\"</td>\r\r\n <td>\".PHPWS_Form::formSelect(\"lang_mod_title\", $all_mods, \"core\", 1).\"</td>\r\r\n <td>\".PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Insert Phrase\"), \"lang_edit_com[insert_phrase]\").\"</td>\r\r\n </tr>\r\r\n</table>\r\r\n\";\r\r\n\r\r\n $content .= \"\r\r\n</form>\r\r\n<br />\r\r\n\";\r\r\n\r\r\n $GLOBALS[\"CNT_lang\"][\"content\"]=$content;\r\r\n }", "protected function addElements()\n\t{\n\t\t\n\t\t// Add \"Account from chart\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'account',\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Account'\n\t\t\t\t],\n\t\t\t\t'attributes' => [\n\t\t\t\t\t\t\n\t\t\t\t\t\t'class' => 'account'\n\t\t\t\t]\n\t\t]);\n\t\t\n\t\t// Add \"Wording\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'sWording',\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Wording'\n\t\t\t\t],\n\t\t]);\n\t\t\n\t\t// Add \"DEBIT\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'debit',\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Debit'\n\t\t\t\t],\n\t\t]);\n\t\t\n\t\t// Add \"CREDIT\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'credit',\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Credit'\n\t\t\t\t],\n\t\t]);\n\t\t\n\t\t\n\t\t// Add \"currency\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'currency',\n\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'id' => 'currency',\n\t\t\t\t],\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Currency',\n\t\t\t\t\t\t//'empty_option' => '-- Please select --',\n\t\t\t\t\t\t'value_options' => $this->currencyManager->getCurrencies()\t\t\t\t\t\t\n\t\t\t\t],\n\t\t]);\n\t\t\n\t\t// Add \"currency ratio\" field\n\t\t$this->add([\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'ratio',\n\t\t\t\t'options' => [\n\t\t\t\t\t\t'label' => 'Currency Ratio',\n\n\t\t\t\t],\n\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'value' => 1\n\t\t\t\t\t\t\n\t\t\t\t]\n\t\t]);\n\t\t\t\n\t}", "public function settingsForm() {\n $element = array(\n '#markup' => 'Rules settings form is not implemented yet.',\n );\n return $element;\n }", "function addLanguage() {\n $data = array(\n 'lng_short' => empty($this->params['lng_short']) ? '' : $this->params['lng_short'],\n 'lng_ident' => empty($this->params['lng_ident']) ? '' : $this->params['lng_ident'],\n 'lng_title' => empty($this->params['lng_title']) ? '' : $this->params['lng_title'],\n 'lng_glyph' => empty($this->params['lng_glyph']) ? '' : $this->params['lng_glyph'],\n 'is_interface_lng' => empty($this->params['is_interface_lng'])\n ? 0 : (int)$this->params['is_interface_lng'],\n 'is_content_lng' => empty($this->params['is_content_lng'])\n ? 0 : (int)$this->params['is_content_lng']\n );\n return $this->databaseInsertRecord($this->tableLanguage, 'lng_id', $data);\n }", "protected function getMethodConfigForm()\n {\n $container = array(\n 'form' => array(\n 'legend'=>array(\n 'title' => $this->l('METHOD CONFIGURATION'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n ),\n );\n \n $switch = array(\n 'type' => 'switch',\n 'label' => $this->l('Enable Oneclic'),\n 'name' => 'PAYOH_ONECLIC_ENABLED',\n 'is_bool' => true,\n 'desc' => $this->l('Display oneclic form on payment step'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n )\n );\n \n //Backward compatibility with version < 1.6.\n //Switch type not exists\n if (version_compare(_PS_VERSION_, \"1.6.0.0\") == -1) {\n $switch = array(\n 'type' => 'select',\n 'label' => $this->l('Enable Oneclic'),\n 'name' => 'PAYOH_ONECLIC_ENABLED',\n 'is_bool' => true,\n 'desc' => $this->l('Display oneclic form on payment step'),\n 'options' => array(\n 'query' => array(\n array(\n 'id' => 1,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 0,\n 'label' => $this->l('Disabled')\n )\n ),\n 'id' => 'id',\n 'name' => 'label'\n ),\n );\n }\n\n $container['form']['input'][] = $switch;\n \n $container['form']['input'][] = array(\n 'col' => 6,\n 'label' => $this->l('CSS URL'),\n 'name' => 'PAYOH_CSS_URL',\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-css3\"></i>',\n 'is_number' => true,\n 'desc' => '',\n );\n \n return $container;\n }", "protected function setLanguageKeys() {}", "function ninja_forms_load_lang() {\n\t$textdomain = 'ninja-forms';\n\n\t/** The 'plugin_locale' filter is also used by default in load_plugin_textdomain() */\n\t$locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );\n\n\t/** Set filter for WordPress languages directory */\n\t$wp_lang_dir = apply_filters(\n\t\t'ninja_forms_wp_lang_dir',\n\t\tWP_LANG_DIR . '/ninja-forms/' . $textdomain . '-' . $locale . '.mo'\n\t);\n\n\t/** Translations: First, look in WordPress' \"languages\" folder = custom & update-secure! */\n\tload_textdomain( $textdomain, $wp_lang_dir );\n\n\t/** Translations: Secondly, look in plugin's \"lang\" folder = default */\n\t$plugin_dir = basename( dirname( __FILE__ ) );\n\t$lang_dir = apply_filters( 'ninja_forms_lang_dir', $plugin_dir . '/lang/' );\n\tload_plugin_textdomain( $textdomain, FALSE, $lang_dir );\n\n}", "protected function createComponentEnvironmentForm() {\n\t\t$user = Nette\\Environment::getUser()->getIdentity();\n\n\t\t$form = new Form;\n\n\t\t$selLanguages = array(null => __('Auto'));\n\t\t$languages = (array) Nette\\Environment::getConfig('languages', array('en'));\n\t\tforeach($languages as $curr) {\n\t\t\t$selLanguages[$curr] = $curr;\n\t\t}\n\t\t\n\t\t$config = $this->context->userConfig;\n\t\t$lang = $config->get('system.language'); \n\t\t\n\t\t$form->addSelect('language', __('Language:'), $selLanguages)->setValue($lang);\n\t\t\n\t\t$form->addSubmit('send', __('Save'));\n\n\t\t$form->onSuccess[] = callback($this, 'environmentFormSubmitted');\n\t\treturn $form;\n\t}", "public static function hookConfigForm()\n {\n $publicAppendToItemsShow = get_option('item_relations_public_items_show');\n if (null == $publicAppendToItemsShow) {\n $publicAppendToItemsShow = self::DEFAULT_PUBLIC_ITEMS_SHOW;\n }\n \n $relationFormat = get_option('item_relations_relation_format');\n if (null == $relationFormat) {\n $relationFormat = self::DEFAULT_RELATION_FORMAT;\n }\n require dirname(__FILE__) . '/config_form.php';\n }", "public function add_language()\r\n\t{\t\r\n\t\t//Intialize values for library and helpers\t\r\n\t\t$this->form_validation->set_error_delimiters($this->config->item('field_error_start_tag'), $this->config->item('field_error_end_tag'));\r\n\t\t\r\n\t\tif($this->input->post('add_language'))\r\n\t\t{\t\r\n\t\t\textract($this->input->post());\t\r\n\t\t\t\r\n \t//Set rules\r\n\t\t\t$this->form_validation->set_rules('name','Language Name','required|trim|xss_clean|alpha|callback_name_check');\r\n\t\t\t$this->form_validation->set_rules('language_code','Language Code','required|trim|xss_clean|alpha|callback_code_check');\r\n\t\t\t$this->form_validation->set_rules('status','Status','required|trim|xss_clean');\r\n\t\t\t\r\n\t\t\tif($this->form_validation->run())\r\n\t\t\t{\r\n\t\t\t\textract($this->input->post());\r\n\t\t\t\t\r\n\t\t\t\t$data['name'] = $name;\r\n\t\t\t\t$data['code'] = $language_code;\r\n\t\t\t\t$data['status'] = $status;\r\n\t\t\t\t\r\n\t\t\t\t$this->Common_model->inserTableData('language',$data);\r\n\t\t\t\t\r\n\t\t\t\t$this->session->set_flashdata('flash_message', $this->Common_model->admin_flash_message('success',translate_admin('Language Added Successfully.')));\r\n\t\t\t\tredirect_admin('language/view_languages');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t} //If - Form Submission End\r\n\telseif($this->input->post('cancel')) {\r\n\tredirect_admin('language/view_languages');\r\n}\r\n\t\t\r\n\t $data['message_element'] = \"administrator/language/add_language\";\r\n\t\t$this->load->view('administrator/admin_template', $data);\r\n\t\r\n\t}", "public function init()\n {\n // set the pub/sub topic so others can influence form\n $this->setTopic('p4cms.site.configure.form');\n\n // form should use p4cms-ui styles.\n $this->setAttrib('class', 'p4cms-ui site-form site-configure-form');\n\n // set the method for the form to POST\n $this->setMethod('post');\n\n // add a field to collect the site's title\n $this->addElement(\n 'text',\n 'title',\n array(\n 'label' => 'Title',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'size' => 30,\n 'order' => 20\n )\n );\n\n // add a field to collect the site description.\n $this->addElement(\n 'textarea',\n 'description',\n array(\n 'label' => 'Description',\n 'rows' => 3,\n 'cols' => 56,\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'description' => \"Enter a short summary of your site.<br/>\"\n . \"This summary will appear in meta description tags for non-content pages.\",\n 'order' => 40\n )\n );\n $this->getElement('description')\n ->getDecorator('Description')\n ->setEscape(false);\n\n // add a field to collect the site's robots.txt content\n $this->addElement(\n 'textarea',\n 'robots',\n array(\n 'label' => 'robots.txt',\n 'rows' => 3,\n 'cols' => 56,\n 'description' => \"Provide the contents for the site's robots.txt file.\",\n 'order' => 50,\n 'validators' => array(array('RobotsTxt'))\n )\n );\n $this->getElement('robots')\n ->getDecorator('label')\n ->setOption(\n 'helpUri',\n Zend_Controller_Front::getInstance()->getBaseUrl()\n . '/' . Ui_Controller_Helper_HelpUrl::HELP_BASE_URL . '/'\n . 'sites.management.html#robots'\n );\n\n // add the submit button\n $this->addElement(\n 'SubmitButton',\n 'save',\n array(\n 'label' => 'Save',\n 'class' => 'preferred',\n 'required' => false,\n 'ignore' => true\n )\n );\n\n // put the button in a fieldset.\n $this->addDisplayGroup(\n array('save'),\n 'buttons',\n array(\n 'class' => 'buttons',\n 'order' => 200\n )\n );\n }", "function admin_add() {\n\t\t$this->layout = 'admin';\n\t\t$data = $this->Language->find('list', array('fields' => array('short_name', 'full_name')));\n\t\t$this->set('languages', $data);\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Section->create();\n\t\t\tif ($this->Section->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(sprintf(__('The %s has been saved', true), 'section'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), 'section'));\n\t\t\t}\n\t\t}\n\t}", "public function __construct($language)\n {\n $this->config = new Configuration\\EmailForm($language);\n\n // Status message handling. CSE::CURL_FAIL uses GET since if Curl has\n // failed, we can't generate POST messages anyway.\n if (isset($_GET[CSE::EMAIL_STATUS])) {\n $this->status = $_GET[CSE::EMAIL_STATUS];\n } elseif (isset($_POST[CSE::EMAIL_STATUS])) {\n $this->status = $_POST[CSE::EMAIL_STATUS];\n }\n\n $this->name = isset($_POST[CSE::NAME]) ? $_POST[CSE::NAME] : '';\n $this->replyto = isset($_POST[CSE::REPLYTO]) ? $_POST[CSE::REPLYTO] : '';\n $this->subject = isset($_POST[CSE::SUBJECT]) ? $_POST[CSE::SUBJECT] : '';\n $this->body = isset($_POST[CSE::BODY]) ? $_POST[CSE::BODY] : '';\n }", "protected function _getConfigForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form;\n\t\t$options = array();\n\t\t$toggles = array();\n\t\t$disabled = array();\n\t\t$formFields = array();\n\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'contact_access', ( \\IPS\\Settings::i()->contact_access == '*' ) ? '*' : explode( ',', \\IPS\\Settings::i()->contact_access ), FALSE, array(\n\t\t\t'options' \t=> array_combine( array_keys( \\IPS\\Member\\Group::groups() ), array_map( function( $_group ) { return (string) $_group; }, \\IPS\\Member\\Group::groups() ) ),\n\t\t\t'multiple' \t=> true,\n\t\t\t'unlimited'\t\t=> '*',\n\t\t\t'unlimitedLang'\t=> 'everyone'\n\t\t), NULL, NULL, NULL, 'contact_access' ) );\n\n\t\t/* Get extensions */\n\t\t$extensions = \\IPS\\Application::allExtensions( 'core', 'ContactUs', FALSE, 'core', 'InternalEmail', TRUE );\n\n\t\tforeach ( $extensions as $k => $class )\n\t\t{\n\t\t\t$class->process( $form, $formFields, $options, $toggles, $disabled );\n\t\t}\n\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'contact_type', \\IPS\\Settings::i()->contact_type, FALSE, array(\n\t\t\t'options' => $options,\n\t\t\t'toggles' => $toggles,\n\t\t\t'disabled' => $disabled\n\t\t) ) );\n\n\t\tforeach ( $formFields AS $field )\n\t\t{\n\t\t\t$form->add( $field );\n\t\t}\n\n\t\treturn $form;\n\t}", "function ManageLanguages()\n{\n\tglobal $context, $txt, $modSettings;\n\n\tloadLanguage('ManageSettings');\n\n\t$context['page_title'] = $txt['edit_languages'];\n\t$context['sub_template'] = 'show_settings';\n\n\t$subActions = array(\n\t\t'edit' => 'ModifyLanguages',\n\t\t'add' => 'AddLanguage',\n\t\t'settings' => 'ModifyLanguageSettings',\n\t\t'downloadlang' => 'DownloadLanguage',\n\t\t'editlang' => 'ModifyLanguage',\n\t);\n\n\t// By default we're managing languages.\n\t$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'edit';\n\t$context['sub_action'] = $_REQUEST['sa'];\n\n\t// Load up all the tabs...\n\t$context[$context['admin_menu_name']]['tab_data'] = array(\n\t\t'title' => $txt['language_configuration'],\n\t\t'description' => $txt['language_description'],\n\t);\n\n\t// Call the right function for this sub-acton.\n\t$subActions[$_REQUEST['sa']]();\n}", "protected function form()\n {\n $this->enType = config('MenuOp.enType');\n $this->extraOptions = config('MenuOp.extraOptions');\n $this->fansOptions = config('MenuOp.fansOptions');\n\n return Admin::form(RelevanceMenu::class, function (Form $form) {\n\n $imgArray = [config('materialPR') . 'icon'];\n $states = [\n 'on' => ['value' => 1, 'text' => '显示', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '隐藏', 'color' => 'default'],\n ];\n\n $form->tab('基本设置', function ($form) use ($imgArray, $states) {\n\n $form->text('caption', '菜单名称')->rules('required');\n $form->switch('status', '状态')->states($states);\n $form->url('url', '链接')->help('openid、rdid、libcode....所需参数会拼接在链接上');\n $form->text('custom_url', '定义链接');\n\n })->tab('高级参数设置', function ($form) {\n $sw = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'default']\n ];\n $form->switch('need_bind', '绑定读者')->states($sw);\n $form->checkbox('add_info', '粉丝信息')->options($this->fansOptions)->stacked();\n\n $form->switch('add_rdid', '读者证')->states($sw);\n $form->text('rdid_str', '参数名')->help('默认参数名: rdid');\n $form->switch('add_glc', '全局馆代码')->states($sw);\n $form->text('glc_str', '参数名')->help('默认参数名: glc');\n $form->switch('add_libcode', '分馆代码')->states($sw);\n $form->text('libcode_str', '参数名')->help('默认参数名: libcode');\n\n $form->text('signKey', 'signKey')->help('md5验证数据的可靠性,可以不填!');\n $form->radio('en_type', '加密类型')->options($this->enType)->default('0');\n\n })->tab('特殊参数设置', function ($form) {\n $form->embeds('extra', '特殊字段配置', function ($form) {\n\n $form->text('text1', '字段名');\n $form->select('source1', '数据源')->options($this->extraOptions);\n $form->text('data1', '数据')->help('非本系统数据需要填写这项,否则不会携带参数');\n $form->radio('enType1', '加密类型')->options($this->enType)->default('0');\n $form->text('enKey1', '加密Key')->help('留空则使用默认值');\n $form->divider();\n\n $form->text('text2', '字段名');\n $form->select('source2', '数据源')->options($this->extraOptions);\n $form->text('data2', '数据')->help('非本系统数据需要填写这项,否则不会携带参数');\n $form->radio('enType2', '加密类型')->options($this->enType)->default('0');\n $form->text('enKey2', '加密Key')->help('留空则使用默认值');\n $form->divider();\n\n $form->text('text3', '字段名');\n $form->select('source3', '数据源')->options($this->extraOptions);\n $form->text('data3', '数据')->help('非本系统数据需要填写这项,否则不会携带参数');\n $form->radio('enType3', '加密类型')->options($this->enType)->default('0');\n $form->text('enKey3', '加密Key')->help('留空则使用默认值');\n $form->divider();\n\n $form->text('text4', '字段名');\n $form->select('source4', '数据源')->options($this->extraOptions);\n $form->text('data4', '数据')->help('非本系统数据需要填写这项,否则不会携带参数');\n $form->radio('enType4', '加密类型')->options($this->enType)->default('0');\n $form->text('enKey4', '加密Key')->help('留空则使用默认值');\n\n });\n\n });;\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n });\n }", "function my_langs_in_search_form_2021( $the_form ) {\n\tglobal $xili_language;\n\n\tif ( $xili_language->multiple_lang ) {\n\t\t$form = str_replace( '</form>', '', $the_form ) . do_shortcode( \"[xili-multiple-lang-selector option='list']\" );\n\t} else {\n\t\t$form = str_replace( '</form>', '', $the_form ) . '<span class=\"xili-s-radio\">' . xiliml_langinsearchform( '<span class=\"radio-lang\">', '</span>', false ) . '</span>';\n\t}\n\t$form .= '</form>';\n\n\treturn $form;\n}", "function template_add_rule()\n{\n\tglobal $context, $settings, $options, $txt, $scripturl;\n\n\techo '\n\t<script type=\"text/javascript\"><!-- // --><![CDATA[\n\t\t\tvar criteriaNum = 0;\n\t\t\tvar actionNum = 0;\n\t\t\tvar groups = new Array()\n\t\t\tvar labels = new Array()';\n\n\tforeach ($context['groups'] as $id => $title)\n\t\techo '\n\t\t\tgroups[', $id, '] = \"', addslashes($title), '\";';\n\n\tforeach ($context['labels'] as $label)\n\t\tif ($label['id'] != -1)\n\t\t\techo '\n\t\t\tlabels[', ($label['id'] + 1), '] = \"', addslashes($label['name']), '\";';\n\n\techo '\n\t\t\tfunction addCriteriaOption()\n\t\t\t{\n\t\t\t\tif (criteriaNum == 0)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < document.forms.addrule.elements.length; i++)\n\t\t\t\t\t\tif (document.forms.addrule.elements[i].id.substr(0, 8) == \"ruletype\")\n\t\t\t\t\t\t\tcriteriaNum++;\n\t\t\t\t}\n\t\t\t\tcriteriaNum++\n\n\t\t\t\tsetOuterHTML(document.getElementById(\"criteriaAddHere\"), \\'<br /><select name=\"ruletype[\\' + criteriaNum + \\']\" id=\"ruletype\\' + criteriaNum + \\'\" onchange=\"updateRuleDef(\\' + criteriaNum + \\'); rebuildRuleDesc();\"><option value=\"\">', addslashes($txt['pm_rule_criteria_pick']), ':<\\' + \\'/option><option value=\"mid\">', addslashes($txt['pm_rule_mid']), '<\\' + \\'/option><option value=\"gid\">', addslashes($txt['pm_rule_gid']), '<\\' + \\'/option><option value=\"sub\">', addslashes($txt['pm_rule_sub']), '<\\' + \\'/option><option value=\"msg\">', addslashes($txt['pm_rule_msg']), '<\\' + \\'/option><option value=\"bud\">', addslashes($txt['pm_rule_bud']), '<\\' + \\'/option><\\' + \\'/select>&nbsp;<span id=\"defdiv\\' + criteriaNum + \\'\" style=\"display: none;\"><input type=\"text\" name=\"ruledef[\\' + criteriaNum + \\']\" id=\"ruledef\\' + criteriaNum + \\'\" onkeyup=\"rebuildRuleDesc();\" value=\"\" class=\"input_text\" /><\\' + \\'/span><span id=\"defseldiv\\' + criteriaNum + \\'\" style=\"display: none;\"><select name=\"ruledefgroup[\\' + criteriaNum + \\']\" id=\"ruledefgroup\\' + criteriaNum + \\'\" onchange=\"rebuildRuleDesc();\"><option value=\"\">', addslashes($txt['pm_rule_sel_group']), '<\\' + \\'/option>';\n\n\tforeach ($context['groups'] as $id => $group)\n\t\techo '<option value=\"', $id, '\">', strtr($group, array(\"'\" => \"\\'\")), '<\\' + \\'/option>';\n\n\techo '<\\' + \\'/select><\\' + \\'/span><span id=\"criteriaAddHere\"><\\' + \\'/span>\\');\n\t\t\t}\n\n\t\t\tfunction addActionOption()\n\t\t\t{\n\t\t\t\tif (actionNum == 0)\n\t\t\t\t{\n\t\t\t\t\tfor (var i = 0; i < document.forms.addrule.elements.length; i++)\n\t\t\t\t\t\tif (document.forms.addrule.elements[i].id.substr(0, 7) == \"acttype\")\n\t\t\t\t\t\t\tactionNum++;\n\t\t\t\t}\n\t\t\t\tactionNum++\n\n\t\t\t\tsetOuterHTML(document.getElementById(\"actionAddHere\"), \\'<br /><select name=\"acttype[\\' + actionNum + \\']\" id=\"acttype\\' + actionNum + \\'\" onchange=\"updateActionDef(\\' + actionNum + \\'); rebuildRuleDesc();\"><option value=\"\">', addslashes($txt['pm_rule_sel_action']), ':<\\' + \\'/option><option value=\"lab\">', addslashes($txt['pm_rule_label']), '<\\' + \\'/option><option value=\"del\">', addslashes($txt['pm_rule_delete']), '<\\' + \\'/option><\\' + \\'/select>&nbsp;<span id=\"labdiv\\' + actionNum + \\'\" style=\"display: none;\"><select name=\"labdef[\\' + actionNum + \\']\" id=\"labdef\\' + actionNum + \\'\" onchange=\"rebuildRuleDesc();\"><option value=\"\">', addslashes($txt['pm_rule_sel_label']), '<\\' + \\'/option>';\n\n\tforeach ($context['labels'] as $label)\n\t\tif ($label['id'] != -1)\n\t\t\techo '<option value=\"', ($label['id'] + 1), '\">', addslashes($label['name']), '<\\' + \\'/option>';\n\n\techo '<\\' + \\'/select><\\' + \\'/span><span id=\"actionAddHere\"><\\' + \\'/span>\\');\n\t\t\t}\n\n\t\t\tfunction updateRuleDef(optNum)\n\t\t\t{\n\t\t\t\tif (document.getElementById(\"ruletype\" + optNum).value == \"gid\")\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"defdiv\" + optNum).style.display = \"none\";\n\t\t\t\t\tdocument.getElementById(\"defseldiv\" + optNum).style.display = \"\";\n\t\t\t\t}\n\t\t\t\telse if (document.getElementById(\"ruletype\" + optNum).value == \"bud\" || document.getElementById(\"ruletype\" + optNum).value == \"\")\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"defdiv\" + optNum).style.display = \"none\";\n\t\t\t\t\tdocument.getElementById(\"defseldiv\" + optNum).style.display = \"none\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"defdiv\" + optNum).style.display = \"\";\n\t\t\t\t\tdocument.getElementById(\"defseldiv\" + optNum).style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction updateActionDef(optNum)\n\t\t\t{\n\t\t\t\tif (document.getElementById(\"acttype\" + optNum).value == \"lab\")\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"labdiv\" + optNum).style.display = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"labdiv\" + optNum).style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rebuild the rule description!\n\t\t\tfunction rebuildRuleDesc()\n\t\t\t{\n\t\t\t\t// Start with nothing.\n\t\t\t\tvar text = \"\";\n\t\t\t\tvar joinText = \"\";\n\t\t\t\tvar actionText = \"\";\n\t\t\t\tvar hadBuddy = false;\n\t\t\t\tvar foundCriteria = false;\n\t\t\t\tvar foundAction = false;\n\t\t\t\tvar curNum, curVal, curDef;\n\n\t\t\t\tfor (var i = 0; i < document.forms.addrule.elements.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (document.forms.addrule.elements[i].id.substr(0, 8) == \"ruletype\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif (foundCriteria)\n\t\t\t\t\t\t\tjoinText = document.getElementById(\"logic\").value == \\'and\\' ? ', JavaScriptEscape(' ' . $txt['pm_readable_and'] . ' '), ' : ', JavaScriptEscape(' ' . $txt['pm_readable_or'] . ' '), ';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tjoinText = \\'\\';\n\t\t\t\t\t\tfoundCriteria = true;\n\n\t\t\t\t\t\tcurNum = document.forms.addrule.elements[i].id.match(/\\d+/);\n\t\t\t\t\t\tcurVal = document.forms.addrule.elements[i].value;\n\t\t\t\t\t\tif (curVal == \"gid\")\n\t\t\t\t\t\t\tcurDef = document.getElementById(\"ruledefgroup\" + curNum).value.php_htmlspecialchars();\n\t\t\t\t\t\telse if (curVal != \"bud\")\n\t\t\t\t\t\t\tcurDef = document.getElementById(\"ruledef\" + curNum).value.php_htmlspecialchars();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurDef = \"\";\n\n\t\t\t\t\t\t// What type of test is this?\n\t\t\t\t\t\tif (curVal == \"mid\" && curDef)\n\t\t\t\t\t\t\ttext += joinText + ', JavaScriptEscape($txt['pm_readable_member']), '.replace(\"{MEMBER}\", curDef);\n\t\t\t\t\t\telse if (curVal == \"gid\" && curDef && groups[curDef])\n\t\t\t\t\t\t\ttext += joinText + ', JavaScriptEscape($txt['pm_readable_group']), '.replace(\"{GROUP}\", groups[curDef]);\n\t\t\t\t\t\telse if (curVal == \"sub\" && curDef)\n\t\t\t\t\t\t\ttext += joinText + ', JavaScriptEscape($txt['pm_readable_subject']), '.replace(\"{SUBJECT}\", curDef);\n\t\t\t\t\t\telse if (curVal == \"msg\" && curDef)\n\t\t\t\t\t\t\ttext += joinText + ', JavaScriptEscape($txt['pm_readable_body']), '.replace(\"{BODY}\", curDef);\n\t\t\t\t\t\telse if (curVal == \"bud\" && !hadBuddy)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext += joinText + ', JavaScriptEscape($txt['pm_readable_buddy']), ';\n\t\t\t\t\t\t\thadBuddy = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (document.forms.addrule.elements[i].id.substr(0, 7) == \"acttype\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif (foundAction)\n\t\t\t\t\t\t\tjoinText = ', JavaScriptEscape(' ' . $txt['pm_readable_and'] . ' '), ';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tjoinText = \"\";\n\t\t\t\t\t\tfoundAction = true;\n\n\t\t\t\t\t\tcurNum = document.forms.addrule.elements[i].id.match(/\\d+/);\n\t\t\t\t\t\tcurVal = document.forms.addrule.elements[i].value;\n\t\t\t\t\t\tif (curVal == \"lab\")\n\t\t\t\t\t\t\tcurDef = document.getElementById(\"labdef\" + curNum).value.php_htmlspecialchars();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurDef = \"\";\n\n\t\t\t\t\t\t// Now pick the actions.\n\t\t\t\t\t\tif (curVal == \"lab\" && curDef && labels[curDef])\n\t\t\t\t\t\t\tactionText += joinText + ', JavaScriptEscape($txt['pm_readable_label']), '.replace(\"{LABEL}\", labels[curDef]);\n\t\t\t\t\t\telse if (curVal == \"del\")\n\t\t\t\t\t\t\tactionText += joinText + ', JavaScriptEscape($txt['pm_readable_delete']), ';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If still nothing make it default!\n\t\t\t\tif (text == \"\" || !foundCriteria)\n\t\t\t\t\ttext = \"', $txt['pm_rule_not_defined'], '\";\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (actionText != \"\")\n\t\t\t\t\t\ttext += ', JavaScriptEscape(' ' . $txt['pm_readable_then'] . ' '), ' + actionText;\n\t\t\t\t\ttext = ', JavaScriptEscape($txt['pm_readable_start']), ' + text + ', JavaScriptEscape($txt['pm_readable_end']), ';\n\t\t\t\t}\n\n\t\t\t\t// Set the actual HTML!\n\t\t\t\tsetInnerHTML(document.getElementById(\"ruletext\"), text);\n\t\t\t}\n\t// ]]></script>';\n\n\techo '\n\t<form action=\"', $scripturl, '?action=pm;sa=manrules;save;in=', $context['in'], '\" method=\"post\" accept-charset=\"UTF-8\" name=\"addrule\" id=\"addrule\" class=\"flow_hidden\">\n\t\t<we:cat>', $context['in'] == 0 ? $txt['pm_add_rule'] : $txt['pm_edit_rule'], '</we:cat>\n\t\t<div class=\"roundframe\">\n\t\t\t\t<dl class=\"addrules\">\n\t\t\t\t\t<dt class=\"floatleft\">\n\t\t\t\t\t\t<strong>', $txt['pm_rule_name'], ':</strong><br />\n\t\t\t\t\t\t<span class=\"smalltext\">', $txt['pm_rule_name_desc'], '</span>\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd class=\"floatleft\">\n\t\t\t\t\t\t<input type=\"text\" name=\"rule_name\" value=\"', empty($context['rule']['name']) ? $txt['pm_rule_name_default'] : $context['rule']['name'], '\" size=\"50\" class=\"input_text\" />\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>', $txt['pm_rule_criteria'], '</legend>';\n\n\t// Add a dummy criteria to allow expansion for none js users.\n\t$context['rule']['criteria'][] = array('t' => '', 'v' => '');\n\n\t// For each criteria print it out.\n\t$isFirst = true;\n\tforeach ($context['rule']['criteria'] as $k => $criteria)\n\t{\n\t\tif (!$isFirst && $criteria['t'] == '')\n\t\t\techo '<div id=\"removeonjs1\">';\n\t\telseif (!$isFirst)\n\t\t\techo '<br />';\n\n\t\techo '\n\t\t\t\t\t<select name=\"ruletype[', $k, ']\" id=\"ruletype', $k, '\" onchange=\"updateRuleDef(', $k, '); rebuildRuleDesc();\">\n\t\t\t\t\t\t<option value=\"\">', $txt['pm_rule_criteria_pick'], ':</option>\n\t\t\t\t\t\t<option value=\"mid\" ', $criteria['t'] == 'mid' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_mid'], '</option>\n\t\t\t\t\t\t<option value=\"gid\" ', $criteria['t'] == 'gid' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_gid'], '</option>\n\t\t\t\t\t\t<option value=\"sub\" ', $criteria['t'] == 'sub' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_sub'], '</option>\n\t\t\t\t\t\t<option value=\"msg\" ', $criteria['t'] == 'msg' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_msg'], '</option>\n\t\t\t\t\t\t<option value=\"bud\" ', $criteria['t'] == 'bud' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_bud'], '</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span id=\"defdiv', $k, '\" ', !in_array($criteria['t'], array('gid', 'bud')) ? '' : 'style=\"display: none;\"', '>\n\t\t\t\t\t\t<input type=\"text\" name=\"ruledef[', $k, ']\" id=\"ruledef', $k, '\" onkeyup=\"rebuildRuleDesc();\" value=\"', in_array($criteria['t'], array('mid', 'sub', 'msg')) ? $criteria['v'] : '', '\" class=\"input_text\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<span id=\"defseldiv', $k, '\" ', $criteria['t'] == 'gid' ? '' : 'style=\"display: none;\"', '>\n\t\t\t\t\t\t<select name=\"ruledefgroup[', $k, ']\" id=\"ruledefgroup', $k, '\" onchange=\"rebuildRuleDesc();\">\n\t\t\t\t\t\t\t<option value=\"\">', $txt['pm_rule_sel_group'], '</option>';\n\n\t\tforeach ($context['groups'] as $id => $group)\n\t\t\techo '\n\t\t\t\t\t\t\t<option value=\"', $id, '\" ', $criteria['t'] == 'gid' && $criteria['v'] == $id ? 'selected=\"selected\"' : '', '>', $group, '</option>';\n\t\techo '\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</span>';\n\n\t\t// If this is the dummy we add a means to hide for non js users.\n\t\tif ($isFirst)\n\t\t\t$isFirst = false;\n\t\telseif ($criteria['t'] == '')\n\t\t\techo '</div>';\n\t}\n\n\techo '\n\t\t\t\t\t<span id=\"criteriaAddHere\"></span><br />\n\t\t\t\t\t<a href=\"#\" onclick=\"addCriteriaOption(); return false;\" id=\"addonjs1\" style=\"display: none;\">(', $txt['pm_rule_criteria_add'], ')</a>\n\t\t\t\t\t<br /><br />\n\t\t\t\t\t', $txt['pm_rule_logic'], ':\n\t\t\t\t\t<select name=\"rule_logic\" id=\"logic\" onchange=\"rebuildRuleDesc();\">\n\t\t\t\t\t\t<option value=\"and\" ', $context['rule']['logic'] == 'and' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_logic_and'], '</option>\n\t\t\t\t\t\t<option value=\"or\" ', $context['rule']['logic'] == 'or' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_logic_or'], '</option>\n\t\t\t\t\t</select>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>', $txt['pm_rule_actions'], '</legend>';\n\n\t// As with criteria - add a dummy action for \"expansion\".\n\t$context['rule']['actions'][] = array('t' => '', 'v' => '');\n\n\t// Print each action.\n\t$isFirst = true;\n\tforeach ($context['rule']['actions'] as $k => $action)\n\t{\n\t\tif (!$isFirst && $action['t'] == '')\n\t\t\techo '<div id=\"removeonjs2\">';\n\t\telseif (!$isFirst)\n\t\t\techo '<br />';\n\n\t\techo '\n\t\t\t\t\t<select name=\"acttype[', $k, ']\" id=\"acttype', $k, '\" onchange=\"updateActionDef(', $k, '); rebuildRuleDesc();\">\n\t\t\t\t\t\t<option value=\"\">', $txt['pm_rule_sel_action'] , ':</option>\n\t\t\t\t\t\t<option value=\"lab\" ', $action['t'] == 'lab' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_label'] , '</option>\n\t\t\t\t\t\t<option value=\"del\" ', $action['t'] == 'del' ? 'selected=\"selected\"' : '', '>', $txt['pm_rule_delete'] , '</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span id=\"labdiv', $k, '\">\n\t\t\t\t\t\t<select name=\"labdef[', $k, ']\" id=\"labdef', $k, '\" onchange=\"rebuildRuleDesc();\">\n\t\t\t\t\t\t\t<option value=\"\">', $txt['pm_rule_sel_label'], '</option>';\n\t\tforeach ($context['labels'] as $label)\n\t\t\tif ($label['id'] != -1)\n\t\t\t\techo '\n\t\t\t\t\t\t\t<option value=\"', ($label['id'] + 1), '\" ', $action['t'] == 'lab' && $action['v'] == $label['id'] ? 'selected=\"selected\"' : '', '>', $label['name'], '</option>';\n\n\t\techo '\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</span>';\n\n\t\tif ($isFirst)\n\t\t\t$isFirst = false;\n\t\telseif ($action['t'] == '')\n\t\t\techo '\n\t\t\t\t</div>';\n\t}\n\n\techo '\n\t\t\t\t\t<span id=\"actionAddHere\"></span><br />\n\t\t\t\t\t<a href=\"#\" onclick=\"addActionOption(); return false;\" id=\"addonjs2\" style=\"display: none;\">(', $txt['pm_rule_add_action'], ')</a>\n\t\t\t\t</fieldset>\n\t\t</div><br class=\"clear\" />\n\t\t<we:title>', $txt['pm_rule_description'], '</we:title>\n\t\t<div class=\"information\">\n\t\t\t<div id=\"ruletext\">', $txt['pm_rule_js_disabled'], '</div>\n\t\t</div>\n\t\t<div class=\"righttext\">\n\t\t\t<input type=\"hidden\" name=\"', $context['session_var'], '\" value=\"', $context['session_id'], '\" />\n\t\t\t<input type=\"submit\" name=\"save\" value=\"', $txt['pm_rule_save'], '\" class=\"button_submit\" />\n\t\t</div>\n\t</form>';\n\n\t// Now setup all the bits!\n\t\techo '\n\t<script type=\"text/javascript\"><!-- // --><![CDATA[';\n\n\tforeach ($context['rule']['criteria'] as $k => $c)\n\t\techo '\n\t\t\tupdateRuleDef(', $k, ');';\n\n\tforeach ($context['rule']['actions'] as $k => $c)\n\t\techo '\n\t\t\tupdateActionDef(', $k, ');';\n\n\techo '\n\t\t\trebuildRuleDesc();';\n\n\t// If this isn't a new rule and we have JS enabled remove the JS compatibility stuff.\n\tif ($context['in'])\n\t\techo '\n\t\t\tdocument.getElementById(\"removeonjs1\").style.display = \"none\";\n\t\t\tdocument.getElementById(\"removeonjs2\").style.display = \"none\";';\n\n\techo '\n\t\t\tdocument.getElementById(\"addonjs1\").style.display = \"\";\n\t\t\tdocument.getElementById(\"addonjs2\").style.display = \"\";';\n\n\techo '\n\t\t// ]]></script>';\n}", "protected function formElements()\n\t\t{\n\t\t\t$this->addFormElement(new Select('parent', 'Parent Category', static::getParentOptions($this)), \"Content\");\n\t\t\t$this->addFormElement((new Text('name', 'Name'))->setClasses('half first'), \"Content\" );\n\t\t\tparent::formElements();\n\t\t\t$this->addFormElement((new Text('title', 'Title <span>(Optional)</span>'))->setClasses('half'), \"Content\", 'slug');\n\t\t\t$this->addFormElement(new Textarea('description', 'Description'), \"Content\");\n\t\t\t$this->addFormElement(new ImageElement(\"image\", \"Image\"), \"Content\");\n\n\t\t\t$this->addFormElement(new Text('metaTitle', 'Meta Title'), 'Metadata');\n\t\t\t$this->addFormElement(new Textarea('metaDescription', 'Meta Description'), 'Metadata');\n\t\t}", "function ctools_vocabulary_terms_content_type_edit_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-cogs\"></i>',\n 'label' => $this->l('Fee Porcent'),\n 'name' => 'COD_PORCENT_FEE',\n 'desc' => $this->l('Assign a porcent value to calculate the fee'),\n ),\n array(\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-cogs\"></i>',\n 'label' => $this->l('Fee Fixed Amount'),\n 'name' => 'COD_FIXED_FEE',\n 'desc' => $this->l('Assign a fixed value to calculate the fee'),\n ),\n array(\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-cogs\"></i>',\n 'label' => $this->l('ID Product Fee'),\n 'name' => 'COD_IDPRODUCT_FEE',\n 'desc' => $this->l('Assign a product to the fee'),\n ),\n \n \n// by Jesús\n \n \n array(\n 'type' => 'radio',\n 'label' => $this->l('Radio Button'),\n 'name' => 'Radio Button',\n 'default_value' => 0,\n 'values' => array(\n array(\n 'id' => 'radio1',\n 'value' => 0,\n 'label' => $this->l('radio1')),\n array(\n 'id' => 'radio2',\n 'value' => 1,\n 'label' => $this->l('radio2')),\n array(\n 'id' => 'radio3',\n 'value' => 2,\n 'label' => $this->l('radio3')),\n ),\n 'validation' => 'isUnsignedInt',\n ),\n \n $arrCheck = array(\n array(\n 'id_option' => 1, \n 'name' => 'Method 1' \n ),\n array(\n 'id_option' => 2,\n 'name' => 'Method 2'\n ),\n ),\n \n \n array(\n 'type' => 'checkbox', \n 'label' => $this->l('Options'), \n 'desc' => $this->l('Choose options.'), \n 'name' => 'checkbox', \n 'values' => array(\n 'query' => $arrCheck, \n 'id' => 'id_option', \n 'name' => 'name' \n ),\n ),\n \n array(\n 'type' => 'file',\n 'label' => $this->l('Select a file:'),\n 'desc' => $this->l('file: jpeg, png, jpg, gif.'),\n 'name' => 'testfile',\n 'required' => true,\n 'lang' => false,\n 'display_image' => true,\n ),\n \n array(\n 'type' => 'textarea',\n 'label' => $this->l('textarea:'),\n 'name' => 'description',\n 'autoload_rte' => true,\n 'desc' => $this->l('textarea')\n ),\n \n array(\n 'type' => 'color',\n 'label' => $this->l('Color:'),\n 'name' => 'caption_color',\n 'size' => 33,\n 'validation' => 'isColor',\n ),\n \n array(\n 'type' => 'select',\n 'label' => $this->l('Select:'),\n 'name' => 'select',\n 'required' => true,\n 'options' => array(\n 'query' => $arrCheck,\n 'id' => 'id_feature',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('New switc'),\n 'name' => 'Switch Input',\n 'class' => 'fixed-width-xs',\n 'desc' => $this->l('InputSwitch.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes')\n ),\n array(\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No')\n )\n ),\n ),\n \n \n// end Jesús\n \n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n \n ),\n );\n }", "public function setLanguage($language) { $this->language = $language ; }", "public function init_form_fields() {\r\n\t\t$this->form_fields = array(\r\n\t\t\t'enabled' => array(\r\n\t\t\t\t'title' => __( 'Activer/Désactiver', 'b_pay-payments-woo' ),\r\n\t\t\t\t'label' => __( 'Activer le mode de paiement b_pay', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t'description' => '',\r\n\t\t\t\t'default' => 'no',\r\n\t\t\t),\r\n\t\t\t'title' => array(\r\n\t\t\t\t'title' => __( 'Titre', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'description' => __( 'Le titre du mode de paiement que verra le lient lors de la commande.', 'b_pay-payments-woo' ),\r\n\t\t\t\t'default' => __( 'b_pay', 'b_pay-payments-woo' ),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t),\r\n\t\t\t'dev_key' => array(\r\n\t\t\t\t'title' => __( 'Dev_key', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'description' => __( 'Ajouter votre dev_key b_pay', 'b_pay-payments-woo' ),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t),\r\n\t\t\t'business_key' => array(\r\n\t\t\t\t'title' => __( 'Business_key', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'description' => __( 'Ajouter votre business_key b_pay', 'b_pay-payments-woo' ),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t),\r\n\t\t\t'description' => array(\r\n\t\t\t\t'title' => __( 'Description', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'textarea',\r\n\t\t\t\t'description' => __( 'méthode de paiement que verra le client sur le site.', 'b_pay-payments-woo' ),\r\n\t\t\t\t'default' => __( 'effectuer le paiement via b_pay avant la livraison.', 'b_pay-payments-woo' ),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t),\r\n\t\t\t'instructions' => array(\r\n\t\t\t\t'title' => __( 'Instructions', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'textarea',\r\n\t\t\t\t'description' => __( 'Instructions that will be added to the thank you page.', 'b_pay-payments-woo' ),\r\n\t\t\t\t'default' => __( 'b_pay Mobile Payments before delivery.', 'b_pay-payments-woo' ),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t),\r\n\t\t\t'enable_for_methods' => array(\r\n\t\t\t\t'title' => __( 'Enable for shipping methods', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'multiselect',\r\n\t\t\t\t'class' => 'wc-enhanced-select',\r\n\t\t\t\t'css' => 'width: 400px;',\r\n\t\t\t\t'default' => '',\r\n\t\t\t\t'description' => __( 'If b_pay is only available for certain methods, set it up here. Leave blank to enable for all methods.', 'b_pay-payments-woo' ),\r\n\t\t\t\t// 'options' => $this->load_shipping_method_options(),\r\n\t\t\t\t'desc_tip' => true,\r\n\t\t\t\t'custom_attributes' => array(\r\n\t\t\t\t\t'data-placeholder' => __( 'Select shipping methods', 'b_pay-payments-woo' ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'enable_for_virtual' => array(\r\n\t\t\t\t'title' => __( 'Accept for virtual orders', 'b_pay-payments-woo' ),\r\n\t\t\t\t'label' => __( 'Accept b_pay if the order is virtual', 'b_pay-payments-woo' ),\r\n\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t'default' => 'yes',\r\n\t\t\t),\r\n\t\t);\r\n\t}", "protected function setupMultilingual() {\n // Add a new language.\n ConfigurableLanguage::createFromLangcode('fr')->save();\n }", "public function _getTableCreateLanguage()\n\t{\n\t\t$optionmenu \t\t\t= new stdClass();\n\t\t$optionmenu->title_form = \"Create Language\";\n $html = '<form id=\"form-params\" class=\"row-fluid \">';\n\t\t$html.= '<input type=\"hidden\" name=\"task\" value=\"create-language\">';\n\t\t$html.= '<fieldset>';\n\t\t$html.= '<legend></legend>'; \n $html.= '<div id=\"facebook-admin-box\" class=\"facebook-admin-box input-prepend \">';\n\t\t$html.= '<span class=\"add-on facebook-admin-title span3\"><strong>Code:</strong></span>';\n\t\t$html.= '<input type=\"text\" class=\"span4 facebook-admin-input\" name=\"code\" value=\"\" />';\n\t\t$html.= '<a class=\"info-param-tooltip\" data-content=\"Code\" title=\"\" href=\"#\" data-original-title=\"¿Cómo configurar?\"><i class=\"icon-info-sign\"></i></a>';\n\t\t$html.= '</div>';\n\t\t$html.= '<div id=\"facebook-admin-box\" class=\"facebook-admin-box input-prepend \">';\n\t\t$html.= '<span class=\"add-on facebook-admin-title span3\"><strong>Title:</strong></span>';\n\t\t$html.= '<input type=\"text\" class=\"span4 facebook-admin-input\" name=\"Title\" value=\"\" />';\n\t\t$html.= '<a class=\"info-param-tooltip\" data-content=\"Title\" title=\"\" href=\"#\" data-original-title=\"¿Cómo configurar?\"><i class=\"icon-info-sign\"></i></a>';\n\t\t$html.= '</div>';\n\t\t$html.= '<legend></legend>';\n\t\t$html.= '<fieldset>';\n\t\t//$campos=$this->_get_fieldsMenu($app,$prefix,$idmenu);\n\t\t//$html.=$campos;\n\t\t$html.='</fieldset>';\n\t\t$html.= '<div class=\"controls\"><button type=\"submit\" class=\"btn btn btn-inverse\"><i class=\"icon-ok-sign icon-white\"></i> Guardar</button></div>';\n\t\t$html.= '</fieldset>';\n\t\t$html.= '</form>';\n \n\t\t$optionmenu->form = $html;\n\t\treturn $optionmenu;\n\t}", "public function setLanguage($value);", "protected function addFieldLocale(FormBuilderInterface $builder)\n {\n $builder->add('locale', 'choice', [\n 'choices' => $this->getValuesAsArray($this->localeRepository->getActivatedLocaleCodes()),\n 'required' => false,\n 'multiple' => false,\n 'select2' => true,\n 'attr' => [\n 'class' => 'action-field-locale',\n ],\n ]);\n }", "function crealead_info_meetings_settings_form() {\n// $types = node_type_get_types();\n// unset($types['warning']);\n//\n// $options = array();\n// foreach ($types as $type=>$obj) {\n// $options[$type] = $obj->name;\n// }\n// asort($options);\n//\n// $form['crealead_warnings']['warning_content_types'] = array(\n// '#type' => 'checkboxes',\n// '#title' => t('Types de contenu'),\n// '#options' => $options,\n// '#theme_options' => array(\n// 'description at top' => '<p>Sélectionnez le ou les types de contenu pour lesquels les utilisateurs pourront créer des alertes.</p>',\n// ),\n// '#default_value' => variable_get('warning_content_types', array('need'=>'need')),\n// );\n\n\n // 1 - Texte du courriel envoyé aux inscrits à une réunion d'info.\n $form['crealead_info_meetings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Envoi de courriel aux inscrits'),\n );\n\n $form['crealead_info_meetings']['info_meeting_default_email_body'] = array(\n '#type' => 'textarea',\n '#title' => t('Texte du message'),\n '#description' => 'Texte à fournir par défaut pour tout message à envoyer aux inscrits à une réunion.',\n '#default_value' => variable_get('info_meeting_default_email_body', ''),\n );\n\n // 2 - Texte du programme d'une réunion d'info.\n $form['crealead_info_meetings_prog'] = array(\n '#type' => 'fieldset',\n '#title' => t('Programme d\\'une réunion'),\n );\n\n $programme_text = variable_get('programme_default_text', null);\n if ($programme_text) {\n $programme_text_default_value = $programme_text['value'];\n }\n else {\n $programme_text_default_value = 'Le texte du programme est à rédiger.';\n }\n $form['crealead_info_meetings_prog']['programme_default_text'] = array(\n '#type' => 'text_format',\n '#title' => t('Texte du programme (visible dans la page Les réunions d\\'information)'),\n '#default_value' => $programme_text_default_value,\n );\n\n // 3 - Plans d'accès pour chaque ville.\n $form['crealead_info_meetings_maps'] = array(\n '#type' => 'fieldset',\n '#title' => t('Plans d\\'accès'),\n );\n\n // 3.1 - Montpellier\n $mo_map = variable_get('meetings_default_map_mo', null);\n if ($mo_map) {\n $mo_map_default_value = $mo_map['value'];\n }\n else {\n $mo_map_default_value = 'Vous devez saisir ici le code IFRAME pour la carte Google de Montpellier.';\n }\n $form['crealead_info_meetings_maps']['meetings_default_map_mo'] = array(\n '#type' => 'text_format',\n '#title' => t('Montpellier'),\n '#default_value' => $mo_map_default_value,\n );\n\n // 3.2 - Nîmes\n $ni_map = variable_get('meetings_default_map_ni', null);\n if ($ni_map) {\n $ni_map_default_value = $ni_map['value'];\n }\n else {\n $ni_map_default_value = 'Vous devez saisir ici le code IFRAME pour la carte Google de Nîmes.';\n }\n $form['crealead_info_meetings_maps']['meetings_default_map_ni'] = array(\n '#type' => 'text_format',\n '#title' => t('Nîmes'),\n '#default_value' => $ni_map_default_value,\n );\n\n // 3.3 - Sète\n $se_map = variable_get('meetings_default_map_se', null);\n if ($se_map) {\n $se_map_default_value = $se_map['value'];\n }\n else {\n $se_map_default_value = 'Vous devez saisir ici le code IFRAME pour la carte Google de Sète.';\n }\n $form['crealead_info_meetings_maps']['meetings_default_map_se'] = array(\n '#type' => 'text_format',\n '#title' => t('Sète'),\n '#default_value' => $se_map_default_value,\n );\n\n return system_settings_form($form);\n}", "function ModifyLanguages()\n{\n\tglobal $txt, $context, $scripturl;\n\tglobal $sourcedir, $language, $boarddir;\n\n\t// Setting a new default?\n\tif (!empty($_POST['set_default']) && !empty($_POST['def_language']))\n\t{\n\t\tcheckSession();\n\n\t\tif ($_POST['def_language'] != $language)\n\t\t{\n\t\t\trequire_once($sourcedir . '/lib/Subs-Admin.php');\n\t\t\tupdateSettingsFile(array('language' => '\\'' . $_POST['def_language'] . '\\''));\n\t\t\t$language = $_POST['def_language'];\n\t\t}\n\t}\n\n\t$listOptions = array(\n\t\t'id' => 'language_list',\n\t\t'items_per_page' => 20,\n\t\t'base_href' => $scripturl . '?action=admin;area=languages',\n\t\t'title' => $txt['edit_languages'],\n\t\t'get_items' => array(\n\t\t\t'function' => 'list_getLanguages',\n\t\t),\n\t\t'get_count' => array(\n\t\t\t'function' => 'list_getNumLanguages',\n\t\t),\n\t\t'columns' => array(\n\t\t\t'default' => array(\n\t\t\t\t'header' => array(\n\t\t\t\t\t'value' => $txt['languages_default'],\n\t\t\t\t),\n\t\t\t\t'data' => array(\n\t\t\t\t\t'function' => create_function('$rowData', '\n\t\t\t\t\t\treturn \\'<input type=\"radio\" name=\"def_language\" value=\"\\' . $rowData[\\'id\\'] . \\'\" \\' . ($rowData[\\'default\\'] ? \\'checked=\"checked\"\\' : \\'\\') . \\' onclick=\"highlightSelected(\\\\\\'list_language_list_\\' . $rowData[\\'id\\'] . \\'\\\\\\');\" class=\"input_radio\" />\\';\n\t\t\t\t\t'),\n\t\t\t\t\t'style' => 'text-align: center; width: 8%;',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'header' => array(\n\t\t\t\t\t'value' => $txt['languages_lang_name'],\n\t\t\t\t),\n\t\t\t\t'data' => array(\n\t\t\t\t\t'function' => create_function('$rowData', '\n\t\t\t\t\t\tglobal $scripturl, $context;\n\n\t\t\t\t\t\treturn sprintf(\\'<a href=\"%1$s?action=admin;area=languages;sa=editlang;lid=%2$s\">%3$s</a>\\', $scripturl, $rowData[\\'id\\'], $rowData[\\'name\\']);\n\t\t\t\t\t'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'character_set' => array(\n\t\t\t\t'header' => array(\n\t\t\t\t\t'value' => $txt['languages_character_set'],\n\t\t\t\t),\n\t\t\t\t'data' => array(\n\t\t\t\t\t'db_htmlsafe' => 'char_set',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'count' => array(\n\t\t\t\t'header' => array(\n\t\t\t\t\t'value' => $txt['languages_users'],\n\t\t\t\t),\n\t\t\t\t'data' => array(\n\t\t\t\t\t'db_htmlsafe' => 'count',\n\t\t\t\t\t'style' => 'text-align: center',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'locale' => array(\n\t\t\t\t'header' => array(\n\t\t\t\t\t'value' => $txt['languages_locale'],\n\t\t\t\t),\n\t\t\t\t'data' => array(\n\t\t\t\t\t'db_htmlsafe' => 'locale',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t\t'form' => array(\n\t\t\t'href' => $scripturl . '?action=admin;area=languages',\n\t\t),\n\t\t'additional_rows' => array(\n\t\t\tarray(\n\t\t\t\t'position' => 'below_table_data',\n\t\t\t\t'value' => '<input type=\"hidden\" name=\"' . $context['session_var'] . '\" value=\"' . $context['session_id'] . '\" /><input type=\"submit\" name=\"set_default\" value=\"' . $txt['save'] . '\"' . (is_writable($boarddir . '/Settings.php') ? '' : ' disabled=\"disabled\"') . ' class=\"button_submit\" />',\n\t\t\t\t'style' => 'text-align: right;',\n\t\t\t),\n\t\t),\n\t\t// For highlighting the default.\n\t\t'javascript' => '\n\t\t\t\t\tvar prevClass = \"\";\n\t\t\t\t\tvar prevDiv = \"\";\n\t\t\t\t\tfunction highlightSelected(box)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (prevClass != \"\")\n\t\t\t\t\t\t\tprevDiv.className = prevClass;\n\n\t\t\t\t\t\tprevDiv = document.getElementById(box);\n\t\t\t\t\t\tprevClass = prevDiv.className;\n\n\t\t\t\t\t\tprevDiv.className = \"highlight2\";\n\t\t\t\t\t}\n\t\t\t\t\thighlightSelected(\"list_language_list_' . ($language == '' ? 'english' : $language). '\");\n\t\t',\n\t);\n\n\t// Display a warning if we cannot edit the default setting.\n\tif (!is_writable($boarddir . '/Settings.php'))\n\t\t$listOptions['additional_rows'][] = array(\n\t\t\t\t'position' => 'after_title',\n\t\t\t\t'value' => $txt['language_settings_writable'],\n\t\t\t\t'class' => 'smalltext alert',\n\t\t\t);\n\n\trequire_once($sourcedir . '/lib/Subs-List.php');\n\tcreateList($listOptions);\n\n\t$context['sub_template'] = 'show_list';\n\t$context['default_list'] = 'language_list';\n}", "protected function addElements() \n {\n // Add \"old_password\" field\n $this->add([ \n 'type' => 'password',\n 'name' => 'current_password',\n 'options' => [\n 'label' => 'user_current_password_label',\n ],\n ]);\n // Add \"new_password\" field\n $this->add([ \n 'type' => 'password',\n 'name' => 'new_password',\n 'options' => [\n 'label' => 'user_new_password_label',\n ],\n ]);\n // Add \"confirm_new_password\" field\n $this->add([ \n 'type' => 'password',\n 'name' => 'confirm_new_password',\n 'options' => [\n 'label' => 'user_confirm_new_password_label',\n ],\n ]);\n // Add the CSRF field\n $this->add([\n 'type' => 'csrf',\n 'name' => 'csrf',\n 'options' => [\n 'csrf_options' => [\n 'timeout' => 600\n ]\n ],\n ]);\n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'user_submit_value_save',\n ],\n ]);\n }", "private function loadForm()\n {\n $this->frm = new BackendForm('settings');\n\n $this->frm->addCheckbox('enabled', BackendModel::getModuleSetting($this->URL->getModule(), 'enabled', false));\n $this->frm->addCheckbox('log', BackendModel::getModuleSetting($this->URL->getModule(), 'log', true));\n $this->frm->addCheckbox('add_data', BackendModel::getModuleSetting($this->URL->getModule(), 'add_data', true));\n }", "function jr_translate_add_pages() {\r\n add_options_page('JR Translate', 'JR Translate', 'administrator', 'jr_translate', 'jr_translate_options_page');\r\n}", "protected function form() {\n\t\treturn Admin::form( Option::class, function ( Form $form ) {\n\t\t\t$form->hidden( 'key[]' )->value( 'fees' );\n\t\t\t$form->textarea( 'text[]', 'المصاريف' )->value( $this->getValueByKey( 'fees' ) );\n\t\t\t$form->hidden( 'key[]' )->value( 'about_us' );\n\t\t\t$form->textarea( 'text[]', 'عن التطبيق' )->value( $this->getValueByKey( 'about_us' ) );\n\t\t\t$form->hidden( 'key[]' )->value( 'privacy_policy' );\n\t\t\t$form->textarea( 'text[]', 'سياسية الخصوصية' )->value( $this->getValueByKey( 'privacy_policy' ) );\n\t\t\t$form->hidden( 'key[]' )->value( 'terms' );\n\t\t\t$form->textarea( 'text[]', 'الشروط والأحكام' )->value( $this->getValueByKey( 'terms' ) );\n\t\t\t$form->hidden( 'key[]' )->value( 'faq' );\n\t\t\t$form->textarea( 'text[]', 'الأسألة الشائعة' )->value( $this->getValueByKey( 'faq' ) );\n\t\t\t$form->hidden( 'key[]' )->value( 'notes' );\n\t\t\t$form->textarea( 'text[]', 'الملاحظات' )->value( $this->getValueByKey( 'notes' ) );\n\n\t\t} );\n\t}", "protected function addElements() \n { \n // Add \"libele\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'description',\n 'attributes' => [\n 'id' => 'description',\n 'style' => 'width: 100%'\n ],\n 'options' => [\n 'label' => 'Déscription:',\n ],\n ]);\n \n // Add \"annee scolaire\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'anneescolaire',\n 'options' => [\n 'label' => 'Année Scolaire:',\n 'empty_option' => 'Choisir',\n 'value_options' => [ \n ],\n ],\n 'attributes' => [\n 'id' => 'anneescolaire',\n 'style' => 'width: 100%'\n ],\n ]);\n \n // Add \"date_debut\" field\n \n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Date',\n 'name' => 'date_debut',\n 'create_empty_option' => false,\n 'options' => [\n 'label' => 'Date Début:',\n 'create_empty_option' => false\n \n \n ],\n 'attributes' => [\n 'id' => 'date_debut',\n 'style' => 'width: 100%'\n ] \n ));\n \n // Add \"date_debut\" field\n \n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Date',\n 'name' => 'date_fin',\n 'create_empty_option' => false,\n 'options' => [\n 'label' => 'Date Fin:',\n 'create_empty_option' => false\n ],\n 'attributes' => [\n 'id' => 'date_fin',\n 'style' => 'width: 100%'\n ] \n ));\n \n // Add \"periode decisionnelle\" field\n \n $this->add([ \n 'type' => 'select',\n 'name' => 'pdecisionnelle',\n 'options' => [\n 'label' => 'Type periode:',\n 'value_options' => [ \n ],\n ],\n 'attributes' => [\n 'id' => 'pdecisionnelle',\n 'style' => 'width: 50%'\n ],\n ]);\n \n \n // Add \"comment\" field\n $this->add([ \n 'type' => 'textarea',\n 'name' => 'commentaires',\n 'options' =>[\n 'label' => 'Commentaires:',\n ],\n 'attributes' => [\n 'id' => 'commentaires',\n 'style' => 'width: 100%'\n ], \n ]);\n \n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Enregistrer',\n 'id' => 'submitbutton',\n ],\n ]); \n \n }", "public function setLanguage($language);", "public function setLanguage($language);", "public function setLanguage($language);", "public function page_submit_lang()\n\t{\n\t\t$tmp_lg = $this->page_load_lang($this->language);\n\t\t$lang = $this->get_cache_lang();\n\t\t$delete_keys = array();\n\t\tforeach ($_POST AS $key => $value)\n\t\t{\n\t\t\tif (preg_match('/^lg_(.+)$/si', $key, $match))\n\t\t\t{\n\t\t\t\tif (isset($lang[$match[1]]) && $tmp_lg[$match[1]] == stripslashes($value))\n\t\t\t\t{\n\t\t\t\t\t$delete_keys[] = $match[1];\n\t\t\t\t}\n\t\t\t\telse if (!isset($tmp_lg[$match[1]]) || $tmp_lg[$match[1]] != stripslashes($value))\n\t\t\t\t{\n\t\t\t\t\tFsb::$db->insert('langs', array(\n\t\t\t\t\t\t'lang_name' =>\t\tarray($this->language, true),\n\t\t\t\t\t\t'lang_key' =>\t\tarray($match[1], true),\n\t\t\t\t\t\t'lang_value' =>\t\t$value,\n\t\t\t\t\t), 'REPLACE', true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFsb::$db->query_multi_insert();\n\n\t\t// Suppression de la base de donnee des clefs de langues identiques a leur valeur dans le fichier de langue\n\t\tif ($delete_keys)\n\t\t{\n\t\t\t$delete_keys = array_map(array(Fsb::$db, 'escape'), $delete_keys);\n\t\t\t$sql = 'DELETE FROM ' . SQL_PREFIX . 'langs\n\t\t\t\t\t\tWHERE lang_key IN (\\'' . implode('\\', \\'', $delete_keys) . '\\')';\n\t\t\tFsb::$db->query($sql);\n\t\t}\n\t\tFsb::$db->destroy_cache('langs_');\n\n\t\tLog::add(Log::ADMIN, 'lang_log_submit', $this->language);\n\t\tDisplay::message('adm_lang_well_submit', 'index.' . PHPEXT . '?p=general_lang', 'general_lang');\n\t}", "protected function initForm()\n {\n $this->fields_form = [\n 'legend' => [\n 'title' => $this->l('Referral program settings'),\n ],\n 'input' => [\n [\n 'name' => GamificationsConfig::REFERRAL_REWARD,\n 'label' => $this->l('Referrer reward'),\n 'hint' => $this->l('Reward that referrer will get'),\n 'type' => 'select',\n 'options' => [\n 'query' => $this->getRewardsSelect(),\n 'id' => 'id_gamifications_reward',\n 'name' => 'name',\n ],\n ],\n [\n 'name' => GamificationsConfig::REFERRAL_REWARD_TIME,\n 'label' => $this->l('Reward referrer when'),\n 'hint' => $this->l('Time when referrer customer gets reward for inviting new customer'),\n 'type' => 'radio',\n 'values' => [\n [\n 'id' => GamificationsConfig::REFERRAL_REWARD_TIME.'_on_registration',\n 'value' => GamificationsActivity::REFERRAL_REWARD_ON_NEW_CUSTOMER_REGISTRATION,\n 'label' => $this->l('new customer registers'),\n ],\n [\n 'id' => GamificationsConfig::REFERRAL_REWARD_TIME.'_on_order',\n 'value' => GamificationsActivity::REFERRAL_REWARD_ON_NEW_CUSTOMER_ORDER,\n 'label' => $this->l('new customer places order'),\n ],\n ],\n ],\n [\n 'type' => 'swap',\n 'label' => $this->l('New customer order state'),\n 'hint' => $this->l('Reward referrer customer when new customer\\'s order state is one of selected'),\n 'name' => GamificationsConfig::REFERRAL_NEW_CUSTOMER_ORDER_STATES,\n 'multiple' => true,\n 'options' => [\n 'query' => OrderState::getOrderStates($this->context->language->id),\n 'id' => 'id_order_state',\n 'name' => 'name'\n ],\n ],\n [\n 'name' => GamificationsConfig::REFERRAL_NEW_CUSTOMER_REWARD_ENABLED,\n 'label' => $this->l('Reward new customer'),\n 'hint' => $this->l('Enabled if you want to reward new customer'),\n 'type' => 'switch',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes'),\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No'),\n ],\n ],\n ],\n [\n 'name' => GamificationsConfig::REFERRAL_NEW_CUSTOMER_REWARD,\n 'label' => $this->l('New customer reward'),\n 'hint' => $this->l('Reward that referrer will get'),\n 'type' => 'select',\n 'options' => [\n 'query' => $this->getRewardsSelect(),\n 'id' => 'id_gamifications_reward',\n 'name' => 'name',\n ],\n ],\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n ],\n ];\n }", "public function buildForm()\n {\n $this\n ->addSelect(\n 'default_currency',\n $this->getCodeList('Currency', 'Organization'),\n trans('elementForm.default_currency'),\n $this->addHelpText('activity_defaults-default_currency', false),\n null,\n true\n )\n ->addSelect(\n 'default_language',\n $this->getCodeList('Language', 'Organization'),\n trans('elementForm.default_language'),\n $this->addHelpText('activity_defaults-default_language', false),\n config('app.default_language'),\n true\n )\n ->add('default_hierarchy', 'text', ['label' => trans('elementForm.default_hierarchy'), 'help_block' => $this->addHelpText('activity_defaults-hierarchy', false)])\n ->add(\n 'linked_data_uri',\n 'text',\n [\n 'label' => trans('elementForm.linked_data_uri'),\n ]\n )\n ->addSelect(\n 'default_collaboration_type',\n $this->getCodeList('CollaborationType', 'Organization'),\n trans('elementForm.default_collaboration_type'),\n $this->addHelpText('activity_defaults-default_collaboration_type', false)\n )\n ->addSelect('default_flow_type', $this->getCodeList('FlowType', 'Organization'), trans('elementForm.default_flow_type'), $this->addHelpText('activity_defaults-default_flow_type', false))\n ->addSelect(\n 'default_finance_type',\n $this->getCodeList('FinanceType', 'Organization'),\n trans('elementForm.default_finance_type'),\n $this->addHelpText('activity_defaults-default_finance_type', false)\n )\n ->addSelect('default_aid_type', $this->getCodeList('AidType', 'Organization'), trans('elementForm.default_aid_type'), $this->addHelpText('activity_defaults-default_aid_type', false))\n ->addSelect(\n 'default_tied_status',\n $this->getCodeList('TiedStatus', 'Organization'),\n trans('elementForm.default_tied_status'),\n $this->addHelpText('activity_defaults-default_tied_status', false)\n )\n ->addSelect('humanitarian', ['1' => trans('elementForm.yes'), '0' => trans('elementForm.no')]);\n }", "private function addForm()\n {\n $form = $this->Form();\n $parent = $this->Forms()->findOneBy(['name' => 'Frontend']);\n $form->setParent($parent);\n $form->setElement('checkbox', 'show', [\n 'label' => 'Tag-Cloud anzeigen',\n 'value' => true,\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n $form->setElement('text', 'controller', [\n 'label' => 'Controller-Auswahl',\n 'value' => 'index, listing',\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n $form->setElement('text', 'tagCloudClass', [\n 'label' => 'Name der Tag-Klasse',\n 'value' => 'tag',\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n $form->setElement('number', 'tagCloudMax', [\n 'label' => 'Maximale Anzahl Begriffe',\n 'value' => 46,\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n $form->setElement('number', 'tagCloudSplit', [\n 'label' => 'Anzahl der Stufen',\n 'value' => 3,\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n $form->setElement('number', 'tagTime', [\n 'label' => 'Die berücksichtigte Zeit in Tagen',\n 'value' => 30,\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n ]);\n }", "protected function addTagLabelToLanguageFile()\n {\n $files = $this->getFiles(\"custom/modulebuilder/builds/*/SugarModules/modules/*/language/en_us.lang.php\");\n\n foreach ($files as $file) {\n $data = $this->getDataForLanguageFile($file);\n if (!empty($data)) {\n $this->saveFileData('mod_strings', $data, $file);\n }\n }\n }", "public function SettingForm() \n { \n $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');\n $this->fields_form[0]['form'] = array(\n 'legend' => array(\n 'title' => $this->l('Setting'),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'button',\n ),\n );\n $this->fields_form[0]['form']['input'][] = array(\n 'type' => 'text',\n 'label' => $this->l('Title'),\n 'name' => 'thnxbc_title',\n 'lang' => true,\n );\n $this->fields_form[0]['form']['input'][] = array(\n 'type' => 'text',\n 'label' => $this->l('How Many Category You Want To Display'),\n 'name' => 'thnxbc_tagcount',\n );\n $helper = new HelperForm();\n $helper->module = $this;\n $helper->name_controller = $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;\n foreach (Language::getLanguages(false) as $lang) { \n $helper->languages[] = array(\n 'id_lang' => $lang['id_lang'],\n 'iso_code' => $lang['iso_code'],\n 'name' => $lang['name'],\n 'is_default' => ($default_lang == $lang['id_lang'] ? 1 : 0),\n );\n }\n $helper->toolbar_btn = array(\n 'save' => array(\n 'desc' => $this->l('Save'),\n 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . 'token=' . Tools::getAdminTokenLite('AdminModules'),\n ),\n );\n $helper->default_form_language = $default_lang;\n $helper->allow_employee_form_lang = $default_lang;\n $helper->title = $this->displayName;\n $helper->show_toolbar = true;\n $helper->toolbar_scroll = true;\n $helper->submit_action = 'save' . $this->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $lang) { \n $helper->fields_value['thnxbc_title'][$lang['id_lang']] = Configuration::get('thnxbc_title_'.$lang['id_lang']);\n }\n $helper->fields_value['thnxbc_tagcount'] = Configuration::get('thnxbc_tagcount');\n return $helper;\n }", "protected function getConfigFormAdvanced()\n {\n // var_dump($currencies);exit;\n return array(\n 'form' => array(\n \n 'input' => array(\n array(\n 'type' => $this->switch,\n 'class' => 't',\n 'label' => $this->l('Unique Cache per Country'),\n 'name' => 'EXPRESSCACHE_UNIQUECOUNTRY',\n 'is_bool' => true,\n 'desc' => $this->l('Enable this if your shop shows different content based on the country a user is visiting from.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n ),\n ),\n ),\n array(\n 'type' => $this->switch,\n 'class' => 't',\n 'label' => $this->l('Enable Customer Group Caching'),\n 'name' => 'EXPRESSCACHE_ENABLE_CUSTGROUP',\n 'is_bool' => true,\n 'desc' => $this->l('If your shop offers unique discounts or view for customer groups, enable this.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n ),\n ),\n ),\n array(\n 'col' => 8,\n 'rows' => 5, //PS 1.5\n 'cols' => 60, //PS 1.5\n 'type' => 'textarea',\n 'desc' => $this->l('Comma seperated listed of controllers to Cache'),\n 'name' => 'EXPRESSCACHE_CONTROLLERS',\n 'label' => $this->l('What to Cache?'),\n ),\n array(\n 'col' => 8,\n 'type' => 'textarea',\n 'rows' => 5, //PS 1.5\n 'cols' => 60, //PS 1.5\n 'desc' => $this->l('Ignore these URL parameters while creating a unique cache'),\n 'name' => 'EXPRESSCACHE_URLVARS',\n 'label' => $this->l('Ignore URL variables'),\n ),\n\n // array(\n // 'col' => 8,\n // 'type' => 'textarea',\n // // 'autoload_rte' => true,\n // 'rows' => 5, //PS 1.5\n // 'cols' => 60, //PS 1.5\n // 'desc' => $this->l('Enter each module_name,hook_name combination as new line to make the combination as active widget.'),\n // 'name' => 'EXPRESSCACHE_ACTIVE_WIDGETS',\n // 'label' => $this->l('Dynamic Widgets'),\n // ),\n array(\n 'type' => $this->switch,\n 'class' => 't',\n 'label' => $this->l('Compress Cache'),\n 'name' => 'EXPRESSCACHE_GZIP',\n 'is_bool' => true,\n 'desc' => $this->l('Store cache files in compressed format (gzip)'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n ),\n ),\n ),\n array(\n 'col' => 2,\n 'type' => 'text',\n 'desc' => $this->l('0 = No limit'),\n 'name' => 'EXPRESSCACHE_STORAGE_LIMIT',\n 'label' => $this->l('Cache storage limit'),\n // 'class' => 'fixed-width-sm',\n 'suffix' => 'MB'\n ),\n\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function init_form_fields()\n {\n $gateway_settings = str_replace('_', '-', $this->id);\n\n $this->form_fields = array_merge(include(woocommerce_il_pgateways()->includes_path . \"/gateways/settings/settings-il-pgateways.php\"),\n include(woocommerce_il_pgateways()->includes_path . \"/gateways/settings/settings-{$gateway_settings}.php\"));\n }", "public function displayForm()\n\t{\n\t\tglobal $currentIndex, $cookie;\n\n\t\t$defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT'));\n\t\t$languages = Language::getLanguages();\n\t\t$obj = $this->loadObject(true);\n if (!$obj->id_group)\n $obj->id_group = (isset($_GET[\"id_group\"])?intval($_GET[\"id_group\"]):NULL);\n ?>\n\n<script type=\"text/javascript\">\n\tid_language = Number(<?php echo $defaultLanguage; ?>);\n</script>\n\n<form action=\"<?php echo $currentIndex; ?>&token=<?php echo $this->token; ?>\" method=\"post\">\n<?php echo ($obj->id ? '<input type=\"hidden\" name=\"id_'.$this->table.'\" value=\"'.$obj->id.'\" />' : ''); ?>\n\t<fieldset class=\"width3\">\n <legend>\n <img src=\"../img/t/AdminFeatures.gif\" /><?php echo $this->l('Feature'); ?>\n </legend>\n\t\t<label><?php echo $this->l('Name:'); ?></label>\n\t\t<div class=\"margin-form\">\n <?php foreach ($languages as $language): ?>\n \t<div id=\"name_<?php echo $language['id_lang']; ?>\" style=\"display: <?php echo ($language['id_lang'] == $defaultLanguage ? 'block' : 'none'); ?>; float: left;\">\n \t\t<input size=\"33\" type=\"text\" name=\"name_<?php echo $language['id_lang']; ?>\" value=\"<?php echo htmlentities($this->getFieldValue($obj, 'name', intval($language['id_lang'])), ENT_COMPAT, 'UTF-8'); ?>\" /><sup> *</sup>\n \t\t<span class=\"hint\" name=\"help_box\"><?php echo $this->l('Invalid characters:') . \"<>;=#{}\"; ?><span class=\"hint-pointer\">&nbsp;</span></span>\n \t</div>\n <?php endforeach; ?> \n <?php echo $this->displayFlags($languages, $defaultLanguage, 'name', 'name'); ?>\n <div style=\"clear: both;\"></div>\n\t\t</div>\n <label><?php echo $this->l('Group: '); ?></label>\n <div class=\"margin-form\">\n <select name=\"id_group\">\n <option value=''>---</option>\n <?php echo $featureGroups = FeatureGroup::getFeatureGroups(intval($cookie->id_lang));\n foreach ($featureGroups as $fg): ?> \n <option value='<?php echo $fg[\"id_group\"]; ?>'\n <?php if (intval($fg[\"id_group\"]) == intval($obj->id_group)): ?> \n selected=\"selected\"\n <?php endif; ?>><?php echo $fg[\"name\"]; ?></option>\n <?php endforeach; ?> \n\t\t\t</select>\n </div>\n <label><?php echo $this->l('Position: '); ?></label>\n <div class=\"margin-form\">\n <input size=5 maxlength=5 type=\"text\" name=\"position\" value=\"<?php echo htmlentities($this->getFieldValue($obj, 'position', NULL), ENT_COMPAT, 'UTF-8'); ?>\" />\n <span class=\"hint\" name=\"help_box\"><?php echo $this->l('Only digital allowed!'); ?><span class=\"hint-pointer\">&nbsp;</span></span>\n </div>\n\t\t<div class=\"margin-form\">\n\t\t\t<input type=\"submit\" value=\"<?php echo $this->l(' Save '); ?>\" name=\"submitAdd<?php echo $this->table; ?>\" class=\"button\" />\n\t\t</div>\n\t\t<div class=\"small\"><sup>*</sup> <?php echo $this->l('Required field'); ?></div>\n\t</fieldset>\n</form> \n<?php \n\t}", "public function buildForm()\n {\n $class = $this->getData('class') ? $this->getData('class') : 'narrative';\n $bool = ($this->getData('narrative_true') || !$this->getName()) ? true : false;\n $this\n ->addNarrative($class, trans('elementForm.text'), ['narrative_required' => $bool]);\n //->addAddMoreButton('add_title', $class);\n }", "public function init_form_fields() {\n\t\t$this->form_fields = include( WC_AZUL_PLUGIN_PATH . '/includes/admin/settings-azul.php' );\n\t}", "protected function postProcess()\n {\n // @TODO Nicer solution ?\n $castFunctions = array('boolval', 'doubleval', 'floatval', 'intval', 'strval');\n $langIds = Language::getIDs(false);\n\n $values = array();\n foreach ($this->getOptionFields() as $key => $field) {\n\n $htmlAllowed = isset($field['html']) && $field['html'];\n\n if ($field['type'] == 'textareaLang' || $field['type'] == 'textLang') {\n $values[$key] = array();\n foreach ($langIds as $id_lang) {\n $value = Tools::getValue($key.'_'.$id_lang);\n if ($field['cast'] && in_array($field['cast'], $castFunctions)) {\n $value = call_user_func($field['cast'], $value);\n }\n\n $values[$key][$id_lang] = $value;\n }\n } else {\n $value = Tools::getValue($key);\n if ($field['cast'] && in_array($field['cast'], $castFunctions)) {\n $value = call_user_func($field['cast'], $value);\n }\n\n $values[$key] = $value;\n }\n\n Configuration::updateValue($key, $values[$key], $htmlAllowed);\n }\n\n if ($values['CT_CFG_BLOCKCATEGORIES_FOOTER']) {\n $this->hookModule('blockcategories', 'footer');\n } else {\n $this->unhookModule('blockcategories', 'footer');\n }\n }", "public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t\t\t'title' => __('Enable/disable', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable SveaWebPay Part Payments', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t\t\t'title' => __('Title',WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('This controls the title which the user sees during checkout', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => __('Part payment', WC_SveaWebPay_Gateway::PLUGIN_SLUG)\n\t\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t\t\t'title' => __('Description', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'description' => __('This controls the description the user sees during checkout', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => __( 'Pay with part payments through Svea Ekonomi', WC_SveaWebPay_Gateway::PLUGIN_SLUG )\n\t\t\t\t),\n\t\t\t'enabled_countries' => array(\n\t\t\t\t\t\t'title' => __('Enabled countries', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'multiselect',\n\t\t\t\t\t\t'description' => __('Choose the countries you want SveaWebPay Part Payment to be enabled in', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'options' => array(\n \t\t\t\t\t\t\t\t\t'DK' => __('Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n \t\t\t\t\t\t\t\t\t'DE' => __('Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n \t\t\t\t\t\t\t\t\t'FI' => __('Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n \t\t\t\t\t\t\t\t\t'NL' => __('Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n \t\t\t\t\t\t\t\t\t'NO' => __('Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n \t\t\t\t\t\t\t\t\t'SE' => __('Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG)\n \t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'display_product_widget' => array(\n\t\t\t\t'title' => __( 'Display product part payment widget', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => __( 'Display a widget on the product page which suggests a part payment plan for the customer to use to buy the product.', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\t\t\t'product_widget_position' => array(\n\t\t\t 'title' => __( 'Product part payment widget position', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n 'type' => 'select',\n 'description' => __( 'The position of the part payment widget on the product page. Is only displayed if the widget is activated.', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n 'default' => 15,\n 'options' => array(\n '15' => __( 'Between price and excerpt', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n '25' => __( 'Between excerpt and add to cart', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n '35' => __( 'Between add to cart and product meta', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n )\n ),\n\t\t\t'same_shipping_as_billing' => array(\n\t\t\t\t\t\t'title' => __('Same shipping address as billing address', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'description' => __('If checked, billing address will override the shipping address', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t),\n\t\t\t//Denmark\n\t\t\t'testmode_dk' => array(\n\t\t\t\t\t\t'title' => __('Test mode Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable/disable test mode in Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_dk' => array(\n\t\t\t\t\t\t'title' => __('Username Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_dk' => array(\n\t\t\t\t\t\t'title' => __('Password Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_dk' => array(\n\t\t\t\t\t\t'title' => __('Client number Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Denmark', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t//Germany\n\t\t\t'testmode_de' => array(\n\t\t\t\t\t\t'title' => __('Test mode Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable/disable test mode in Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_de' => array(\n\t\t\t\t\t\t'title' => __('Username Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_de' => array(\n\t\t\t\t\t\t'title' => __('Password Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_de' => array(\n\t\t\t\t\t\t'title' => __('Client number Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Germany', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t//Finland\n\t\t\t'testmode_fi' => array(\n\t\t\t\t\t\t'title' => __('Test mode Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __( 'Enable/disable test mode in Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_fi' => array(\n\t\t\t\t\t\t'title' => __('Username Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_fi' => array(\n\t\t\t\t\t\t'title' => __('Password Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_fi' => array(\n\t\t\t\t\t\t'title' => __('Client number Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Finland', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t//Netherlands\n\t\t\t'testmode_nl' => array(\n\t\t\t\t\t\t'title' => __('Test mode Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable/disable test mode in Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_nl' => array(\n\t\t\t\t\t\t'title' => __('Username Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_nl' => array(\n\t\t\t\t\t\t'title' => __('Password Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_nl' => array(\n\t\t\t\t\t\t'title' => __('Client number Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Netherlands', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t//Norway\n\t\t\t'testmode_no' => array(\n\t\t\t\t\t\t'title' => __('Test mode Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable/disable test mode in Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_no' => array(\n\t\t\t\t\t\t'title' => __('Username Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_no' => array(\n\t\t\t\t\t\t'title' => __('Password Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_no' => array(\n\t\t\t\t\t\t'title' => __('Client number Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Norway', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t//Sweden\n\t\t\t'testmode_se' => array(\n\t\t\t\t\t\t'title' => __('Test mode Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Enable/disable test mode in Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t'username_se' => array(\n\t\t\t\t\t\t'title' => __('Username Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Username for part payments in Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'password_se' => array(\n\t\t\t\t\t\t'title' => __('Password Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'description' => __('Password for part payments in Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'client_nr_se' => array(\n\t\t\t\t\t\t'title' => __('Client number Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Client number for part payments in Sweden', WC_SveaWebPay_Gateway::PLUGIN_SLUG),\n\t\t\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug log', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t'default' => 'no',\n\t\t\t\t'description' => sprintf( __( 'Log Svea events, such as payment requests, inside <code>%s</code>', WC_SveaWebPay_Gateway::PLUGIN_SLUG ), wc_get_log_file_path( self::GATEWAY_ID ) )\n\t\t\t),\n\t\t\t'disable_order_sync' => array(\n\t\t\t\t\t'title' => __( 'Disable automatic order sync', WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'description' => __( \"Disable automatic syncing of orders in WooCommerce to Svea. <br />\n\t\t\t\t\t\tIf you enable this option, your refunded orders will not be refunded in Svea. <br />\n\t\t\t\t\t\tYour delivered orders will not be delivered in Svea and your cancelled orders will not be cancelled in Svea. <br />\n\t\t\t\t\t\t<strong>Don't touch this if you don't know what you're doing</strong>.\", WC_SveaWebPay_Gateway::PLUGIN_SLUG ),\n\t\t\t\t\t'default' => 'no'\n\t\t\t\t),\n\t\t\t);\n\t}", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'user_email_label',\n ],\n ]); \n // Add \"password\" field\n $this->add([ \n 'type' => 'password',\n 'name' => 'password',\n 'options' => [\n 'label' => 'user_password_label',\n ],\n ]); \n // Add \"remember_me\" field\n $this->add([ \n 'type' => 'checkbox',\n 'name' => 'remember_me',\n 'options' => [\n 'label' => 'user_remember_me_label',\n ],\n ]); \n // Add the CSRF field\n $this->add([\n 'type' => 'csrf',\n 'name' => 'login_csrf',\n 'options' => [\n 'csrf_options' => [\n 'timeout' => 600,\n ],\n ]\n ]); \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'user_submit_value_sing-in',\n ],\n ]);\n }", "public function init_form_fields()\n {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __('Enable / Disable', 'wc_piladi_mpesa_gateway'),\n 'label' => __('Enable this payment gateway', 'wc_piladi_mpesa_gateway'),\n 'type' => 'checkbox',\n 'default' => 'no',\n ),\n 'title' => array(\n 'title' => __('Title', 'wc_piladi_mpesa_gateway'),\n 'type' => 'text',\n 'desc_tip' => __('Payment title of checkout process.', 'wc_piladi_mpesa_gateway'),\n 'default' => __('M-pesa', 'wc_piladi_mpesa_gateway'),\n ),\n 'description' => array(\n 'title' => __('Description', 'wc_piladi_mpesa_gateway'),\n 'type' => 'textarea',\n 'desc_tip' => __('Payment title of checkout process.', 'wc_piladi_mpesa_gateway'),\n 'default' => __('Pay via mpesa', 'wc_piladi_mpesa_gateway'),\n 'css' => 'max-width:450px;'\n ),\n 'consumer_key' => array(\n 'title' => __('Consumer key', 'wc_piladi_mpesa_gateway'),\n 'type' => 'text',\n 'desc_tip' => __('This is the consumer key of the c2b app from daraja dev portal.', 'wc_piladi_mpesa_gateway'),\n ),\n 'consumer_secret' => array(\n 'title' => __('Consumer secret', 'wc_piladi_mpesa_gateway'),\n 'type' => 'password',\n 'desc_tip' => __('This is the consumer secret of the c2b app from daraja dev portal.', 'wc_piladi_mpesa_gateway'),\n ),\n 'environment' => array(\n 'title' => __('Sandbox', 'wc_piladi_mpesa_gateway'),\n 'label' => __('Enable Test Mode', 'wc_piladi_mpesa_gateway'),\n 'type' => 'checkbox',\n 'description' => __('This is the test mode of gateway.', 'wc_piladi_mpesa_gateway'),\n 'default' => 'no',\n )\n );\n }", "public function init()\n {\n $this->setAttribute('method', 'post');\n $this->setAttribute('class', 'jq-validate');\n\n $this->add(array(\n 'name' => 'user_id',\n 'type' => 'hidden',\n ));\n\n $this->add(array(\n 'name' => 'organization_id',\n 'type' => 'hidden',\n ));\n\n // Options will be set later\n $this->add(array(\n 'name' => 'template_id',\n 'type' => 'Select',\n 'attributes' => array(\n 'data-rule-required' => true,\n ),\n 'options' => array(\n 'required' => true,\n 'disable_inarray_validator' => true,\n ),\n ));\n\n $this->add(array(\n 'name' => 'name',\n 'type' => 'Text',\n 'attributes' => array(\n 'size' => 100,\n 'data-rule-maxlength' => 100,\n 'maxsize' => 100,\n 'data-rule-required' => true,\n 'data-rule-nohtml' => true,\n ),\n ));\n \n $this->add(array(\n 'name' => 'language',\n 'type' => 'Select',\n 'options' => array(\n 'required' => true,\n 'value_options' => array(\n 'de' => $this->getTranslator()->translate('German'),\n 'fr' => $this->getTranslator()->translate('French'),\n 'en' => $this->getTranslator()->translate('English'),\n ),\n ),\n 'attributes' => array(\n 'data-rule-required' => true,\n ),\n ));\n\n $this->add(array(\n 'name' => 'description',\n 'type' => 'Textarea',\n 'attributes' => array(\n 'data-rule-nohtml' => true,\n ),\n ));\n\n $this->add(array(\n 'name' => 'duration',\n 'type' => 'Text',\n 'attributes' => array(\n 'data-rule-required' => true,\n 'data-rule-digits' => true,\n 'data-rule-nohtml' => true,\n ),\n ));\n\n $this->add(array(\n 'name' => 'start_date',\n 'type' => 'Text',\n 'attributes' => array(\n 'data-rule-required' => true,\n 'data-rule-nohtml' => true,\n 'data-date-format' => 'dd/mm/yyyy',\n ),\n ));\n\n $this->add(array(\n 'name' => 'end_date',\n 'type' => 'Text',\n 'attributes' => array(\n 'data-rule-required' => true,\n 'data-rule-nohtml' => true,\n 'data-date-format' => 'dd/mm/yyyy',\n ),\n ));\n\n $this->add(array(\n 'name' => 'complete',\n 'type' => 'Submit',\n ));\n \n $this->add(array(\n 'name' => 'draft',\n 'type' => 'Submit',\n )); \n }", "public function init_form_fields() {\r\n\r\n $this->form_fields = apply_filters( 'wc_rentpayment_form_fields', array(\r\n\r\n 'enabled' => array(\r\n 'title' => __( 'Enable/Disable', self::TEXTDOMAIN ),\r\n 'type' => 'checkbox',\r\n 'label' => __( 'Enable Rent Payment gateway', self::TEXTDOMAIN ),\r\n 'default' => 'yes'\r\n ),\r\n\r\n self::OPTION_API_URL => array(\r\n 'title' => __( 'API URL', self::TEXTDOMAIN ),\r\n 'type' => 'text',\r\n 'label' => __( 'Endpoint of the payment gateway API', self::TEXTDOMAIN ),\r\n ),\r\n\r\n self::OPTION_API_USERNAME => array(\r\n 'title' => __( 'API user name', self::TEXTDOMAIN ),\r\n 'type' => 'text',\r\n 'label' => __( 'User name required for API authentication', self::TEXTDOMAIN ),\r\n ),\r\n\r\n self::OPTION_API_PASSWORD => array(\r\n 'title' => __( 'API password', self::TEXTDOMAIN ),\r\n 'type' => 'password',\r\n 'label' => __( 'Password required for API authentication', self::TEXTDOMAIN ),\r\n ),\r\n\r\n self::OPTION_PROPERTY_CODE => array(\r\n 'title' => __( 'API Property Code', self::TEXTDOMAIN ),\r\n 'type' => 'text',\r\n 'label' => __( 'Propery codre required for API payment identification', self::TEXTDOMAIN ),\r\n ),\r\n\r\n self::OPTION_SANDBOX => array(\r\n 'title' => __( 'Sandbox', self::TEXTDOMAIN ),\r\n 'type' => 'checkbox',\r\n 'label' => __( 'Enable sandbox mode', self::TEXTDOMAIN ),\r\n 'default' => 'yes',\r\n 'desc_tip' => __('In sandbox mode you can accept test payments without processing any credit cards.',self::TEXTDOMAIN ),\r\n ),\r\n\r\n 'title' => array(\r\n 'title' => __( 'Title', self::TEXTDOMAIN ),\r\n 'type' => 'text',\r\n 'description' => __( 'This controls the title for the payment method the customer sees during checkout.', self::TEXTDOMAIN ),\r\n 'default' => __( 'Rent Payment', self::TEXTDOMAIN),\r\n 'desc_tip' => true,\r\n ),\r\n\r\n 'description' => array(\r\n 'title' => __( 'Description', self::TEXTDOMAIN ),\r\n 'type' => 'textarea',\r\n 'description' => __( 'Payment method description that the customer will see on your checkout.', self::TEXTDOMAIN ),\r\n 'default' => __( 'Please remit payment to Store Name upon pickup or delivery.', self::TEXTDOMAIN ),\r\n 'desc_tip' => true,\r\n ),\r\n\r\n self::OPTION_API_LOGGING => array(\r\n 'title' => __( 'Enable API logging', self::TEXTDOMAIN ),\r\n 'type' => 'checkbox',\r\n 'label' => __( 'Allow logging of API traffic (request and response) for troubleshooting.', self::TEXTDOMAIN ),\r\n 'default' => 'no',\r\n 'desc_tip' => true,\r\n ),\r\n ));\r\n }", "private function _setLanguage() {\n\t\tif (Configure::read('Config.language') != $this->params['language']) {\n\t\t\tConfigure::write('Config.language', $this->params['language']);\n\t\t}\n\t\tif(!$this->Session->read('Config.language')) {\n\t\t\t$this->Session->write('Config.language', $this->params['language']);\n\t\t}\n\t}", "protected function manage()\n\t{\n \t\t$form = new \\IPS\\Helpers\\Form;\n\t\t$form->addHeader( 'terms_guidelines' );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'gl_type', \\IPS\\Settings::i()->gl_type, FALSE, array(\n\t\t\t\t'options' => array(\n\t\t\t\t\t\t'internal' => 'gl_internal',\n\t\t\t\t\t\t'external' => 'gl_external',\n\t\t\t\t\t\t'none' => \"gl_none\" ),\n\t\t\t\t'toggles' => array(\n\t\t\t\t\t\t'internal'\t=> array( 'gl_guidelines_id' ),\n\t\t\t\t\t\t'external'\t=> array( 'gl_link' ),\n\t\t\t\t\t\t'none'\t\t=> array(),\n\t\t\t\t)\n\t\t) ) );\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'gl_guidelines', NULL, FALSE, array( 'app' => 'core', 'key' => 'guidelines_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'Guidelines', 'attachIds' => array( NULL, NULL, 'gl_guidelines' ) ) ), NULL, NULL, NULL, 'gl_guidelines_id' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Url( 'gl_link', \\IPS\\Settings::i()->gl_link, FALSE, array(), NULL, NULL, NULL, 'gl_link' ) );\n\t\t$form->addHeader( 'terms_privacy');\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'privacy_type', \\IPS\\Settings::i()->privacy_type, FALSE, array(\n\t\t\t\t'options' => array(\n\t\t\t\t\t\t'internal' => 'privacy_internal',\n\t\t\t\t\t\t'external' => 'privacy_external',\n\t\t\t\t\t\t'none' => \"privacy_none\" ),\n\t\t\t\t'toggles' => array(\n\t\t\t\t\t\t'internal'\t=> array( 'privacy_text_id' ),\n\t\t\t\t\t\t'external'\t=> array( 'privacy_link' ),\n\t\t\t\t\t\t'none'\t\t=> array(),\n\t\t\t\t)\n\t\t) ) );\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'privacy_text', NULL, FALSE, array( 'app' => 'core', 'key' => 'privacy_text_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'Privacy', 'attachIds' => array( NULL, NULL, 'privacy_text' ) ) ), NULL, NULL, NULL, 'privacy_text_id' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Url( 'privacy_link', \\IPS\\Settings::i()->privacy_link, FALSE, array(), NULL, NULL, NULL, 'privacy_link' ) );\n\t\t\t\n\t\t$form->addHeader( 'terms_registration' );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'reg_rules', NULL, FALSE, array( 'app' => 'core', 'key' => 'reg_rules_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'RegistrationRules', 'attachIds' => array( NULL, NULL, 'reg_rules' ) ) ), NULL, NULL, NULL, 'reg_rules_id' ) );\n\t\t\n\t\tif ( $values = $form->values() )\n\t\t{\n\t\t\tforeach ( array( 'gl_guidelines' => 'guidelines_value', 'privacy_text' => 'privacy_text_value', 'reg_rules' => 'reg_rules_value' ) as $k => $v )\n\t\t\t{\n\t\t\t\t\\IPS\\Lang::saveCustom( 'core', $v, $values[ $k ] );\n\t\t\t\tunset( $values[ $k ] );\n\t\t\t}\n\t\t\t\n\t\t\t$form->saveAsSettings( $values );\n\t\t\t\\IPS\\Session::i()->log( 'acplogs__terms_edited' );\n\t\t}\n\t\t\n\t\t\\IPS\\Output::i()->title\t\t= \\IPS\\Member::loggedIn()->language()->addToStack('menu__core_settings_terms');\n\t\t\\IPS\\Output::i()->output\t.= \\IPS\\Theme::i()->getTemplate( 'global' )->block( 'menu__core_settings_terms', $form );\n\t}", "public function rules()\n {\n return array(\n array('language', 'length', 'max' => 5),\n array('tags', 'length', 'max' => 100),\n array('show_introduction_tour', 'numerical', 'integerOnly' => true), \n array('language', 'match', 'not' => true, 'pattern' => '/[^a-zA-Z_]/', 'message' => Yii::t('UserModule.forms_AccountSettingsForm', 'Invalid language!')),\n );\n }", "private function getConfigurationFields($oForm)\n {\n $oForm->setWidgets(\n\t\t\tarray(\n\t\t\t\t\t'country_id'\t\t=> __('Select Country'),\n\t\t\t\t\t'renewal_term'\t\t=> __('Select Row Term')\n\t\t\t\t )\n\t\t);\n\n $oForm->setLabels(\n array(\n\t\t\t\t'onsite_work_date' \t=> __('Onsite Work Date'),\n\t\t\t\t'date_paid' \t\t=> __('Date Paid'),\n\t\t\t\t'amount_paid' \t\t=> __('Amount Paid'),\n\t\t\t\t'receipt' \t\t\t=> __('Receipt'),\n\t\t\t\t'renewal_term' \t\t=> __('Renewal Term'),\n\t\t\t\t'renewal_date' \t\t=> __('Renewal Date'),\n\t\t\t\t'interred_name' \t=> __('Interred Name'),\n\t\t\t\t'interred_surname' \t=> __('Interred Surname'),\n\t\t\t\t'title' \t\t\t=> __('Title'),\n\t\t\t\t'organization_name' => __('Organization Name'),\n\t\t\t\t'first_name' => __('First Name'),\n\t\t\t\t'surname' \t\t\t=> __('Surname'),\n\t\t\t\t'address' \t\t\t=> __('Address'),\n\t\t\t\t'subrub' \t\t\t=> __('Subrub/Town'),\n\t\t\t\t'state' \t\t\t=> __('State'),\n\t\t\t\t'postal_code' \t\t=> __('Postal Code'),\n\t\t\t\t'user_country' \t\t=> __('User Country'),\n\t\t\t\t'email' \t\t\t=> __('Email'),\n\t\t\t\t'area_code' \t\t=> __('Area Code'),\n\t\t\t\t'notes' \t\t\t=> __('Operational Notes')\n )\n );\n\n $oForm->setValidators(\n array(\n\t\t\t\t\t'country_id'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select country')\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'interred_name'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter interred name')\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'interred_surname'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter interred surname')\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'renewal_term'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select renewal term')\n\t\t\t\t\t\t\t\t\t\t),\n\t 'email'\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t'invalid' => __('Please enter valid email')\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t)\n );\n }", "protected function registerElementFlexForms(): void\n {\n $definition = $this->state->get('typo.extBase.element.flexForms');\n if (! empty($definition)) {\n foreach (SerializerUtil::unserializeJson($definition) ?? [] as $def) {\n ExtensionManagementUtility::addPiFlexFormValue(...$def['args']);\n \n $signature = $def['signature'];\n $val = $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$signature] ?? null;\n if ($val !== null) {\n if (is_string($val) && stripos($val, 'pi_flexform') === false) {\n // A string exists, but pi_flexform is not part of it\n $val = rtrim($val, ', ') . ',pi_flexform';\n } else {\n continue;\n }\n } else {\n $val = 'pi_flexform';\n }\n $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$signature] = $val;\n }\n }\n }", "protected static function setLanguageKeys() {}", "public function addAction(Request $request)\n {\n $language = new Language();\n\n $form = $this->createForm(LanguageType::class, $language);\n\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n // Normalize extensions\n if ($language->getExtensions()) {\n $language->setExtensions(array_values($language->getExtensions()));\n }\n $this->em->persist($language);\n $this->saveEntity($this->em, $this->eventLogService, $this->dj, $language,\n $language->getLangid(), true);\n return $this->redirect($this->generateUrl(\n 'jury_language',\n ['langId' => $language->getLangid()]\n ));\n }\n\n return $this->render('jury/language_add.html.twig', [\n 'form' => $form->createView(),\n ]);\n }", "function choose_language_form()\n {\n $db = DataAccess::getInstance();\n $sql = \"SELECT * FROM $this->pages_languages_table WHERE `active` = ? ORDER BY `language` ASC\";\n $result = $db->Execute($sql, array(1));\n if (!$result) {\n return false;\n }\n $this->page_id = 42;\n $this->get_text();\n\n $view = geoView::getInstance();\n\n //get current language. check set_language_cookie first to see if it was set on this pageload, otherise use the cookie\n $currentLanguage = ($_REQUEST['set_language_cookie']) ? $_REQUEST['set_language_cookie'] : $_COOKIE['language_id'];\n\n $languages = array();\n while ($lang = $result->FetchRow()) {\n $languages[] = array(\n 'name' => geoString::fromDB($lang['language']),\n 'id' => $lang['language_id'],\n 'selected' => (($lang['language_id'] == $currentLanguage) ? true : false)\n );\n }\n $view->languages = $languages;\n\n $view->setBodyTpl('choose_language_form.tpl', '', 'other');\n $this->display_page();\n return true;\n }", "public function formAction()\n {\n if (!($connection_type = $this->_param('connection_type')) || !in_array($connection_type, array('api', 'custom-html'))) {\n $types = array(\n 'api' => __('API', \"thrive-visual-editor\"),\n 'custom-html' => __('HTML Form code', \"thrive-visual-editor\")\n );\n\n //allow types to be filters by somewhere else\n $types = apply_filters('tve_autoresponder_connection_types', $types);\n\n $data['connection_types'] = $types;\n\n return array(\n 'lb_html' => $this->_view('add', $data)\n );\n }\n if ($connection_type == 'custom-html') {\n return array(\n 'lb_html' => $this->_view('add-custom-html')\n );\n }\n\n return array(\n 'lb_html' => $this->_view('add-api', $this->_prepareApiData())\n );\n }" ]
[ "0.71967894", "0.6568911", "0.6446732", "0.6331413", "0.6322439", "0.6270213", "0.6231891", "0.6221624", "0.6197807", "0.6103906", "0.60992837", "0.60130495", "0.5973422", "0.58193064", "0.567907", "0.5675849", "0.56756794", "0.56745565", "0.5663616", "0.56491804", "0.5643449", "0.5640318", "0.5635393", "0.5618049", "0.5598503", "0.55980384", "0.5595644", "0.55706406", "0.55342937", "0.5526905", "0.55138445", "0.55065453", "0.54533535", "0.5452442", "0.5447401", "0.54362464", "0.543124", "0.54126114", "0.5406478", "0.5377165", "0.5370824", "0.5342019", "0.533858", "0.5335831", "0.5332268", "0.53312695", "0.53308487", "0.5312165", "0.5310255", "0.5306793", "0.5305425", "0.5286216", "0.5270054", "0.5254307", "0.5251739", "0.5248519", "0.5248459", "0.5245488", "0.52452266", "0.5238057", "0.5235781", "0.5234909", "0.52334726", "0.52282", "0.52233785", "0.5221318", "0.5220143", "0.5213799", "0.5209291", "0.52071536", "0.52045894", "0.52042776", "0.52042776", "0.52042776", "0.520072", "0.5199203", "0.5197916", "0.5197", "0.5190951", "0.5187772", "0.51804197", "0.5174593", "0.51693934", "0.51618946", "0.51585096", "0.5157773", "0.5154801", "0.51484513", "0.51484114", "0.5147061", "0.5146527", "0.51451117", "0.5141994", "0.5141794", "0.5131781", "0.5130045", "0.5129965", "0.5129136", "0.5124008", "0.5123756" ]
0.72037345
0
Get the value of prospect
Получить значение привлекательности
public function getProspect() { return $this->prospect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "function getProposition() {\n return $this->proposition;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getPropriete()\n {\n return $this->propriete;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function getValue() {\n return $this->p_id;\n }", "function getPuissance(){\n return $this->_puissance;\n }", "public function getValue(){\n\t\treturn $this->svalue;\n\t}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getProfit() {\n return $this->profit;\n }", "public function getValue(){\n\t\treturn $this->value;\n\t}", "public function getValue()\n\t{\n\t\t$conf = & Common::getConfig('Fish',$this->FishTypeId);\n\t\t$Period = $this->getGrowingPeriod();\n\t\tif($Period > FishPeriod :: OVER_MATURE )\n\t\t{\n\t\t\t$Period_Price = FishPeriod :: OVER_MATURE ;\n\t\t}\n\t\telse if ($Period <= FishPeriod ::ONE)\n\t\t{\n\t\t\t$Period_Price = FishPeriod :: ONE ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$Period_Price = $Period;\n\t\t}\n\t\t$value = 0;\n\t\t\n\t\t$Age = $this->Level - $conf['LevelRequire'] ;\n\t\t\n\t\tif ($Age < 1 && $Period_Price < FishPeriod::OVER_MATURE)\n\t\t{\n\t\t\treturn $this->getCurrentPocketNum()*$conf['StealOnce'];\n\t\t}\n\t\t$value = $conf['TrustPrice'] ;\n \n\t\t$value *= ( 1 + $this->getLake()->getOption(OptionFish::MONEY)/100);\n\t\t\n $value += $this->getCurrentPocketNum()*$conf['StealOnce'];\n $value -= $this->MoneyAttacked; \n\t\t\t\t\n\t\treturn round($value) ;\n\t}", "public function getValue() {\n\n\t \t\t return $this->value;\n\t }", "public function getPPSValue() {\n // Fetch RPC difficulty\n if ($this->bitcoin->can_connect() === true) {\n $dDifficulty = $this->bitcoin->getdifficulty();\n } else {\n $dDifficulty = 1;\n }\n\n if ($this->config['pps']['reward']['type'] == 'blockavg' && $this->block->getBlockCount() > 0) {\n $pps_reward = round($this->block->getAvgBlockReward($this->config['pps']['blockavg']['blockcount']));\n } else {\n if ($this->config['pps']['reward']['type'] == 'block') {\n if ($aLastBlock = $this->block->getLast()) {\n $pps_reward = $aLastBlock['amount'];\n } else {\n $pps_reward = $this->config['pps']['reward']['default'];\n }\n } else {\n $pps_reward = $this->config['pps']['reward']['default'];\n }\n }\n return round($this->coin->calcPPSValue($pps_reward, $dDifficulty), 12);\n }", "public function getValue()\n {\n return $this->fusionValue('value');\n }", "public function getValue() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"value\");\n\t}", "public function getValue() \n {\n return $this->value;\n }", "public function getProba()\n {\n return $this->proba;\n }", "public function getPr()\n {\n return $this->get(self::PR);\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue() {\n\n return $this->value;\n\n }", "public function getPuissance()\n {\n return $this->puissance;\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue() {\n\t return $this->value;\n\t}", "public function getPrixPropose()\n {\n return $this->prixPropose;\n }", "public function getPotencia()\n {\n return $this->potencia;\n }", "public function getProdid()\n {\n return $this->prodid;\n }", "public function getValue()\n {\n return isset($this->value) ? $this->value : 0.0;\n }", "public function getValue() {\r\n return $this->value;\r\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getProportion()\n {\n return $this->proportion;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }" ]
[ "0.65730816", "0.63996", "0.6339667", "0.6230572", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6180851", "0.6139653", "0.61237663", "0.60960865", "0.6084582", "0.6084466", "0.6073412", "0.6073412", "0.6073412", "0.6073412", "0.6073412", "0.6063479", "0.60455805", "0.60415196", "0.6029725", "0.6008219", "0.5992008", "0.5984503", "0.5980861", "0.59636706", "0.59563404", "0.59538925", "0.5950149", "0.5946908", "0.5945812", "0.594514", "0.594514", "0.5934563", "0.5927836", "0.5925601", "0.59184533", "0.5912763", "0.5909524", "0.59020185", "0.5901414", "0.5901414", "0.589988", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716", "0.58976716" ]
0.7464151
0
FT read the modes file into the pipeline array. this (modes.xml) appears to give the files used by the various apertium programs hmm this function is a good example of why config data should not be held in xml files :)
FT считывает файл режимов в массив потока. этот (modes.xml) кажется, что он предоставляет файлы, используемые различными программами apertium. интересно, эта функция является хорошим примером того, почему конфигурационные данные не должны храниться в файлах XML :)
function readmodes() { $modesfile = $this->srcroot . 'modes.xml'; $retval = file_get_contents($modesfile); $doc = new DOMDocument; $doc->loadXML($retval); $modelist = $doc->getElementsByTagName('mode'); foreach($modelist as $listitem) { if($listitem->getAttribute('name') == $this->direction) { $pipeindex = 0; $pipelist = $listitem->getElementsByTagName('program'); foreach($pipelist as $program) { // FT we need to split out in case there are args in the progname $split = explode(' ', $program->getAttribute('name')); $this->pipeline[$pipeindex][$split[0]] = ''; for($i = 1; $i < sizeof($split); $i++) { $this->pipeline[$pipeindex][$split[0]] .= $split[$i] . ' '; } $argv = $program->getElementsByTagName('file');echo foreach($argv as $arg) { $this->pipeline[$pipeindex][$split[0]] .= $this->srcroot . $arg->getAttribute('name') . ' '; } $pipeindex++; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_modes() {\n static $modes;\n if ( isset( $modes ) ) {\n return $modes;\n }\n\n $modes = array();\n foreach ( Clanpress_Mode::modes() as $mode ) {\n require_once( Clanpress_Helper::get_modes_path() . $mode . '.php' );\n $mode_class = Clanpress_Helper::get_class( $mode, 'mode' );\n\n $modes[ $mode ] = array(\n 'name' => $mode_class::name(),\n 'description' => $mode_class::description(),\n 'thumbnail' => $mode_class::thumbnail(),\n );\n }\n\n return $modes;\n }", "public function provideReadingModes()\n {\n return array(\n // Draft\n array(\n 'Stage.Stage',\n array(\n 'Versioned.mode' => 'stage',\n 'Versioned.stage' => 'Stage',\n\t\t\t\t),\n array(\n 'stage' => 'Stage',\n\t\t\t\t),\n 'stage=Stage'\n\t\t\t),\n // Live\n array(\n 'Stage.Live',\n array(\n 'Versioned.mode' => 'stage',\n 'Versioned.stage' => 'Live',\n\t\t\t\t),\n array(\n 'stage' => 'Live',\n\t\t\t\t),\n 'stage=Live'\n\t\t\t),\n // Draft archive\n array(\n 'Archive.2017-11-15 11:31:42',\n array(\n 'Versioned.mode' => 'archive',\n 'Versioned.date' => '2017-11-15 11:31:42',\n\t\t\t\t),\n array(\n 'archiveDate' => '2017-11-15 11:31:42',\n\t\t\t\t),\n 'archiveDate=2017-11-15+11%3A31%3A42',\n\t\t\t),\n // Live archive\n array(\n 'Archive.2017-11-15 11:31:42',\n array(\n 'Versioned.mode' => 'archive',\n 'Versioned.date' => '2017-11-15 11:31:42',\n\t\t\t\t),\n array(\n 'archiveDate' => '2017-11-15 11:31:42',\n\t\t\t\t),\n 'archiveDate=2017-11-15+11%3A31%3A42',\n\t\t\t),\n\t\t);\n }", "abstract public function getAvailableModes(): array;", "public function modes() {\n\t\t$options = [\n\t\t\t$this->getVar(static::ModeGetVar, self::PersistExact),\n\t\t\t\\Director::get_current_page()->config()->get('gridlist_default_mode'),\n\t\t\t$this->config()->get('default_mode'),\n\t\t];\n\t\treturn array_filter($options);\n\t}", "static public function get_standard_modes($reader=null) {\n return array();\n }", "function process($mode, $plex)\n {\n $result = array();\n switch ($mode) {\n case 'data': {\n $lex = new PHP_LexerGenerator_Lexer($plex);\n }\n break;\n\n case 'file': {\n $lex = new PHP_LexerGenerator_Lexer(file_get_contents(dirname(__FILE__) . '/' . $plex));\n $result['source'] = str_replace($plex, '\\\\', '/');\n }\n break;\n\n default:\n return false;\n }\n $states = array();\n ob_start();\n try {\n while ($lex->advance(null)) {\n $states[] = array(\n 'line' => $lex->line,\n 'token' => $lex->token,\n 'value' => $lex->value\n );\n }\n } catch (Exception $e) {\n $result['exception'] = (string) $e;\n }\n $result['output'] = ob_get_clean();\n $result['states'] = $states;\n $result['errors'] = $lex -> errors;\n return $result;\n }", "public function getModes()\n {\n return $this->modes;\n }", "function readConfig($configFile, $context)\n{\t\n\t$arrayConfig = array();\n\t\n\t$arrayConfig = parse_ini_file($configFile, true);\n\t\n\t\n\t\n// \techo \"<pre>\";\n// \tprint_r($arrayConfig);\n// \techo \"</pre>\";\n// \tdie;\n\treturn $arrayConfig;\n}", "abstract protected function getMode();", "public function getMode() {\n return $this->getConfig('mode');\n }", "function denora_chan_modes($chan)\n{\n\tglobal $denora_chan_db;\n\t$i = 0;\t$array = array(); $cmodes = \"\"; $j=97;\n\t\n\t$query = sql_query(\"SELECT * FROM $denora_chan_db WHERE BINARY LOWER(channel)=LOWER('\".sql_escape_string($chan).\"');\");\n\twhile ($data = sql_fetch_array($query))\n\t{\n\t\t$array[$i] = $data;\n\t\t$i++;\n\t}\n\tfor ($i = 0; $i <= count($array) - 1; $i++) {\n\t\twhile ($j <= 122)\n\t\t{\n\t\t\tif (@$array[$i]['mode_l'.chr($j)] == \"Y\")\n\t\t\t{\n\t\t\t\t$cmodes .= chr($j);\n\t\t\t}\n\t\t\tif (@$array[$i]['mode_u'.chr($j)] == \"Y\")\n\t\t\t{\n\t\t\t\t$cmodes .= chr($j-32);\n\t\t\t}\n\t\t\t$j++;\n\t\t}\n\t\tif (@$array[$i]['mode_lf_data'] != NULL)\n\t\t{\n\t\t\t$cmodes .= \" \".$array[$i]['mode_lf_data'];\n\t\t}\n\t\tif (@$array[$i]['mode_lj_data'] != NULL)\n\t\t{\n\t\t\t$cmodes .= \" \".$array[$i]['mode_lj_data'];\n\t\t}\n\t\tif (@$array[$i]['mode_ll_data'] > 0)\n\t\t{\n\t\t\t$cmodes .= \" \".$array[$i]['mode_ll_data'];\n\t\t}\n\t\tif (@$array[$i]['mode_uf_data'] != NULL)\n\t\t{\n\t\t\t$cmodes .= \" \".$array[$i]['mode_uf_data'];\n\t\t}\r\n\t\tif (@$array[$i]['mode_uj_data'] > 0)\r\n\t\t{\r\n\t\t\t$cmodes .= \" \".$array[$i]['mode_uj_data'];\r\n\t\t}\n\t\tif (@$array[$i]['mode_ul_data'] != NULL)\n\t\t{\n\t\t\t$cmodes .= \" \".$array[$i]['mode_ul_data'];\n\t\t}\n\t}\n\tif ($cmodes != \"\")\n\t{\n\t\t$cmodes = \"+\" . $cmodes;\n\t}\n\treturn $cmodes;\n}", "public function getModeDir();", "public function getMode()\n\t{\n if(isset($this->_config['mode']) && $this->_config['mode']) {\n $this->_mode =$this->_config['mode'];\n }\n \n\t\treturn $this->_mode;\n\t}", "function readConfigs(){\n\t\t$configFile = file_get_contents('../dashconfig');\n\t\t$xmlConfig = simplexml_load_string($configFile);\n\n\t\tforeach($xmlConfig->children() as $block){\n\t\t\t$blockConfig = array();\n\n\t\t\t// Handle clock blocks\n\t\t\tif(strtolower($block->provider) == 'clock'){\n\t\t\t\t$blockConfig['provider'] = $block->provider;\n\t\t\t\t$blockConfig['name'] = $block->name;\n\t\t\t\t$blockConfig['timezone'] = $this->Clock_getTimeOffset($block->timezone);\n\t\t\t\tarray_push($this->configurations,$blockConfig);\n\t\t\t}\n\n\n\t\t\t// Handle easyEmployer blocks\n\t\t\tif(strtolower($block->provider) == 'easyemployer'){\n\t\t\t\tif(strtolower($block->feature) == 'deploy time'){\n\t\t\t\t\t$blockConfig['feature'] = 'Deploy Time';\n\t\t\t\t\t$blockConfig['version']=$this->EE_GetDeployTime($block->server);\n\t\t\t\t}elseif(strtolower($block->feature) == 'status'){\n\t\t\t\t\t$blockConfig['feature'] = 'Server Status';\n\t\t\t\t\t$blockConfig['status'] = $this->EE_GetServerStatus($block->server);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$blockConfig['name']=$block->name;\n\t\t\t\t$blockConfig['provider'] = 'easyEmployer';\n\t\t\t\tarray_push($this->configurations,$blockConfig);\n\n\t\t\t}\n\n\n\t\t\t// Handle Gitlab blocks\n\t\t\tif(strtolower($block->provider) == 'gitlab'){\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\n\t\treturn $this->configurations;\n\t}", "public function getExportModes();", "function get_mode_indicator() {\n\t\t$this->ar_data['MOD'] = $this->_binarize($this->ar_config['MOD'][$this->mode], 4);\n\t\t$this->log[] = 'Mode indicator set: ' . $this->ar_data['MOD'];\n\t}", "abstract protected function getDisplayModes();", "function read($filename){\n\t\t$this->data = $this->session->readJavaConfig($filename, '%', $this->data);\n\t\t$this->session->trace(TRACE_CONFIG, 'Config.read(): '\n\t\t\t. count($this->data) . ' vars');\n\t}", "protected function getMode() {}", "public function seedReadConfig()\n\t{\n\t\t// File name\n\t\treturn array(\n\t\t\t\tarray(''),\n\t\t\t\tarray('empty')\n\t\t\t\t);\n\t}", "public function getMode();", "public function getMode();", "public function getMode();", "public function getMode();", "static public function getRulesFromFile()\n {\n $rules_array = self::getConfigFile('rules');\n \n return $rules_array;\n }", "function readConfiguration() {\n\n\tglobal $config;\n\n\t// Enumerate the potential variables to look for\t\n\t$potential_env_vars = [\n\t\t'CAM_LOG_DEBUG',\n\t\t'CAM_STORAGE_METHOD',\n\t\t'CAM_STORAGE_DIRECTORY',\n\t\t'CAM_MAX_WIDTH',\n\t\t'CAM_OUTPUT_QUALITY',\n\t\t'CAM_INTERVAL_TIME_SECS',\n\t\t'CAM_CLEAN_TIME_MINS',\n\t\t'CAM_RETENTION_TIME_HOURS',\n\t\t'CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS',\n\t\t'CAM_FONT',\n\t\t'CAM_FONT_COLOR',\n\t\t'CAM_FONT_SIZE',\n\t\t'CAM_SEAFILE_URL',\n\t\t'CAM_SEAFILE_APITOKEN',\n\t\t'CAM_SEAFILE_LIBRARY_ID',\n\t\t'CAM_SEAFILE_ENCRYPTION_KEY'\n\t\t];\n\n\t// Set the defaults into the config array\n\tlog_info(\"Setting default configuration\");\n\t$config['CAM_LOG_DEBUG'] = false;\n\t$config['CAM_STORAGE_METHOD'] = \"local\";\n\t$config['CAM_MAX_WIDTH'] = 1280;\n\t$config['CAM_OUTPUT_QUALITY'] = 80;\n\t$config['CAM_INTERVAL_TIME_SECS'] = 60;\n\t$config['CAM_CLEAN_TIME_MINS'] = 60;\n\t$config['CAM_RETENTION_TIME_HOURS'] = 24;\n\t$config['CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS'] = 60;\n\t$config['CAM_FONT'] = \"/usr/share/fonts/truetype/droid/DroidSans-Bold.ttf\";\n\t$config['CAM_FONT_COLOR'] = \"#FF0000\";\n\t$config['CAM_FONT_SIZE'] = 14;\n\t//$config['CAM_FONT'] = \"/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf\";\t// Use this when running on Ubuntu\n\n\t// Look through each of the environment variables that are prefaced by \"CAM_\" and place them in the the config array\t\n\tlog_info(\"Reading environment variables\");\n\t\n\tforeach($potential_env_vars as $env_var) {\t\n\t\tif (array_key_exists($env_var, $_ENV)) {\n\t\t\tlog_debug($env_var . \": \" . $_ENV[$env_var]);\n\t\t\t$config[$env_var] = $_ENV[$env_var];\n\t\t}\n\t}\n\t\n\t// Get the camera URLs from environment varaibles\n\tlog_info(\"Processing image url configuration\");\n\t$config['CAM_URLS'] = getCameraUrls();\n\t\n\t// Exit if we didn't find a CAM_STORAGE_DIRECTORY variable\n\tif (!array_key_exists('CAM_STORAGE_DIRECTORY', $config)) {\n\t\tlog_error(\"Exiting due to CAM_STORAGE_DIRECTORY not being detected in the environment variables\");\n\t\texit(1);\n\t}\t\n\t\n\t// Exit if we didn't find any URLs to monitor\n\tif (count($config['CAM_URLS']) == 0) {\n\t\tlog_error(\"Exiting due to no CAM_IMAGE_URLx configurations detected in the environment variables\");\n\t\texit(1);\n\t}\n\n\t// Do some sanity checks of the configuration\n\tlog_info(\"Error checking configuration\");\n\n\tif (!is_numeric($config['CAM_OUTPUT_QUALITY'])) {\n\t\tlog_error(\"Cannot accept CAM_OUTPUT_QUALITY of \" . $config['CAM_OUTPUT_QUALITY']);\n\t\texit(1);\n\t}\n\n\tif (!is_numeric($config['CAM_MAX_WIDTH']) || $config['CAM_MAX_WIDTH'] < 10) {\n\t\tlog_error(\"Cannot accept CAM_MAX_WIDTH of \" . $config['CAM_MAX_WIDTH']);\n\t\texit(1);\n\t}\n\n\tif (!is_numeric($config['CAM_INTERVAL_TIME_SECS'])) {\n\t\tlog_error(\"Cannot accept CAM_INTERVAL_TIME_SECS of \" . $config['CAM_INTERVAL_TIME_SECS']);\n\t\texit(1);\n\t}\n\n\tif (!is_numeric($config['CAM_CLEAN_TIME_MINS'])) {\n\t\tlog_error(\"Cannot accept CAM_CLEAN_TIME_MINS of \" . $config['CAM_CLEAN_TIME_MINS']);\n\t\texit(1);\n\t}\n\n\tif (!is_numeric($config['CAM_RETENTION_TIME_HOURS'])) {\n\t\tlog_error(\"Cannot accept CAM_RETENTION_TIME_HOURS of \" . $config['CAM_RETENTION_TIME_HOURS']);\n\t\texit(1);\n\t}\n\t\n\tif ($config['CAM_STORAGE_METHOD'] != \"local\" && $config['CAM_STORAGE_METHOD'] != \"seafile\") {\n\t\tlog_error(\"Cannot accept CAM_STORAGE_METHOD of \" . $config['CAM_STORAGE_METHOD'] . \" - please use either local or seafile\");\n\t\texit(1);\n\t}\n\n\t// Check required vars for the seafile storage method\n\tif ($config['CAM_STORAGE_METHOD'] == \"seafile\") {\n\t\t$necessary_seafile_values = ['CAM_SEAFILE_URL', 'CAM_SEAFILE_APITOKEN', 'CAM_SEAFILE_LIBRARY_ID'];\n\t\t\n\t\tforeach($necessary_seafile_values as $var) {\n\t\t\tif (!array_key_exists($var,$config)) {\n\t\t\t\tlog_error($var. \" must be set to use CAM_STORAGE_METHOD of seafile\");\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// If we're using encryption for seafile, then make sure the timeout is numeric\n\tif (array_key_exists('CAM_SEAFILE_ENCRYPTION_KEY',$config)) {\n\t\tif (!is_numeric($config['CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS'])) {\n\t\t\tlog_error(\"Cannot accept CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS of \" . $config['CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS']);\n\t\t\texit(1);\n\t\t}\n\t}\n\t\n\t// Remove trailing slash from CAM_STORAGE_DIRECTORY if it exists\n\tif (substr($config['CAM_STORAGE_DIRECTORY'],-1) == \"/\") {\n\t\t$config['CAM_STORAGE_DIRECTORY'] = substr($config['CAM_STORAGE_DIRECTORY'], 0, strlen($config['CAM_STORAGE_DIRECTORY']) - 1);\n\t}\n\t\n}", "function aplGetFileSettings()\n {\n $file_settings_array=array();\n\n $file_content=@file_get_contents(APL_DIRECTORY.\"/\".APL_LICENSE_FILE_LOCATION);\n preg_match_all(\"/<([A-Z_]+)>(.*?)<\\/([A-Z_]+)>/\", $file_content, $matches, PREG_SET_ORDER);\n if (!empty($matches))\n {\n foreach ($matches as $value)\n {\n if (!empty($value[1]) && $value[1]==$value[3])\n {\n $file_settings_array[$value[1]]=$value[2];\n }\n }\n }\n\n return $file_settings_array;\n }", "function change_mode_cf( $init ) {\n $edmode = 'specific_textareas';\n\t$init['mode'] = $edmode;\n return $init;\n}", "function read()\r\n\t\t{\r\n\t\t\t$this->open();\r\n\t\t\t$this->config=new stdclass;\r\n\t\t\twhile(!feof($this->handle))\r\n\t\t\t{\r\n\t\t\t\t$this->loadOneLine(fgets($this->handle));\r\n\t\t\t}\r\n\t\t\t$this->close();\r\n\t\t\t//print_r($this->config); //@test\r\n\t\t}", "public function getConfigArray();", "public static function validateModes($dat)\n {\n if(!is_array($dat))\n return [];\n\n for ($i=0; $i < count($dat); $i++) {\n $dat[$i]['modes'] = sprintf('%e', (int)$dat[$i]['modes']);\n $dat[$i]['maxFrequency'] = sprintf('%e', (float)$dat[$i]['maxFrequency']);\n }\n return $dat;\n }", "protected function getModeValuesAvailable()\n {\n $availableModes = tx_rnbase_util_Strings::trimExplode(\n ',',\n $this->getConfigurations()->get($this->getConfId().'availableModes')\n );\n\n return (array) $availableModes;\n }", "function readrun_xml($run, $runindex) {\n $this->_SetSite($run);\n $xml = simplexml_load_file($runindex);\n \n $count_detectors = 0;\n foreach( $xml->run->detector as $detector ) {\n $detname = $detector->detname . '';\n $this->runlist[$run]['detectors'][$count_detectors] = array(\n 'detname' => $detname,\n 'figures' => array(),\n 'channels' => array()\n );\n \n $count_figures = 0;\n foreach($detector->figure as $figure) {\n $this->runlist[$run]['detectors'][$count_detectors]['figures'][$count_figures] = array(\n 'path' => $this->site_nopasswd . $this->prefix . ($figure->path . ''),\n 'figname' => $figure->figname . '',\n 'rootPath' => $this->site_nopasswd . $this->prefix . dirname($figure->rootPath),\n 'figtitle' => $figure->figtitle . ''\n );\n $count_figures++;\n } // foreach($detector->figure as $figure) done\n \n $count_channels = 0;\n foreach($detector->channel as $channel) {\n $this->runlist[$run]['detectors'][$count_detectors]['channels'][$count_channels] = array(\n 'channelname' => $channel->channelname . '',\n 'figures' => array()\n );\n \n $count_channel_figures = 0;\n foreach($channel->figure as $figure) {\n $this->runlist[$run]['detectors'][$count_detectors]['channels'][$count_channels]['figures'][$count_channel_figures] = array(\n 'path' => $this->site_nopasswd . $this->prefix . $figure->path,\n 'figname' => $figure->figname . '',\n 'rootPath' => $this->site_nopasswd . $this->prefix . dirname($figure->rootPath),\n 'figtitle' => $figure->figtitle . ''\n );\n $count_channel_figures++;\n }\n $count_channels++;\n \n } // foreach($detector->channel as $channel) done\n \n $count_detectors++;\n } // foreach( $xml->run->detector as $detector ) done\n }", "private function getViewModes() {\n $entity_type_id = $this->getEntity()->getEntityTypeId();\n $entity_bundle = $this->getEntity()->bundle();\n\n /** @var \\Drupal\\Core\\Entity\\EntityDisplayRepositoryInterface $entity_display_repository */\n $entity_display_repository = \\Drupal::service('entity_display.repository');\n // Get active view modes.\n $options = $entity_display_repository->getViewModeOptionsByBundle($entity_type_id, $entity_bundle);\n\n // Init options variable.\n $modes_by_id = [];\n\n // Extract key/value pairs.\n foreach ($options as $key => $label) {\n // Add in only valid options.\n if (is_string($key) && is_string($label)) {\n $modes_by_id[$key] = $label;\n }\n }\n\n return $modes_by_id;\n }", "function rrc_modes($value, $key, $module_id)\n\t{\n\t\treturn acp_gallery_config::rrc_modes($value, $key, $module_id);\n\t}", "function readconfig($filename) {\n\n $tags = array();\n $values = 0;\n\n $data = implode(\"\",file($filename));\n $parser = xml_parser_create();\n xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);\n xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);\n xml_parse_into_struct($parser,$data,$values,$tags);\n xml_parser_free($parser);\n\n // loop through the structures\n foreach ($tags as $key=>$val) {\n if ($key == \"db\") {\n $noderanges = $val;\n // each contiguous pair of array entries are the\n // lower and upper range for each node definition\n for ($i=0; $i < count($noderanges); $i+=2) {\n $offset = $noderanges[$i] + 1;\n $len = $noderanges[$i + 1] - $offset;\n $tdb[] = $this->parseXML(array_slice($values, $offset, $len));\n }\n } else {\n continue;\n }\n }\n return $tdb;\n }", "function getMode ()\n\t{\n\t\treturn $this->_mode ;\n\t}", "Function loadConfig() {\r\n\t$xml_config = simplexml_load_file ( 'data/config/config.xml' );\r\n\t// stefan : cr�ation d'un array\r\n\t$config = [];\r\n\t// stefan : pour chaque élément ...\r\n\tforeach ( $xml_config as $xml_option ) {\r\n\t\t// stefan : on ajoute l'option ainsi que son texte\r\n\t\t$xml_nom_option = utf8_decode(strval($xml_option->nom));\r\n\t\t$xml_texte_affichage_option = utf8_decode(strval($xml_option->texte_affichage));\r\n\t\t$xml_valeur_option = utf8_decode(strval($xml_option->valeur));\r\n\r\n\t\t/* stefan : concernant les valeurs bool�ennes\r\n\t\t * elles sont stockées en tant que string.\r\n\t\t * is_bool ne permet pas de faire la conversion\r\n\t\t * en boolean.\r\n\t\t * On passe donc par un test de valeur de la string :\r\n\t\t * si c'est 'true', alors on stocke une valeur booléenne true,\r\n\t\t * si c'est 'false', alors on stocke une valeur booléenne false.\r\n\t\t */\r\n\t\tif ($xml_valeur_option=='true'){\r\n\t\t\t$xml_valeur_option = true;\r\n\t\t}\r\n\t\telse if ($xml_valeur_option=='false'){\r\n\t\t\t$xml_valeur_option = false;\r\n\t\t}\r\n\t\t/* stefan : le seul test automatisable concerne les nombre.\r\n\t\t * is_numeric permet de parser (parcourir) la string.\r\n\t\t * Si tous les caract�res sont des nombres, alors il s'agit\r\n\t\t * bien d'un numeric (integer, float, ...).\r\n\t\t */\r\n\t\telse if (is_numeric ($xml_valeur_option)){\r\n\t\t\t$xml_valeur_option = (int)$xml_valeur_option;\r\n\t\t}\r\n\t\t/* stefan : sinon, il s'agit d'une valeur string.\r\n\t\t */\r\n\t\t$config [$xml_nom_option] = [$xml_texte_affichage_option,$xml_valeur_option];\r\n\t}\r\n\treturn $config;\r\n}", "public function __construct($mode = [])\n {\n $this->filePath = $this->getFilePath($this->extension);\n $this->mode = $this->mode ?? $mode;\n }", "public function get_file_areas() {\n return array();\n }", "private function readModules() {\n $modules = array();\n\n $path = new File(Zibo::DIRECTORY_MODULES);\n $files = $path->read();\n foreach ($files as $file) {\n // skip hidden files\n if (strncmp($file->getName(), '.', 1) === 0) {\n continue;\n }\n\n $fileModules = $this->getModulesFromPath($file);\n\n $modules = Structure::merge($modules, $fileModules);\n }\n\n $this->model->addModules($modules);\n }", "function set_modes($mode,$value) {\n\t\t//-------------------------------\n\t\t\tswitch($mode) {\n\t\t\t\tcase 'safe':\n\t\t\t\t\t$this->safe_mode=$value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'check':\n\t\t\t\t\t$this->check_mode=$value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'flatten':\n\t\t\t\t\t$this->flatten_mode=$value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'compress_mode':\n\t\t\t\t\t$this->compress_mode=$value;\n\t\t\t\t\tif($value) $this->uncompress_mode=false;\n\t\t\t\tbreak;\n\t\t\t\tcase 'uncompress_mode':\n\t\t\t\t\t$this->uncompress_mode=$value;\n\t\t\t\t\tif($value) $this->compress_mode=false;\n\t\t\t\tbreak;\n\t\t\t\tcase 'verbose':\n\t\t\t\t\t$this->verbose=$value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'halt':\n\t\t\t\t\t$this->halt_mode=$value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'verbose_level':\n\t\t\t\t\t$this->verbose_level=$value;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->Error(\"set_modes error, Invalid mode '<i>$mode</i>'\");\n\t\t\t}\n\t\t}", "abstract public function GetPresetInfo(): array;", "private function loadFlagsFromSource() {\n $files = $this->loadSwitchFiles();\n if (!count($files))\n return [];\n\n $blacklist = file(__DIR__ . '/blacklist.txt');\n foreach ($blacklist as $file) {\n $file = trim($file);\n if (!strlen($file) || substr($file, 0, 1) == '#')\n continue;\n\n if (!array_key_exists($file, $files))\n continue;\n\n unset($files[$file]);\n }\n\n if (!count($files))\n return [];\n\n $this->m_switches = array();\n $this->m_preProcessorStack = array();\n\n foreach ($files as $filename => $content) {\n if ($this->parseFile($filename, $content))\n continue;\n\n Warning('CommandLineFlags: Unable to parse source file \"' . $filename . '\".');\n }\n \n Info('CommandLineFlags: Found ' . count($this->m_switches) . ' switches in ' . count($files) . ' files (source).');\n return $this->m_switches;\n }", "protected function getSettings() {\n\t\t// Return an empty array if the file doesn't exist yet.\n\t\tif (!is_file($this->filePath)) return array();\n\n\t\t// Attempt to decode file data. If there's an array, return an empty array.\n\t\t$data = file_get_contents($this->filePath);\n\t\t$settings = @unserialize($data);\n\t\tif (!is_array($settings)) return array();\n\n\t\treturn $settings;\n\t}", "function readConfig () {\n\t\tglobal $siteTypes;\n\t\tif(!file_exists(CONFIGPATH . $this->_configFile)) {\n\t\t\tdie('Unable to find '. $this->_configFile .' file, please check your application configuration');\n\t\t}\n\t\t$ext = PPI_Helper::getFileExtension($this->_configFile);\n\t\t$sHostname = getHTTPHostname();\n\t\t$siteType = array_key_exists($sHostname, $siteTypes) ? $siteTypes[$sHostname] : 'development';\n\t\tswitch($ext) {\n\t\t\tcase 'ini':\n\t\t\t\t$this->_oConfig = new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_configFile, true), $siteType);\n\t\t\t\tbreak;\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "function get_mode($file){\r\n\t$Mode = fileperms($file);\r\n\t$theMode = ' '.decoct($Mode);\r\n\t$theMode = substr($theMode,-4);\r\n\t$Owner = array();$Group=array();$World=array();\r\n\tif ($Mode &0x1000) $Type = 'p'; // FIFO pipe\r\n\telseif ($Mode &0x2000) $Type = 'c'; // Character special\r\n\telseif ($Mode &0x4000) $Type = 'd'; // Directory\r\n\telseif ($Mode &0x6000) $Type = 'b'; // Block special\r\n\telseif ($Mode &0x8000) $Type = '-'; // Regular\r\n\telseif ($Mode &0xA000) $Type = 'l'; // Symbolic Link\r\n\telseif ($Mode &0xC000) $Type = 's'; // Socket\r\n\telse $Type = 'u'; // UNKNOWN \r\n\t// Determine les permissions par Groupe\r\n\t$Owner['r'] = ($Mode &00400) ? 'r' : '-';\r\n\t$Owner['w'] = ($Mode &00200) ? 'w' : '-';\r\n\t$Owner['x'] = ($Mode &00100) ? 'x' : '-';\r\n\t$Group['r'] = ($Mode &00040) ? 'r' : '-';\r\n\t$Group['w'] = ($Mode &00020) ? 'w' : '-';\r\n\t$Group['e'] = ($Mode &00010) ? 'x' : '-';\r\n\t$World['r'] = ($Mode &00004) ? 'r' : '-';\r\n\t$World['w'] = ($Mode &00002) ? 'w' : '-';\r\n\t$World['e'] = ($Mode &00001) ? 'x' : '-'; \r\n\t// Adjuste pour SUID, SGID et sticky bit\r\n\tif ($Mode &0x800) $Owner['e'] = ($Owner['e'] == 'x') ? 's' : 'S';\r\n\tif ($Mode &0x400) $Group['e'] = ($Group['e'] == 'x') ? 's' : 'S';\r\n\tif ($Mode &0x200) $World['e'] = ($World['e'] == 'x') ? 't' : 'T';\r\n\t$Mode = $Type.$Owner['r'].$Owner['w'].$Owner['x'].' '.\r\n\t\t\t$Group['r'].$Group['w'].$Group['e'].' '.\r\n\t\t\t$World['r'].$World['w'].$World['e'];\r\n\treturn $Mode.' ('.$theMode.') ';\r\n}", "protected function mergeModeConfig()\n {\n $this->mergeConfig($this->configPath . DIRECTORY_SEPARATOR . 'mode' . DIRECTORY_SEPARATOR . $this->mode . '.php');\n }", "abstract protected function getDisplayModesLink();", "private function loadFromFile(): array\n {\n $file = config_path('options.php');\n\n if(! file_exists($file)) {\n return [];\n }\n\n return require $file;\n }", "public function getMode(){\n return $this->_mode;\n }", "function __construct($mode) {\n $this->_mode = $mode;\n $this->setConfig();\n }", "public function get_mode() {\n return $this->mode;\n }", "public function resources () {\n\t\tif ($this->resources === null) {\n\t\t\t$files = glob ('apps/*/conf/acl.php');\n\t\t\t$files = is_array ($files) ? $files : array ();\n\t\t\t$this->resources = array ();\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$resources = parse_ini_file ($file);\n\t\t\t\tif (! is_array ($resources)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->resources = array_merge ($this->resources, $resources);\n\t\t\t}\n\t\t\tasort ($this->resources);\n\t\t}\n\t\treturn $this->resources;\n\t}", "private function readFeatures(): void\n {\n $file = $this->configPath.self::FEATURES_FILE_NAME;\n if (!file_exists($file))\n {\n throw new CoreException('Could not find features file.');\n }\n\n $this->features = yaml_parse_file($file);\n }", "protected function readIni() {\n\t\t$this->_data = array(self::TYPE_ROLES => array(), self::TYPE_RULES => array(), self::TYPE_ASSERTIONS => array());\n\n\t\t$config = new Zend_Config_Ini($this->_name);\n\t\tif ($config instanceof Zend_Config) {\n\t\t\t$property = self::TYPE_ROLES;\n\t\t\t$roles = $config->acl->$property;\n\t\t\t$property = self::TYPE_RULES;\n\t\t\t$rules = $config->acl->$property;\n\t\t\t$property = self::TYPE_ASSERTIONS;\n\t\t\t$assertions = $config->acl->$property;\n\t\t\t// lees de roles uit de configuratie en plaats deze in de data-array\n\t\t\tforeach ($roles as $name => $parents) {\n\t\t\t\tif (!isset($this->_data[self::TYPE_ROLES][$name])) {\n\t\t\t\t\tif (empty($parents)) {\n\t\t\t\t\t\t$parents = null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$parents = explode(',', $parents);\n\t\t\t\t\t}\n\t\t\t\t\t$this->_data[self::TYPE_ROLES][$name] = $parents;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// lees de rules uit de configuratie en plaats deze in de data-array als losse records\n\t\t\tforeach ($rules as $permission => $modules) {\n\t\t\t\t$row = $this->createRuleObject(new StdClass());\n\t\t\t\t$this->handleConfig(self::LEVEL_PERMISSION, $permission, $modules, $row);\n\t\t\t}\n\t\t\tforeach($assertions as $module => $controllers) {\n\t\t\t\t$row = $this->createRuleObject(new StdClass());\n\t\t\t\t$row->permission = self::PERMISSION_ASSERT;\n\t\t\t\t$this->handleConfig(self::LEVEL_MODULE, $module, $controllers, $row);\n\t\t\t}\n\t\t\t//Zend_Registry::get('logger')->debug(__METHOD__. ' - config: '.print_r($this->_data, true));\n\t\t}\n\t}", "public function get_mode() {\n\t\t\tif ( isset( $this->project['mode'] ) ) {\n\t\t\t\treturn $this->project['mode'];\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function readConfigs() \n\t{\n $paths = array('~/bookability.ini', '/etc/bookability.ini');\n foreach($paths as $path) \n\t\t{\n if (file_exists($path)) \n\t\t\t{\n $config = parse_ini_file($path);\n if ($config) \n\t\t\t\t{\n return $config;\n }\n }\n }\n return array();\n }", "public function get_mode()\n\t{\n\n\t\treturn $this->mode;\n\t}", "function permission_file_read() \n{\n $xml_file = ROOT.'includes/acl/permission_list.xml';\n $permissions = array();\n $category_count = 0;\n $xmlreader = new XMLReader;\n // Open XML file\n if (!$xmlreader->open($xml_file)) {\n return false;\n }\n // Step through each element in the file\n while ($xmlreader->read()) {\n // Skip comments and other useless nodes\n if ($xmlreader->nodeType == XMLReader::DOC_TYPE\n || $xmlreader->nodeType == XMLReader::COMMENT\n || $xmlreader->nodeType == XMLReader::XML_DECLARATION\n ) {\n continue;\n }\n // Handle categories\n if ($xmlreader->name == 'category' && $xmlreader->nodeType == XMLReader::ELEMENT) {\n $key_count = 0;\n $cat_name = $xmlreader->getAttribute('name');\n $permissions[$category_count] = array();\n $permissions[$category_count]['name'] = $cat_name;\n $permissions[$category_count]['items'] = array();\n }\n if ($xmlreader->name == 'category' && $xmlreader->nodeType == XMLReader::END_ELEMENT) {\n $category_count++;\n }\n // Handle discrete items\n if ($xmlreader->name == 'key' && $xmlreader->nodeType == XMLReader::ELEMENT) {\n $key_name = $xmlreader->getAttribute('name');\n $key_title = $xmlreader->getAttribute('title');\n $key_description = $xmlreader->getAttribute('description');\n $key_default = $xmlreader->getAttribute('default');\n $permissions[$category_count]['items'][$key_count]['name'] = $key_name;\n $permissions[$category_count]['items'][$key_count]['title'] = $key_title;\n $permissions[$category_count]['items'][$key_count]['description'] = $key_description;\n $permissions[$category_count]['items'][$key_count]['regex'] = false;\n if ($key_default == '') {\n $permissions[$category_count]['items'][$key_count]['default'] = 0;\n } else {\n $permissions[$category_count]['items'][$key_count]['default'] = 1;\n }\n $key_count++;\n }\n // Handle regex items\n if ($xmlreader->name == 'key_range' && $xmlreader->nodeType == XMLReader::ELEMENT) {\n $key_name = $xmlreader->getAttribute('regex');\n $permissions[$category_count]['items'][$key_count]['name'] = $key_name;\n $permissions[$category_count]['items'][$key_count]['regex'] = true;\n $key_count++;\n }\n }\n\n $xmlreader->close();\n return $permissions;\n}", "private static function readEnvArrayFile() {\n\t\t$targetFiles = array(\n\t\t\tpath('.env.php')\n\t\t);\n\n\t\tforeach ($targetFiles as $targetFilePath) {\n\t\t\tif (file_exists($targetFilePath) && is_readable($targetFilePath)) {\n\t\t\t\t$contents = require $targetFilePath;\n\n\t\t\t\tif (is_string($contents)) {\n\t\t\t\t\tstatic::injectDotEnvString($contents);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!is_array($contents)) {\n\t\t\t\t\tthrow new Exception('Expected env.php file to return array, got ' . gettype($contents));\n\t\t\t\t}\n\n\t\t\t\tforeach ($contents as $key => $value) {\n\t\t\t\t\t$key = strtolower($key);\n\n\t\t\t\t\tif (!is_string($value)) {\n\t\t\t\t\t\t$value = static::convertValueToString($value);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!is_null($value)) {\n\t\t\t\t\t\tstatic::$fileData[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function openFile($mode);", "function user_insertModes($config) {\n\t\t$sources = tx_pnfgallery_sources_manager::getSubscribers();\n\t\tif (!empty($sources)) {\n\t\t\t$row = $config['row'];\n\t\t\tif ($row) {\n\t\t\t\t$flexData = (!empty($row['pi_flexform'])) ? (t3lib_div::xml2array($row['pi_flexform'])) : (array('data' => array()));\n\t\t\t\tforeach ($sources as $key => $obj) {\n\t\t\t\t\t$items = $obj->flexform_addModes($config, $flexData);\n\t\t\t\t\tif (is_array($items) && !empty($items)) {\n\t\t\t\t\t\t$config['items'] = array_merge($config['items'], $items);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $config;\n\t}", "public function scanFeatures()\n\t{\n\t\t$application = Application::current();\n\t\t$files = $application->include_path->getSourceFiles();\n\t\t/** @var $php_files_features Feature[] */\n\t\t/** @var $yaml_files_features Feature[] */\n\t\t$php_files_features = [];\n\t\t$yaml_files_features = [];\n\t\tforeach ($files as $filename) {\n\t\t\tif (substr($filename, -5) === '.yaml') {\n\t\t\t\tif (substr($filename, 0, 34) !== 'saf/framework/user/group/defaults/')\n\t\t\t\t\t$yaml_files_features = array_merge($yaml_files_features, $this->scanYamlFile($filename));\n\t\t\t}\n\t\t\telseif (substr($filename, -4) === '.php') {\n\t\t\t\t$php_files_features = array_merge($php_files_features, $this->scanPhpFile($filename));\n\t\t\t}\n\t\t}\n\t\treturn array_merge($php_files_features, $yaml_files_features);\n\t}", "public function get_fileareas() {\n return array('course');\n }", "static public function parse() {\n\t\t$config = Dispatcher::config();\n\t\t$faq = array();\n\n\t\tself::parse_file( $faq, 'faq', '', '' );\n\n\t\tif ( Util_Environment::is_w3tc_pro( $config ) )\n\t\t\tself::parse_file( $faq, 'faq-pro', 'pro', '<b>Pro:</b> ' );\n\n\t\treturn $faq;\n\t}", "public static function getPermissionConfigs()\n {\n $modulePermissionConfigs = array();\n $modules = app_path().\"/Modules/\";\n\n $files = glob($modules.\"*\");\n\n foreach ($files as $file) {\n if (is_dir($file)) {\n if (file_exists($file.'/Config/permissions.matrix.php')) {\n $moduleName = str_replace(app_path().'/Modules/', '', $file);\n $modulePermissionConfigs[$moduleName] = include($file.'/Config/permissions.matrix.php');\n }\n }\n }\n\n return $modulePermissionConfigs;\n }", "protected function getEditmodeOptions() : array {}", "public function getMode()\n\t{\n\t\treturn $this->mode;\n\t}", "public function obtenerParamArchivoConf($proyecto_id, $nombre_arch_conf)\n {\n $arr_parametros=array();\n $proyecto=R::load('proyecto', $proyecto_id);\n $path=$proyecto->path; \n $arch_conf = fopen($path.DIRECTORY_SEPARATOR.$nombre_arch_conf, \"r+\") or die(\"Unable to open file!\");\n \n $count_buscar=\"count=\";\n $range_buscar=\"range=\";\n $rect_world_width_buscar=\"width=\";\n $rect_world_height_buscar=\"height=\";\n $seed_buscar=\"seed=\";\n $max_iterations_buscar=\"max_iterations=\";\n $edge_model_buscar=\"edge_model=\";\n $comm_model_buscar=\"comm_model=\";\n $transm_model_buscar=\"transm_model=\";\n \n $arr_parametros[\"count\"]=\"\"; \n $arr_parametros[\"range\"]=\"\"; \n $arr_parametros[\"rect_world_width\"]=\"\"; \n $arr_parametros[\"rect_world_height\"]=\"\";\n $arr_parametros[\"seed\"]=\"\";\n $arr_parametros[\"max_iterations\"]=\"\";\n $arr_parametros[\"edge_model\"]=\"0\";\n $arr_parametros[\"comm_model\"]=\"0\";\n $arr_parametros[\"transm_model\"]=\"0\";\n \n while(!feof($arch_conf)) \n { \n $linea=fgets($arch_conf);\n \n //reemplaza el final de linea por un espacio en blanco para realizar la busqueda de parametros\n $linea=str_replace(PHP_EOL, \" \", $linea);\n //echo $linea . '<br>';\n $count=$this->obtenerStringParametro($linea, $count_buscar, \" \");\n if($count <> \"\")\n {\n $arr_parametros[\"count\"]=$count; \n }\n \n $range=$this->obtenerStringParametro($linea, $range_buscar, \" \");\n \n if($range <> \"\")\n { \n $arr_parametros[\"range\"]=$range; \n }\n \n $rect_world_width=$this->obtenerStringParametro($linea, $rect_world_width_buscar, \" \");\n if($rect_world_width <> \"\")\n {\n $arr_parametros[\"rect_world_width\"]=$rect_world_width; \n }\n \n $rect_world_height=$this->obtenerStringParametro($linea, $rect_world_height_buscar, \" \");\n if($rect_world_height <> \"\"){\n $arr_parametros[\"rect_world_height\"]=$rect_world_height;\n }\n \n $seed=$this->obtenerStringParametro($linea, $seed_buscar, \" \");\n if($seed <> \"\")\n {\n $arr_parametros[\"seed\"]=$seed; \n }\n \n $max_iterations=$this->obtenerStringParametro($linea, $max_iterations_buscar, \" \");\n if($max_iterations <> \"\")\n {\n $arr_parametros[\"max_iterations\"]=$max_iterations;\n }\n \n $edge_model=$this->obtenerStringParametro($linea, $edge_model_buscar, \" \");\n \n if($edge_model <> \"\")\n {\n $arr_parametros[\"edge_model\"]=$edge_model;\n }\n \n $comm_model=$this->obtenerStringParametro($linea, $comm_model_buscar, \" \");\n \n if($comm_model <> \"\")\n {\n $arr_parametros[\"comm_model\"]=$comm_model;\n }\n \n $transm_model=$this->obtenerStringParametro($linea, $transm_model_buscar, \" \");\n \n if($transm_model <> \"\")\n {\n $arr_parametros[\"transm_model\"]=$transm_model;\n } \n \n }\n \n fclose($arch_conf); \n \n return $arr_parametros; \n }", "function sys_idebus() {\n\t$results = array();\n\t$handle = opendir( \"/proc/ide\" );\n\twhile ( $file = readdir($handle) ) {\n\t\tif ( preg_match( \"/^hd/\", $file ) ) { \n\t\t\t$results[\"$file\"] = array();\n\n\t\t\tif ( $fd = fopen(\"/proc/ide/$file/model\", \"r\") ) {\n\t\t\t\t$results[\"$file\"][\"model\"] = trim( fgets($fd, 4096) );\n\t\t\t\tfclose( $fd );\n\t\t\t}\n\t\t\tif ( $fd = fopen(\"/proc/ide/$file/capacity\", \"r\") ) {\n\t\t\t\t$results[\"$file\"][\"capacity\"] = trim( fgets($fd, 4096) );\n\t\t\t\tfclose( $fd );\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($handle); \n\treturn $results;\n}", "public function getModules(){\n $files = glob(DIR_CONFIG.$this->codename.'/*.php');\n $results = array();\n if(!empty($files)){\n foreach ($files as $file) {\n $filename = basename($file, '.php');\n $module_setting = $this->getModuleSetting($filename);\n\n $results[$filename] = $module_setting['name'];\n }\n }\n return $results;\n }", "public function ds($mode)\n {\n\n if ($this->testModeInput($mode) === false) {\n $this->yell('must be a valid Mode: ' . implode(' | ', Tg::MODES));\n return;\n }\n\n if (file_exists(Tg::devLocation())) {\n $yaml = Yaml::parse(file_get_contents(Tg::devLocation()));\n if (array_key_exists($mode, $yaml)) {\n $output = \"{$mode} Dev Mode: \";\n $output .= ($yaml[$mode]) ? 'true' : 'false';\n $this->yell($output);\n return;\n }\n }\n $this->yell(\"{$mode} Dev Mode: false\");\n }", "public function getModeNames()\n {\n $modes = $this->getModes();\n\n if ($modes === null) {\n return null;\n }\n\n return array_keys($modes);\n }", "function read_system() {\n $content = file(ROOT_PATH . 'data/system.hbdata');\n foreach ((array) $content as $line) {\n $line = trim($line);\n if (strpos($line, '//') !== 0) {\n $arr = explode(':', $line);\n $setting[$arr[0]] = explode(',', $arr[1]);\n }\n }\n return $setting;\n }", "function getValidModes( $type ) {\n\t\t \n\t\t// beI,kfL,lj,psmntirRcOAQKVCuzNSMTGy\n\t\t// Oddly, Unreal places modes f & L in \"requires param to unset\" but doesn't enforce it (Unreal 3.2.8.1)\n\t\tif( $type == 'channel') {\n\t\t\treturn array(\n\t\t\t\t'list'\t\t\t=> 'beI',\n\t\t\t\t'paramset'\t\t=> 'fljL',\n\t\t\t\t'param'\t\t\t=> 'k',\n\t\t\t\t'flag'\t\t\t=> 'psmntirRcOAQKVCuzNSMTGy',\n\t\t\t\t'prefix'\t\t=> 'qaohv'\n\t\t\t\t);\n\t\t} elseif( $type == 'user' ) {\n\t\t\t// oOaANC dghipqrstvwxzBGHRSTVW\n\t\t\treturn array(\n\t\t\t\t'paramset'\t\t=> 's',\n\t\t\t\t'param'\t\t\t=> '',\n\t\t\t\t'flag'\t\t\t=> 'oOaANCdghipqrtvwxzBGHRSTVW'\n\t\t\t);\n\t\t} else {\n\t\t\tthrow new Exception('What kinds of modes are there other than channel and user...?');\n\t\t}\n\t}", "public function getConfigArray() {}", "public function readData()\n {\n $this->data = parse_ini_file (self::$soubor, true);\n }", "function __construct($mode) {\n $this->_mode = $mode;\n $this->setConfig();\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "function workshop_get_example_modes() {\n $modes = array();\n $modes[WORKSHOP_EXAMPLES_VOLUNTARY] = get_string('examplesvoluntary', 'workshop');\n $modes[WORKSHOP_EXAMPLES_BEFORE_SUBMISSION] = get_string('examplesbeforesubmission', 'workshop');\n $modes[WORKSHOP_EXAMPLES_BEFORE_ASSESSMENT] = get_string('examplesbeforeassessment', 'workshop');\n\n return $modes;\n}", "public function getMode()\n {\n return $this->getData('editor_config/mode');\n }", "public static function getMode(array $element) {\n if (empty($element['#mode']) || $element['#mode'] === static::MODE_AUTO) {\n return (WebformHtmlHelper::containsHtml($element['#value'])) ? static::MODE_HTML : static::MODE_TEXT;\n }\n else {\n return $element['#mode'];\n }\n }", "public function get_file_areas() {\n return array(\n ASSIGNSUBMISSION_mowaac_FILEAREA_SUBMISSION => get_string(\"mowaac_submissions_fa\", self::COMPONENT_NAME),\n ASSIGNSUBMISSION_mowaac_FILEAREA_TEST => get_string(\"mowaac_tests_fa\", self::COMPONENT_NAME)\n );\n }", "public function getMode() {\r\n return $this->mode;\r\n }", "function readConfig($configFile, $context)\n{\n\t$arrayConfigs = array();\n\t\n\t$arrayConfigs = parse_ini_file($configFile, true);\n\t$ancestors = contextAncestors($arrayConfigs,$context);\n\t\n\t$arrayConfig = array();\n\tforeach($ancestors as $ancestor)\n\t\t$arrayConfig = array_merge($arrayConfig,$arrayConfigs[$ancestor]);\n\t\n\treturn $arrayConfig;\n}", "public function open_configuration($mode) {\n $rpc = \"<rpc>\";\n $rpc.=\"<open-configuration>\";\n $rpc.=\"<\";\n\t$rpc.=$mode;\n\t$rpc.=\"/>\";\n $rpc.=\"</open-configuration>\";\n $rpc.=\"</rpc>\";\n $rpc.=\"]]>]]>\\n\";\n $rpcReply = $this->get_rpc_reply($rpc);\n $this->last_rpc_reply = $rpcReply;\n\t}", "public static function get_config_variables() {\n foreach(self::get_config_files() as $config_file) {\n $conf = LessCacheer::$extends->yaml->load($config_file); // parse the yaml\n foreach((array)$conf as $key=>$value) {\n // if the key value is a reserved space : all, prod or dev\n if (in_array($key, array('all', 'prod', 'dev'))) {\n $ignore_mode = LessCacheer::$conf['in_production'] === false ? 'prod' : 'dev';\n if ($key == 'all' || $key == $ignore_mode) { continue; }\n self::$less_config = array_merge_recursive($conf[$key], self::$less_config);\n } else {\n // else, the config is determined with the get param !\n if(!empty($_GET[$key])) {\n foreach($conf[$key] as $getkey=>$getvalue) {\n if ($_GET[$key] == $getkey) {\n self::$less_config = array_merge_recursive($conf[$key][$getkey], self::$less_config);\n }\n }\n }\n }\n }\n }\n // if there's a config for every mode, merge options with default conf if exists\n if (!empty($conf['all'])) {\n self::$less_config = array_merge_recursive($conf['all'], self::$less_config);\n }\n }", "private function loadSwitchFiles() {\n $directory = getcwd();\n $data = [];\n\n chdir(Configuration::$chromiumCheckout);\n {\n $files = preg_split('/\\s+/s', shell_exec('git ls-files --with-tree origin/main -x \"*switches.cc\" --ignored'), 0, PREG_SPLIT_NO_EMPTY);\n foreach ($files as $filename) {\n $absolute = Configuration::$chromiumCheckout . '/' . $filename;\n if (!file_exists($absolute)) {\n Error('CommandLineFlags: Invalid file from git index: ' . $filename);\n return [];\n }\n\n $data[$filename] = file_get_contents($absolute);\n }\n }\n chdir($directory);\n\n return $data;\n }", "public static function getModes() {\n return [\n 'implicit' => t('Implicit'),\n 'explicit' => t('Explicit'),\n ];\n }", "static function config_chmod() {\r\n $return = array();\r\n\r\n if (file_exists(ABSPATH . '/wp-config.php')) {\r\n $mode = substr(sprintf('%o', @fileperms(ABSPATH . '/wp-config.php')), -4);\r\n } else {\r\n $mode = substr(sprintf('%o', @fileperms(ABSPATH . '/../wp-config.php')), -4);\r\n }\r\n\r\n if (!$mode) {\r\n $return['status'] = 5;\r\n } elseif (substr($mode, -1) != 0) {\r\n $return['status'] = 0;\r\n $return['msg'] = $mode;\r\n } else {\r\n $return['status'] = 10;\r\n }\r\n\r\n return $return;\r\n }", "function parse_ini_file($filename,$process_sections=false)\n{\n\treturn array();\n}", "static function read($file,$dir='modcm'){ \r\n global $_cbase;\r\n $modid = $file; $base = DIR_DTMP; \r\n if(in_array($dir,array('modcm','dset'))){\r\n $key = \"_$file\";\r\n $file = \"/$dir/\".$key.\".cfg.php\";\r\n }elseif($dir=='modex'){\r\n return self::tmpItems($file); \r\n }elseif(in_array($dir,array('_c'))){ //栏目配置\r\n $key = \"_c_$file\"; \r\n $file = \"/modex/$key.cfg.php\";\r\n if(!file_exists(DIR_DTMP.$file)) return array();\r\n }elseif(in_array($dir,array('sy','ex'))){\r\n $key = \"_{$dir}_$file\";\r\n $file = \"/cfgs\".($dir=='sy' ? \"/sycfg\" : \"/excfg\").\"/\".substr($key,1).\".php\";\r\n $base = DIR_ROOT;\r\n }\r\n $file = \"$base$file\"; \r\n $ck = \"{$dir}_$key\";\r\n if(!isset(self::$_CACHES_YS[$ck])){\r\n if(file_exists($file)){ // inc大文件,其实很占时间\r\n require $file; \r\n $tmp = self::$_CACHES_YS[$ck] = isset($kk) ? $$kk : $$key;\r\n if(is_array($tmp) && (!empty($tmp['i'])) && is_string($tmp['i'])){\r\n self::$_CACHES_YS[$ck]['i'] = self::tmpItems($modid);\r\n }\r\n if(isset($_cbase['tpl']['bdpart'])){\r\n $bdpart = $_cbase['tpl']['bdpart'];\r\n if(isset($_cbase['lang'][$bdpart][\"i_$modid\"]) && isset($tmp['i'])){\r\n self::$_CACHES_YS[$ck]['i'] = basArray::Merge($tmp['i'], $_cbase['lang'][$bdpart][\"i_$modid\"]);\r\n }\r\n if(isset($_cbase['lang'][$bdpart][\"f_$modid\"]) && isset($tmp['f'])){\r\n self::$_CACHES_YS[$ck]['f'] = basArray::Merge($tmp['f'], $_cbase['lang'][$bdpart][\"f_$modid\"]);\r\n }\r\n }\r\n }else{ \r\n self::$_CACHES_YS[$ck] = array();\r\n }\r\n }\r\n return self::$_CACHES_YS[$ck];\r\n }" ]
[ "0.61061686", "0.5815112", "0.5768587", "0.568288", "0.5365242", "0.5291273", "0.5252863", "0.52204275", "0.5050391", "0.504972", "0.50009894", "0.4986231", "0.49650818", "0.49590683", "0.4945289", "0.4888503", "0.4873883", "0.48497123", "0.4842898", "0.4837291", "0.48260346", "0.48260346", "0.48260346", "0.48260346", "0.48243472", "0.4821362", "0.48124826", "0.48060703", "0.47649977", "0.47384706", "0.4731422", "0.47295514", "0.47199816", "0.47172472", "0.470217", "0.4696677", "0.4690199", "0.46896574", "0.46810937", "0.46724883", "0.4661215", "0.4657487", "0.46562305", "0.46560997", "0.4628456", "0.46265304", "0.46262047", "0.4626012", "0.4622393", "0.46136624", "0.46129984", "0.46033376", "0.460154", "0.4592639", "0.4592029", "0.45870835", "0.45829374", "0.45803037", "0.45719042", "0.45630908", "0.4560328", "0.45559523", "0.45540276", "0.4552446", "0.45494583", "0.45477685", "0.45434085", "0.4541136", "0.45207497", "0.4517543", "0.4514814", "0.45075867", "0.45051828", "0.4501963", "0.45017844", "0.44970965", "0.4488333", "0.44844013", "0.4481394", "0.44785094", "0.44785094", "0.44785094", "0.44785094", "0.44785094", "0.44785094", "0.44785094", "0.44785094", "0.44769782", "0.44766733", "0.44728693", "0.4471821", "0.44564465", "0.44551283", "0.44548583", "0.4453072", "0.44501853", "0.44454247", "0.44393486", "0.4438597", "0.4437571" ]
0.84527004
0
do syntax highlighting of the text to make it easier to read
делайте синтаксическое выделение текста для упрощения его чтения
function highlight($_text) { $underlining = false; $highlighted = '<code>'; for($i = 0; $i < strlen($_text); $i++) { if($_text[$i] == '<') { $highlighted = $highlighted . '<span style="color: #aaaaaa">&lt;'; } else if($_text[$i] == '>') { $highlighted = $highlighted . '&gt;</span>'; } else if($_text[$i] == '[') { $highlighted = $highlighted . '<span style="color: #aaaaff">['; } else if($_text[$i] == ']') { $highlighted = $highlighted . ']</span>'; } else if($_text[$i] == '{') { $highlighted = $highlighted . '<span style="color: #999900">{</span>'; } else if($_text[$i] == '}') { $highlighted = $highlighted . '<span style="color: #999900">}</span>'; } else if($_text[$i] == '^') { $highlighted = $highlighted . '<span style="color: #009900">^</span>'; } else if($_text[$i] == '$') { $highlighted = $highlighted . '<span style="color: #009900">$</span>'; } else if($_text[$i] == '@') { $highlighted = $highlighted . '<span style="color: #990000">@</span>'; } else if($_text[$i] == '#') { $highlighted = $highlighted . '<span style="color: #990000">#</span>'; } else if($_text[$i] == '*') { $highlighted = $highlighted . '<span style="color: #990000">*</span>'; } else { $highlighted = $highlighted . $_text[$i]; } /* if($_text[$i] == '*') { $underlining = true; // set underlining state $highlighted = $highlighted . '<u>'; } if($_text[$i+1] == ' ' && $underlining = true) { $highlighted = $highlighted . '</u>'; $underlining = false; // unset underlining state } */ } $highlighted = $highlighted . '</code>'; return $highlighted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function highlight(string $text, array $options = []): string;", "function pc_highlight_txt($atts, $content) {\n return \"<span style=\\\"color: #d0ac2e;\\\">$content</span>\";\n}", "public function highlight(string $text, array $options = []): string {\n\t\t$string = highlight_string($text, true);\n\n\t\t$options += $this->_config;\n\n\t\t$attr = ['class' => $options['prefix'] . $options['lang']];\n\n\t\t$options['attr'] = $this->templater()->formatAttributes($attr);\n\t\t$options['content'] = str_replace([\"\\r\\n\", \"\\n\", \"\\r\"], '', $string);\n\n\t\treturn $this->templater()->format('code', $options);\n\t}", "function getHighlightedText($_text)\n {\n $tmp_searchArray = $this->searchArray;\n \n if($this->searchEntities)\n {\n foreach($this->searchArray as $keyword)\n {\n $this->searchArray[] = array('search' => htmlentities($keyword['search'], ENT_COMPAT, 'UTF-8'));\n }\n }\n \n switch($this->highlightType)\n {\n case 'sentence':\n case 'paragraph':\n // split text at punctuation marks\n if($this->highlightType == 'sentence')\n $regex = '~(\\!|\\.|\\?|[\\n]+)~si';\n \n \n // split text at line breaks\n if($this->highlightType == 'paragraph')\n $regex = '~([\\r\\n])~si';\n \n $Apieces = preg_split($this->encodeRegex($regex), $_text, -1, PREG_SPLIT_DELIM_CAPTURE);\n \n $search = array();\n $replace = array();\n foreach($this->searchArray as $keyword)\n {\n $search[] = preg_quote($keyword['search'],'~');\n $replace[] = $this->encodeRegex('~'.preg_quote($keyword['search'],'~').'~is');\n }\n \n $i = 0;\n for($i = 0; $i < count($Apieces); $i++)\n if(preg_match($this->encodeRegex('~('.implode('|',$search).')~is'), $Apieces[$i]))\n break;\n \n $return = '';\n if($i < count($Apieces))\n $return .= $Apieces[$i];\n \n $cutted = array();\n preg_match($this->encodeRegex('~^.*?('.implode('|',$search).').{0,'.$this->maxHighlightedTextChars.'}~ims'), $return, $cutted);\n \n $needEllipses = false;\n if(strlen($cutted[1]) != strlen($return))\n $needEllipses = true;\n \n $return = preg_replace($replace, $this->surroundTags[0].'$0'.$this->surroundTags[1], substr($cutted[0],0,strrpos($cutted[0],' ')));\n \n if($needEllipses)\n $return .= ' '.$this->ellipsis;\n \n return $return;\n break;\n \n case 'surroundtext':\n case 'surroundtextsingle':\n case 'array':\n $startEllipsis = false;\n $endEllipsis = false;\n $Ahighlighted = array();\n $_text = preg_replace('~\\s+~', ' ', $_text);\n $replace = array();\n foreach($this->searchArray as $keyword)\n $replace[] = $this->encodeRegex('~'.preg_quote($keyword['search'],'~').'~is');\n \n $strlen = mb_strlen($_text);\n $positions = array();\n for($i = 0; $i < count($this->searchArray); $i++)\n {\n $hits = array();\n $offset = 0;\n preg_match_all($this->encodeRegex('~((.{0,'.$this->maxHighlightedTextChars.'})'.preg_quote($this->searchArray[$i]['search'],'~').'(.{0,'.$this->maxHighlightedTextChars.'}))~ims'), $_text, $hits, PREG_SET_ORDER);\n \n foreach($hits as $hit)\n {\n $offset = strpos($_text, $hit[0], $offset) + 1;\n $currentposition = ceil(intval(($offset - 1) / (2 * $this->maxHighlightedTextChars)));\n \n if($this->highlightType == 'array' AND !array_key_exists($this->searchArray[$i]['search'], $Ahighlighted))\n $Ahighlighted[$this->searchArray[$i]['search']] = array();\n \n if(trim($hit[1]) != '')\n {\n $surroundText = $hit[1];\n \n if(strlen($hit[2]) > 0 AND false !== strpos($hit[2], ' '))\n $surroundText = substr($surroundText, strpos($surroundText, ' '));\n \n if(strlen($hit[3]) > 0 AND false !== strpos($hit[3], ' '))\n $surroundText = substr($surroundText, 0, strrpos($surroundText,' '));\n \n if($i == 0 AND strlen($hit[2]) > 0)\n $startEllipsis = true;\n \n if($i == (count($this->searchArray) - 1) AND strlen($hit[3]) > 0)\n $endEllipsis = true;\n \n if($this->highlightType == 'array')\n $Ahighlighted[$this->searchArray[$i]['search']][] = preg_replace($replace, $this->surroundTags[0].'$0'.$this->surroundTags[1], trim($surroundText));\n else if(!in_array($currentposition, $positions))\n $Ahighlighted[] = trim($surroundText);\n \n $positions[] = $currentposition;\n \n if($this->highlightType == 'surroundtextsingle')\n break;\n }\n }\n }\n \n if($this->highlightType == 'array')\n return $Ahighlighted;\n \n $return = implode(' '.$this->ellipsis.' ', $Ahighlighted);\n \n if($startEllipsis)\n $return = $this->ellipsis.' '.$return;\n \n if($endEllipsis)\n $return = $return.' '.$this->ellipsis;\n \n $return = preg_replace($replace, $this->surroundTags[0].'$0'.$this->surroundTags[1], $return);\n \n return $return;\n break;\n \n case 'teaser':\n $search = array();\n foreach($this->searchArray as $keyword)\n $search[] = $this->encodeRegex('~'.preg_quote($keyword['search'],'~').'~is');\n\n return preg_replace($search, $this->surroundTags[0].'$0'.$this->surroundTags[1], $this->getTeaserText($_text));\n break;\n }\n \n $this->searchArray = $tmp_searchArray;\n }", "public function highlight(string $msg): string;", "function highlight_code($str) {\n\t\t/*\n\t\t * The highlight string function encodes and highlights\n\t\t * brackets so we need them to start raw.\n\t\t *\n\t\t * Also replace any existing PHP tags to temporary markers\n\t\t * so they don't accidentally break the string out of PHP,\n\t\t * and thus, thwart the highlighting.\n\t\t */\n\t\t$str = str_replace ( array (\n\t\t\t\t'&lt;',\n\t\t\t\t'&gt;',\n\t\t\t\t'<?',\n\t\t\t\t'?>',\n\t\t\t\t'<%',\n\t\t\t\t'%>',\n\t\t\t\t'\\\\',\n\t\t\t\t'</script>' \n\t\t), array (\n\t\t\t\t'<',\n\t\t\t\t'>',\n\t\t\t\t'phptagopen',\n\t\t\t\t'phptagclose',\n\t\t\t\t'asptagopen',\n\t\t\t\t'asptagclose',\n\t\t\t\t'backslashtmp',\n\t\t\t\t'scriptclose' \n\t\t), $str );\n\t\t\n\t\t// The highlight_string function requires that the text be surrounded\n\t\t// by PHP tags, which we will remove later\n\t\t$str = highlight_string ( '<?php ' . $str . ' ?>', TRUE );\n\t\t\n\t\t// Remove our artificially added PHP, and the syntax highlighting that came with it\n\t\t$str = preg_replace ( array (\n\t\t\t\t'/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i',\n\t\t\t\t'/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is',\n\t\t\t\t'/<span style=\"color: #[A-Z0-9]+\"\\><\\/span>/i' \n\t\t), array (\n\t\t\t\t'<span style=\"color: #$1\">',\n\t\t\t\t\"$1</span>\\n</span>\\n</code>\",\n\t\t\t\t'' \n\t\t), $str );\n\t\t\n\t\t// Replace our markers back to PHP tags.\n\t\treturn str_replace ( array (\n\t\t\t\t'phptagopen',\n\t\t\t\t'phptagclose',\n\t\t\t\t'asptagopen',\n\t\t\t\t'asptagclose',\n\t\t\t\t'backslashtmp',\n\t\t\t\t'scriptclose' \n\t\t), array (\n\t\t\t\t'&lt;?',\n\t\t\t\t'?&gt;',\n\t\t\t\t'&lt;%',\n\t\t\t\t'%&gt;',\n\t\t\t\t'\\\\',\n\t\t\t\t'&lt;/script&gt;' \n\t\t), $str );\n\t}", "public static function highlightQuery($sql)\n\t{\n\t\tstatic $keywords1 = 'SELECT|(?:ON\\s+DUPLICATE\\s+KEY)?UPDATE|INSERT(?:\\s+INTO)?|REPLACE(?:\\s+INTO)?|DELETE|CALL|UNION|FROM|WHERE|HAVING|GROUP\\s+BY|ORDER\\s+BY|LIMIT|OFFSET|SET|VALUES|LEFT\\s+JOIN|INNER\\s+JOIN|TRUNCATE';\n\t\tstatic $keywords2 = 'ALL|DISTINCT|DISTINCTROW|IGNORE|AS|USING|ON|AND|OR|IN|IS|NOT|NULL|[RI]?LIKE|REGEXP|TRUE|FALSE|WITH|INSTANCE\\s+OF';\n\n\t\t// insert new lines\n\t\t$sql = \" $sql \";\n\t\t$sql = preg_replace(\"#(?<=[\\\\s,(])($keywords1)(?=[\\\\s,)])#i\", \"\\n\\$1\", $sql);\n\n\t\t// reduce spaces\n\t\t$sql = preg_replace('#[ \\t]{2,}#', ' ', $sql);\n\n\t\t$sql = wordwrap($sql, 100);\n\t\t$sql = preg_replace('#([ \\t]*\\r?\\n){2,}#', \"\\n\", $sql);\n\n\t\t// syntax highlight\n\t\t$sql = htmlSpecialChars($sql);\n\t\t$sql = preg_replace_callback(\"#(/\\\\*.+?\\\\*/)|(\\\\*\\\\*.+?\\\\*\\\\*)|(?<=[\\\\s,(])($keywords1)(?=[\\\\s,)])|(?<=[\\\\s,(=])($keywords2)(?=[\\\\s,)=])#is\", function($matches) {\n\t\t\tif (!empty($matches[1])) { // comment\n\t\t\t\treturn '<em style=\"color:gray\">' . $matches[1] . '</em>';\n\t\t\t} elseif (!empty($matches[2])) { // error\n\t\t\t\treturn '<strong style=\"color:red\">' . $matches[2] . '</strong>';\n\t\t\t} elseif (!empty($matches[3])) { // most important keywords\n\t\t\t\treturn '<strong style=\"color:blue\">' . $matches[3] . '</strong>';\n\t\t\t} elseif (!empty($matches[4])) { // other keywords\n\t\t\t\treturn '<strong style=\"color:green\">' . $matches[4] . '</strong>';\n\t\t\t}\n\t\t}, $sql);\n\n\t\treturn '<pre class=\"dump\">' . trim($sql) . \"</pre>\\n\";\n\t}", "private function highlight($code) {\n if (!$this->colored) return $code;\n\n return preg_replace(\n [\n '/[(){}\\[\\]+*-\\/=<>?:-]+/',\n '/\\$[a-z0-9_]+/i',\n '/\\b(public|private|protected|static|function|fn|match|if|else|switch|case|class|new|throw|return)\\b/'\n ],\n [\n \"\\033[34;1m\\$0\\033[0;37m\",\n \"\\033[35;1m\\$0\\033[0;37m\",\n \"\\033[34;3m\\$0\\033[0;37m\"\n ],\n $code\n );\n }", "public function getHighlightUsePhraseHighlighter(): bool {}", "public function getHighlightUsePhraseHighlighter(): bool {}", "function highlight_code($str)\r\n\t{\r\n\t\t// The highlight string function encodes and highlights\r\n\t\t// brackets so we need them to start raw\r\n\t\t$str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);\r\n\r\n\t\t// Replace any existing PHP tags to temporary markers so they don't accidentally\r\n\t\t// break the string out of PHP, and thus, thwart the highlighting.\r\n\r\n\t\t$str = str_replace(array('<?', '?>', '<%', '%>', '\\\\', '</script>'),\r\n\t\t\t\t\t\t\tarray('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str);\r\n\r\n\t\t// The highlight_string function requires that the text be surrounded\r\n\t\t// by PHP tags, which we will remove later\r\n\t\t$str = '<?php '.$str.' ?>'; // <?\r\n\r\n\t\t// All the magic happens here, baby!\r\n\t\t$str = highlight_string($str, TRUE);\r\n\r\n\t\t// Remove our artificially added PHP, and the syntax highlighting that came with it\r\n\t\t$str = preg_replace('/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i', '<span style=\"color: #$1\">', $str);\r\n\t\t$str = preg_replace('/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is', \"$1</span>\\n</span>\\n</code>\", $str);\r\n\t\t$str = preg_replace('/<span style=\"color: #[A-Z0-9]+\"\\><\\/span>/i', '', $str);\r\n\r\n\t\t// Replace our markers back to PHP tags.\r\n\t\t$str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\r\n\t\t\t\t\t\t\tarray('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\\\', '&lt;/script&gt;'), $str);\r\n\r\n\t\treturn $str;\r\n\t}", "public function highlightCode($str = '')\n {\n /* The highlight string function encodes and highlights\n * brackets so we need them to start raw.\n *\n * Also replace any existing PHP tags to temporary markers\n * so they don't accidentally break the string out of PHP,\n * and thus, thwart the highlighting.\n */\n $str = str_replace(\n ['&lt;', '&gt;', '<?', '?>', '<%', '%>', '\\\\', '</script>'],\n ['<', '>', 'phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'],\n $str\n );\n\n // The highlight_string function requires that the text be surrounded\n // by PHP tags, which we will remove later\n $str = highlight_string('<?php ' . $str . ' ?>', TRUE);\n\n // Remove our artificially added PHP, and the syntax highlighting that came with it\n $str = preg_replace(\n [\n '/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i',\n '/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is',\n '/<span style=\"color: #[A-Z0-9]+\"><\\/span>/i'\n ],\n [\n '<span style=\"color: #$1\">',\n \"$1</span>\\n</span>\\n</code>\",\n ''\n ],\n $str\n );\n\n // Replace our markers back to PHP tags.\n return str_replace(\n ['phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'],\n ['&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\\\', '&lt;/script&gt;'],\n $str\n );\n }", "function syntax_hilight($filename)\n {\n if ((substr($filename, -4) == '.php')) {\n ob_start();\n show_source($filename);\n $buffer = ob_get_contents();\n ob_end_clean();\n } else {\n $argv = '-q -p - -E --language=html --color ' . escapeshellcmd($filename);\n $buffer = array();\n\n exec(\"enscript $argv\", $buffer);\n\n $buffer = join(\"\\n\", $buffer);\n $buffer = preg_replace('/^.*<PRE>/i', '<pre>', $buffer);\n $buffer = preg_replace('/<\\/PRE>.*$/i', '</pre>', $buffer);\n }\n\n // Making it XHTML compatible.\n $buffer = preg_replace('/<FONT COLOR=\"/i', '<span style=\"color:', $buffer);\n $buffer = preg_replace('/<\\/FONT>/i', '</style>', $buffer);\n\n return $buffer;\n }", "public static function stylehHighlight(): void\n {\n if (self::$styleHighlightAdded == false) {\n $styleScript = '<link rel=\"stylesheet\" href=\"https://unpkg.com/@highlightjs/cdn-assets@11.3.1/styles/devibeans.min.css\">';\n $styleScript .= '<script src=\"https://unpkg.com/@highlightjs/cdn-assets@11.3.1/highlight.min.js\"></script>';\n $styleScript .= '<script>hljs.highlightAll();</script>';\n\n echo $styleScript;\n\n self::$styleHighlightAdded = true;\n }\n }", "public function highlight($content)\n\t{\n\t\t$this->registerClientScript();\n\n\t\t$options['use_language']=true;\n\t\t$options['tabsize']=$this->tabSize;\n\t\tif($this->showLineNumbers)\n\t\t\t$options['numbers']=($this->lineNumberStyle==='list')?HL_NUMBERS_LI:HL_NUMBERS_TABLE;\n\n\t\t$highlighter=empty($this->language)?false:Text_Highlighter::factory($this->language);\n\t\tif($highlighter===false)\n\t\t\t$o='<pre>'.CHtml::encode($content).'</pre>';\n\t\telse\n\t\t{\n\t\t\t$highlighter->setRenderer(new Text_Highlighter_Renderer_Html($options));\n\t\t\t$o=preg_replace('/<span\\s+[^>]*>(\\s*)<\\/span>/','\\1',$highlighter->highlight($content));\n\t\t}\n\n\t\treturn CHtml::tag('div',$this->containerOptions,$o);\n\t}", "function pygmentize($matches) {\n $lines = explode(\"\\n\", $matches[1]);\n $lexer = \"text\";\n\n // If a lexer is given, find it and remove the lexer line\n if (preg_match('/^#!([a-zA-Z0-9\\.\\+-]*)$/', $lines[0], $inner_matches)) {\n $lexer = $inner_matches[1];\n unset($lines[0]);\n }\n\n // Options\n $options = array();\n if (strcmp($this->style, 'none') != 0) {\n $options[] = 'style=' . $this->style;\n }\n\n if (strcmp($this->lineno, 'none') != 0) {\n $options[] = 'linenos=' . $this->lineno;\n }\n\n $options[] = 'nobackground=1';\n $options[] = 'encoding=utf-8';\n $opts = '-O ' . implode($options, ',');\n\n // Format!\n $descriptors = array(\n 0 => array(\"pipe\", \"r\"),\n 1 => array(\"pipe\", \"w\"),\n 2 => array(\"pipe\", \"w\")\n );\n\n $process = proc_open($this->command . \" -f html \" . $opts . \" -l \" . $lexer, $descriptors, $pipes);\n if (is_resource($process)) {\n // Dump the lines to the pipe\n foreach ($lines as $line) {\n fwrite($pipes[0], html_entity_decode($line));\n fwrite($pipes[0], \"\\n\");\n }\n fclose($pipes[0]);\n\n // Read the formatted text\n $formatted_text = stream_get_contents($pipes[1]);\n fclose($pipes[1]);\n\n $return_values = proc_close($process);\n\n // For debuging:\n //$formatted_text = $this->command . \" -f html \" . $opts . \" -l \" . $lexer . \"\\n\" . $formatted_text;\n\n return '<div class=\"pygmented_code\">'.$formatted_text.'</div>';\n } else {\n return \"Error pygmentizing...\";\n }\n }", "protected function highlightKeywords($text)\n\t{\n\t\t$keywords = $this->getKeywords();\n\n\t\tforeach ($keywords as $keyword) {\n\t\t\tif (strlen($keyword) > 2) {\n\t\t\t\t$keyword = preg_quote($keyword);\n\t\t\t\t$pattern = \"/($keyword)/i\";\n\t\t\t\t$text = preg_replace($pattern, \"<strong style=\\\"color: #000000; background: #ff0; \\\">$1</strong>\", $text);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $text;\n\t}", "function stylize () {\n\t\n\t\t// valid string to be styled matches this rule\n\t\t$S_PATTERN = \"([^\\s]|[^\\s].*?[^\\s])\";\n\t\t$S_START = \"(?<=\\s)\";\n\t\t$S_END = \"(?=\\s|\\.|,|<)\";\n\t\t\n\t\t// bold #example#\n\t\t//$this->text = preg_replace(\"/(?<!&)(#)\".$S_PATTERN.\"(#)/\", \"<b>$2</b>\", $this->text); // #\n\t\n\t\t// bold **example**\n\t\t$this->text = preg_replace(\"/\\B(\\*\\*)\".$S_PATTERN.\"(\\*\\*)\\B/\", \"<b>$2</b>\", $this->text); // **\n\t\t\n\t\t// italics *italics*\n\t\t$this->text = preg_replace(\"/\\B(\\*)\".$S_PATTERN.\"(\\*)\\B/\", \"<i>$2</i>\", $this->text);\n\t\n\t\t// underline _example_\n\t\t$this->text = preg_replace(\"/\\b(_)\".$S_PATTERN.\"(_)\\b/\", \"<u>$2</u>\", $this->text);\n\t\t\t\t\n\t\t// strike-through\n\t\t// this is from my custom config of dokuwiki: \\B(-)(?!\\s)(.*)(?<!\\s)(-)\\B/\n\t\t$this->text = preg_replace(\"/\".$S_START.\"(-)\".$S_PATTERN.\"(-)\".$S_END.\"/\", \"<strike>$2</strike>\", $this->text);\n\n\t\t// acronyms EG(Exempli Gratia)\n\t\t// ACTS ON: Single all caps words followed by parenthetical expression of more than 3 non-\")\" chars\n\t\t$this->text = preg_replace(\"/([A-Z]+)\\(([^\\)]{3,}?)\\)/\", \"<acronym title=\\\"$2\\\">$1</acronym>\", $this->text);\n\t\n\t}", "protected static function _highlight($str)\n {\n if (function_exists('hphp_log') || function_exists('hphp_gettid')) {\n return htmlentities($str);\n }\n $added = false;\n if (strpos($str, '<?php') === false) {\n $added = true;\n $str = \"<?php \\n\" . $str;\n }\n $highlight = highlight_string($str, true);\n if ($added) {\n $highlight = str_replace(\n ['&lt;?php&nbsp;<br/>', '&lt;?php&nbsp;<br />'],\n '',\n $highlight\n );\n }\n\n return $highlight;\n }", "function highlight($body) {\n // Contents will be used in preg_replace() to highlight the search terms.\n $findwords = array();\n $replacewords = array();\n \n foreach ($this->words as $word) {\n if (ctype_digit($word)) {\n array_push($findwords, \"/\\b($word|\" . number_format($word) . \")\\b/\");\n } else {\n \t\t\tarray_push($findwords, \"/\\b($word)\\b/i\");\n }\n\t\t\tarray_push($replacewords, \"<span class=\\\"hi\\\">\\\\1</span>\");\n //array_push($findwords, \"/([^>\\.\\'])\\b(\" . $word . \")\\b([^<\\'])/i\");\n //array_push($replacewords, \"\\\\1<span class=\\\"hi\\\">\\\\2</span>\\\\3\");\n }\n foreach( $this->phrases as $phrase ) {\n $phrasematch = join($phrase, '[^'.$this->wordchars.']+');\n array_push($findwords, \"/\\b($phrasematch)\\b/i\");\n $replacewords[] = \"<span class=\\\"hi\\\">\\\\1</span>\";\n }\n \n // Highlight search words.\n $hlbody = preg_replace($findwords, $replacewords, $body);\n // Remove any highlighting within HTML.\n $hlbody = preg_replace('#<(a|phrase)\\s([^>]*?)<span class=\"hi\">(.*?)</span>([^>]*?)\">#', \"<\\\\1 \\\\2\\\\3\\\\4\\\">\", $hlbody);\n $hlbody = preg_replace('#<(/?)<span class=\"hi\">a</span>([^>]*?)>#', \"<\\\\1a\\\\2>\", $hlbody); # XXX Horrible hack\n // Collapse duplicates\n $hlbody = preg_replace(\"#</span>(\\W+)<span class=\\\"hi\\\">#\", \"\\\\1\", $hlbody);\n\n return $hlbody;\n }", "function xhtml_highlight($file) {\n\tif (version_compare(phpversion(), \"4.2.0\") == \"-1\") {\n//\t\t$string = implode (\"\", file($file));\n//\t\t$string = highlight_string($string);\n\t\t$string = \"<p class=\\\"error\\\">Error: Your PHP version is <strong>\".phpversion().\"</strong>. You need at least version 4.2.0 for the Show Source function to work.</p>\";\n\t} else {\n\t\t$string = highlight_file($file, TRUE);\n\t}\n\t// Fix lines\n\t$string = str_replace(\"<br />\", \"\\n\", $string);\n\t// Fix spaces and tabs\n\t$string = str_replace(\"&nbsp;&nbsp;&nbsp;&nbsp;\", \"\\t\", $string);\n\t$string = str_replace(\"&nbsp;\", \" \", $string);\n\t// Fix <font>-tags\n\t$string = str_replace(\"</font>\", \"</span>\", $string);\n\t$string = str_replace(\"<font color=\\\"\", \"<span style=\\\"color:\", $string);\n\treturn $string;\n}", "function _Highlight($aCode) {\n $res = \"<?php $aCode?>\";\n \t ob_start();\n highlight_string($res);\n $res = ob_get_contents();\t\n \t ob_end_clean();\n $res=str_replace('&lt;?php&nbsp;','',$res);\n $res=str_replace('?&gt;','',$res); \n return $res;\n }", "function hi($text)\n\t{\n\t\treturn str_ireplace($_REQUEST[\"query\"],\"<span class=\\\"highlight\\\">\".$_REQUEST[\"query\"].\"</span>\",$text);\n\t\t\n\t}", "private function parse($text) {\n\t\t$text = str_replace(\" \", \"&#160;\", $text);\n\t\t$text = preg_replace(\"!\\[f\\](.*)\\[/f\\]!isU\", \"<strong>$1</strong>\", $text);\n\t\t$text = preg_replace(\"!\\[k\\](.*)\\[/k\\]!isU\", \"<em>$1</em>\", $text);\n\t\t$text = preg_replace(\"!\\[u\\](.*)\\[/u\\]!isU\", \"<u>$1</u>\", $text);\n\t\t$text = preg_replace(\"!\\[color=(.*)\\](.*)\\[/color\\]!isU\", \"<span style=\\\"color: $1;\\\">$2</span>\", $text);\n\t\t\n\t\treturn $text;\n\t}", "function highlightText($title, $text) {\r\n global $highlight;\r\n\r\n $title = str_replace($highlight, '<span style=\"color: #FF0000\">'. $highlight .'</span>', $title);\r\n\r\n $search = explode(' ', $highlight);\r\n $nbWords = count($search);\r\n\r\n for ($i = 0; $i < $nbWords; $i++) {\r\n $tab = preg_split('`(<\\w+.*?>)`', $text, -1, PREG_SPLIT_DELIM_CAPTURE);\r\n\r\n foreach ($tab as $key => $val) {\r\n if (preg_match('`^<\\w+`', $val))\r\n $tab[$key] = $val;\r\n else\r\n $tab[$key] = preg_replace(\r\n '/'. preg_quote($search[$i], '/') .'/',\r\n '<span style=\"color: #FF0000;\"><b>\\0</b></span>',\r\n $val\r\n );\r\n }\r\n\r\n $text = implode($tab);\r\n }\r\n\r\n return array($title, $text);\r\n}", "function highlightSaffire($text) {\n $pointer = 0;\n $length = strlen($text);\n $output = array();\n\n $ST_REGEX = 0;\n $ST_DIV = 1;\n\n $state = $ST_REGEX; // 0 is st_regex, 1 is st_div\n\n while ($pointer < $length) {\n if (!preg_match('~(?x)\n (?P<comment> //.* | /\\*([^*]|\\*[^/])*\\*/ )\n | (?P<keyword> \\b (?:\n if | else | use | as | do | for | foreach | switch | class | extends\n | implements | abstract | final | interface | const | static | public\n | private | protected | method | readonly | property | catch | finally\n | throw | return | break | breakelse | continue | try | default | goto\n | case | self | parent | yield | in | import | alias\n ) \\b )\n | (?P<operator> (?: [<>]{2} | [-+*/%&|^\\~<>=!] ) = | [|&<>+-]{2} | [][+%<>(){}:;=,.?!*^|-]\n ' . ($state === $ST_DIV ? ' | / ' : '') . ')\n | (?P<regex> ' . ($state === $ST_DIV ? '(?!)' : '\n /[^/\\\\\\\\]*(?:\\\\\\\\.[^/\\\\\\\\]*)*/[a-z]*\n ' ) . ')\n | (?P<identifier> ::\\+ | [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]* | [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]* [?!]? )\n | (?P<string> \"[^\"]*\" | \\'[^\\']*\\' )\n | (?P<whitespace> \\s+ )\n | (?P<number> \\d+ )\n | (?P<error> [\\s\\S] )\n ~u', $text, $match, null, $pointer)) {\n break;\n }\n\n $lexeme = htmlspecialchars($match[0]);\n\n $type = null;\n foreach (array(\n 'comment' => array('comment', null),\n 'keyword' => array('keyword', $ST_REGEX),\n 'identifier' => array('identifier', $ST_DIV),\n 'string' => array('string', $ST_DIV),\n 'number' => array('number', $ST_DIV),\n 'operator' => array('operator', $ST_REGEX),\n 'regex' => array('regex', $ST_DIV),\n 'whitespace' => array(null, null)\n ) as $index => $class) {\n if (isset($match[$index]) && strlen($match[$index])) {\n list($class, $newState) = $class;\n $type = $class;\n\n if ($newState !== null) {\n $state = $newState;\n }\n\n break;\n }\n }\n\n $output[] = $type ? '<span class=\"' . $type . '\">' . $lexeme . '</span>' : $lexeme;\n $pointer += strlen($match[0]);\n }\n\n return implode($output);\n}", "function source() {\n echo \"<br><code>\";\n highlight_string(file_get_contents(__FILE__));\n echo \"</code>\";\n}", "public static function pygmentize( $code, $language, $style=\"default\", $aname ='', $tabwidth=4, $extra_opts=\"\" ) {\n\t$temp_name = tempnam( \"/tmp\", \"sourcesc_\" );\n \n\t$highlight_class = basename( $temp_name );\n\n\t$file_handle = fopen( $temp_name, \"w\" );\n\tfwrite( $file_handle, $code );\n\tfclose( $file_handle );\n \n if(strlen($aname) == 0) {\n $aname = $highlight_class;\n }\n\n\t// Add the \"full\" and style options:\n\tif ( $extra_opts == \"\" ) {\n\t\t$extra_opts = \"-O linenos,lineanchors=$aname,anchorlinenos,full,style=\".$style.\",cssclass=\".$highlight_class;\n\t} else {\n\t\t// Just append these to the passed-in args:\n\t\t$extra_opts .= \",full,style=\".$style.\",cssclass=\".$highlight_class;\n\t}\n\n\t// Color it. We depend on pygmentize being in the PATH (prolly in /usr/bin/):\n\t$command = \"pygmentize -f html $extra_opts -l $language $temp_name\";\n\t$output = array();\n\t$retval = -1;\n\n\texec( $command, $output, $retval );\n //var_dump($command);\n\tunlink( $temp_name );\n\n\t$output_string = join( \"\\n\", $output );\n\n\t$original_output_string = join( \"\\n\", $output );\n\t// Manually wrap tabs in a \"tabspan\" class, so the tab width can be set to 4\n\t$output_string = str_replace( \"\\t\", \"<span class='tabspan'>\\t</span>\", $output_string );\n\n\t// We use the Pygments \"full\" option, so that we don't need to manage separate \n\t// CSS files (and links) for every possible value of \"style\".\n\t// However, \"full\" exports a full HTML doctype, <title>, <body>, etc. which we don't\n\t// want when embedding into another PHP document. So we manually remove that stuff here.\n\n\t// Replace everything up to (and including) the first <style> tag:\n\tif ( strpos( $output_string, '<style type=\"text/css\">' ) != FALSE ) {\n\t\t$header_ending_position = strpos( $output_string, '<style type=\"text/css\">' ) + strlen( '<style type=\"text/css\">' );\n\t\t$output_string = substr( $output_string, $header_ending_position );\n\t}\n\t// We also prepend extra CSS info for the tab width and line numbering here.\n\t$output_string = <<<EOD\n<style type=\"text/css\">\n\n\n\n$output_string\nEOD;\n\n\t// Remove these other unneeded tags. (The <h2></h2> is empty because we didn't supply a \"title\".)\n\t// Note that other tags (like <html> and <head> were removed above, with the first <style> tag.\n\t$html_tags_to_remove = array ( \"</head>\", \"<body>\", \"<h2></h2>\", \"</body>\", \"</html>\" );\n\tforeach( $html_tags_to_remove as $tag ) {\n\t\t$output_string = str_replace( $tag, \"\", $output_string );\t\t\n\t}\n\n\t// A quirk of pygmentize is that, if you use the \"full\" option to get CSS and HTML at once,\n\t// it does not honor the -a option to set the style class. Instead, it applies the CSS to the \n\t// \"body\" elements. So here we manually replace those \"body\" elements with the name of the wrapper class.\n\t// We only replace \"body\" up to </style>, so as not to affect the highlighted code.\n\t// We also make the hardcoded class \"linenodiv\" match the code style.\n\tif ( strpos( $output_string, '</style>' ) != FALSE ) {\n\t\t$css_ending_position = strpos( $output_string, '</style>' ) + strlen( '</style>' );\n\t\t$css_header_part = substr( $output_string, 0, $css_ending_position );\n\t\t$html_tail_part = substr( $output_string, $css_ending_position );\n\n\t\t// Note, unlike \"body\", CSS class names have a prepended period. \n\t\t$css_header_part = str_replace( \"body\", '.'.$highlight_class, $css_header_part );\n\n\t\t// I prefer a narrow gap in the line numbers. I replace the 10 with 1:\n\t\t$css_header_part = str_replace( \"padding-right: 10px;\", 'padding-right: 1px;', $css_header_part );\n\n\t\t// Make the linenodiv match the style:\n\t\t$html_tail_part = str_replace( '<div class=\"linenodiv\">', '<div class=\"linenodiv '.$highlight_class.'\">', $html_tail_part );\n\t\t// Make the linenodiv match the style:\n\t\t$html_tail_part = str_replace( '<td class=\"linenos\">', '<td class=\"linenos '.$highlight_class.'\">', $html_tail_part );\n\n\t\t$output_string = $css_header_part . $html_tail_part;\n\t}\n//echo $output_string;\n\n\treturn $output_string;\t\n \n }", "function highlight($text, $words) {\n preg_match_all('~\\w+~', $words, $m);\n if(!$m){\n return $text;\n\t\t}\n $re = '~\\\\b(' . implode('|', $m[0]) . ')\\\\b~i';\n return preg_replace($re, '<b>$0</b>', $text);\n}", "public function getHighlightRegexPattern(): string {}", "public function getHighlightRegexPattern(): string {}", "function mtheme_Highlight( $atts, $content = null ) {\n return '<span class=\"highlight\">' . do_shortcode($content) . '</span>';\n}", "function str_highlight($text, $needle='', $options=null, $highlight=null) {\n\t\t\tif (!$needle) {\n\t\t\t\treturn $text;\n\t\t\t}\n\t\t\t// Default highlighting\n\t\t\tif ($highlight===null) {\n\t\t\t\t$highlight='<strong class=\"highlight\">\\1</strong>';\n\t\t\t}\n\t\t\t// Select pattern to use\n\t\t\tif ($options&STR_HIGHLIGHT_SIMPLE) {\n\t\t\t\t$pattern='#(%s)#';\n\t\t\t} else {\n\t\t\t\t$pattern='#(?!<.*?)(%s)(?![^<>]*?>)#';\n\t\t\t\t$sl_pattern='#<a\\s(?:.*?)>(%s)</a>#';\n\t\t\t}\n\t\t\t$pattern.='i';\n\t\t\t$sl_pattern.='i';\n\t\t\t$needle=(array)$needle;\n\t\t\tforeach ($needle as $needle_s) {\n\t\t\t\t$needle_s=preg_quote($needle_s);\n\t\t\t\t// Escape needle with optional whole word check\n\t\t\t\tif ($options&STR_HIGHLIGHT_WHOLEWD) {\n\t\t\t\t\t$needle_s='\\b'.$needle_s.'\\b';\n\t\t\t\t}\n\t\t\t\t// Strip links\n\t\t\t\tif ($options&STR_HIGHLIGHT_STRIPLINKS) {\n\t\t\t\t\t$sl_regex=sprintf($sl_pattern, $needle_s);\n\t\t\t\t\t$text=preg_replace($sl_regex, '\\1', $text);\n\t\t\t\t}\n\t\t\t\t$regex=sprintf($pattern, $needle_s);\n\t\t\t\t$text=preg_replace($regex, $highlight, $text);\n\t\t\t}\n\t\t\treturn $text;\n\t\t}", "public function highlight( $text , $keywords, $color ='orange' )\n {\n if(! is_array( $keywords ) )\n {\n $keywords = explode( \" \", $keywords );\n }\n $uniqid = uniqid();\n $left_delimiter = \"{\" . $uniqid . \"}\";\n $right_delimiter = \"{/\" . $uniqid . \"}\";\n foreach ( $keywords as $k => $v )\n {\n $text = str_replace( $v , $left_delimiter. $v. $right_delimiter , $text );\n }\n $text = str_replace( $right_delimiter. $left_delimiter , \"\", $text );\n $text = str_replace($left_delimiter, '<span style=\"color:' . $color . ';font-weight:bold;\">', $text );\n $text = str_replace( $right_delimiter, '</span>', $text );\n return $text;\n }", "function str_highlight($text, $needle = '', $options = null, $highlight = null) {\n if (!$needle) {\n return $text;\n }\n // Default highlighting\n if ($highlight === null) {\n $highlight = '<strong class=\"highlight\">\\1</strong>';\n }\n // Select pattern to use\n if ($options & STR_HIGHLIGHT_SIMPLE) {\n $pattern = '#(%s)#';\n } else {\n $pattern = '#(?!<.*?)(%s)(?![^<>]*?>)#';\n $sl_pattern = '#<a\\s(?:.*?)>(%s)</a>#';\n }\n $pattern .= 'i';\n $sl_pattern .= 'i';\n $needle = (array)$needle;\n foreach ($needle as $needle_s) {\n $needle_s = preg_quote($needle_s);\n // Escape needle with optional whole word check\n if ($options & STR_HIGHLIGHT_WHOLEWD) {\n $needle_s = '\\b' . $needle_s . '\\b';\n }\n // Strip links\n if ($options & STR_HIGHLIGHT_STRIPLINKS) {\n $sl_regex = sprintf($sl_pattern, $needle_s);\n $text = preg_replace($sl_regex, '\\1', $text);\n }\n $regex = sprintf($pattern, $needle_s);\n $text = preg_replace($regex, $highlight, $text);\n }\n return $text;\n }", "public function filterOverhighlight(string $string): string;", "function highlightline($tokens=array(), $comment='', $line_nr, $title=false, $udftitle=false, $tainted_vars=array())\n\t{\n\t\t$reference = true;\n\t\t$output = \"<span class=\\\"linenr\\\">$line_nr:</span>&nbsp;\";\n\t\tif($title)\n\t\t{\n\t\t\t$output.='<a class=\"link\" href=\"'.PHPDOC.$title.'\" title=\"open php documentation\" target=_blank>';\n\t\t\t$output.=\"$title</a>&nbsp;\";\n\t\t} \n\t\telse if($udftitle)\n\t\t{\n\t\t\t$output.='<a class=\"link\" style=\"text-decoration:none;\" href=\"#'.$udftitle.'_declare\" title=\"jump to declaration\">&uArr;</a>&nbsp;';\n\t\t}\n\t\t\n\t\t$var_count = 0;\n\t\t\n\t\tfor($i=0;$i<count($tokens);$i++)\n\t\t{\n\t\t\t$token = $tokens[$i];\n\t\t\tif (is_string($token))\n\t\t\t{\t\t\n\t\t\t\tif($token === ',' || $token === ';')\n\t\t\t\t\t$output .= \"<span class=\\\"phps-code\\\">$token&nbsp;</span>\";\n\t\t\t\telse if(in_array($token, Tokens::$S_SPACE_WRAP) || in_array($token, Tokens::$S_ARITHMETIC))\n\t\t\t\t\t$output .= '<span class=\"phps-code\">&nbsp;'.$token.'&nbsp;</span>';\n\t\t\t\telse\n\t\t\t\t\t$output .= '<span class=\"phps-code\">'.htmlentities($token, ENT_QUOTES, 'utf-8').'</span>';\n\t\t\t\t\t\n\t\t\t} \n\t\t\telse if (is_array($token) \n\t\t\t&& $token[0] !== T_OPEN_TAG\n\t\t\t&& $token[0] !== T_CLOSE_TAG) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(in_array($token[0], Tokens::$T_SPACE_WRAP) || in_array($token[0], Tokens::$T_OPERATOR) || in_array($token[0], Tokens::$T_ASSIGNMENT))\n\t\t\t\t{\n\t\t\t\t\t$output.= '&nbsp;<span class=\"phps-'.str_replace('_', '-', strtolower(token_name($token[0]))).\"\\\">{$token[1]}</span>&nbsp;\";\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($token[0] === T_FUNCTION)\n\t\t\t\t\t{\n\t\t\t\t\t\t$reference = false;\n\t\t\t\t\t\t$funcname = $tokens[$i+1][0] === T_STRING ? $tokens[$i+1][1] : $tokens[$i+2][1];\n\t\t\t\t\t\t$output .= '<A NAME=\"'.$funcname.'_declare\" class=\"jumplink\"></A>';\n\t\t\t\t\t\t$output .= '<a class=\"link\" style=\"text-decoration:none;\" href=\"#'.$funcname.'_call\" title=\"jump to call\">&dArr;</a>&nbsp;';\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t$text = htmlentities($token[1], ENT_QUOTES, 'utf-8');\n\t\t\t\t\t$text = str_replace(array(' ', \"\\n\"), '&nbsp;', $text);\n\n\t\t\t\t\tif($token[0] === T_FUNCTION)\n\t\t\t\t\t\t$text.='&nbsp;';\n\t\t\t\t\t\t\n\t\t\t\t\tif($token[0] === T_STRING && $reference \n\t\t\t\t\t&& isset($GLOBALS['user_functions_offset'][strtolower($text)]))\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t$text = @'<span onmouseover=\"getFuncCode(this,\\''.addslashes($GLOBALS['user_functions_offset'][strtolower($text)][0]).'\\',\\''.$GLOBALS['user_functions_offset'][strtolower($text)][1].'\\',\\''.$GLOBALS['user_functions_offset'][strtolower($text)][2].'\\')\" style=\"text-decoration:underline\" class=\"phps-'.str_replace('_', '-', strtolower(token_name($token[0]))).\"\\\">$text</span>\\n\";\n\t\t\t\t\t}\t\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$span = '<span ';\n\t\t\t\t\t\n\t\t\t\t\t\tif($token[0] === T_VARIABLE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$var_count++;\n\t\t\t\t\t\t\t$cssname = str_replace('$', '', $token[1]);\n\t\t\t\t\t\t\t$span.= 'style=\"cursor:pointer;\" name=\"phps-var-'.$cssname.'\" onClick=\"markVariable(\\''.$cssname.'\\')\" ';\n\t\t\t\t\t\t\t$span.= 'onmouseout=\"markVariable(\\''.$cssname.'\\')\" ';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($token[0] === T_VARIABLE && @in_array($var_count, $tainted_vars))\n\t\t\t\t\t\t\t$span.= \"class=\\\"phps-tainted-var\\\">$text</span>\";\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$span.= 'class=\"phps-'.str_replace('_', '-', strtolower(token_name($token[0]))).\"\\\">$text</span>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$text = $span;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// rebuild array keys\n\t\t\t\t\t\tif(isset($token[3]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($token[3] as $key)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($key != '*')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$text .= '<span class=\"phps-code\">[</span>';\n\t\t\t\t\t\t\t\t\tif(!is_array($key))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(is_numeric($key))\n\t\t\t\t\t\t\t\t\t\t\t$text .= '<span class=\"phps-t-lnumber\">' . $key . '</span>';\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t$text .= '<span class=\"phps-t-constant-encapsed-string\">\\'' . htmlentities($key, ENT_QUOTES, 'utf-8') . '\\'</span>';\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach($key as $token)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($token))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$text .= '<span ';\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif($token[0] === T_VARIABLE)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cssname = str_replace('$', '', $token[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$text.= 'style=\"cursor:pointer;\" name=\"phps-var-'.$cssname.'\" onClick=\"markVariable(\\''.$cssname.'\\')\" ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$text.= 'onmouseout=\"markVariable(\\''.$cssname.'\\')\" ';\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$text .= 'class=\"phps-'.str_replace('_', '-', strtolower(token_name($token[0]))).'\">'.htmlentities($token[1], ENT_QUOTES, 'utf-8').'</span>';\n\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$text .= \"<span class=\\\"phps-code\\\">{$token}</span>\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$text .= '<span class=\"phps-code\">]</span>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$output .= $text;\n\t\t\t\t\tif(is_array($token) && (in_array($token[0], Tokens::$T_INCLUDES) || in_array($token[0], Tokens::$T_XSS) || $token[0] === 'T_EVAL'))\n\t\t\t\t\t\t$output .= '&nbsp;';\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($comment))\n\t\t\t$output .= '&nbsp;<span class=\"phps-t-comment\">// '.htmlentities($comment, ENT_QUOTES, 'utf-8').'</span>';\n\n\t\treturn $output;\n\t}", "function markdown_wiki_highlight_code_parse($hook, $entity_type, $returnvalue, $params) {\n\n\tfunction _doFencedCodeBlocks_callback($matches) {\n\t\t$langblock = $matches[1];\n\t\t$langblock = htmlspecialchars(trim($matches[1]), ENT_NOQUOTES);\n\t\t$codeblock = htmlspecialchars($matches[2]);\n\t\t$cb = empty($matches[1]) ? \"<pre><code>\" : \"<pre class=\\\"$langblock\\\"><code>\";\n\t\t$cb .= \"$codeblock</code></pre>\";\n\t\treturn $cb;\n\t}\n\n\t$text = preg_replace_callback('#(?:~{3,}|`{3,})(.*)\\n(.*)(?:~{3,}|`{3,})#sU', '_doFencedCodeBlocks_callback', $params['text']);\n\treturn $text;\n\n}", "public static function highlight($object)\n\t{\n\n\t\tif (!($object instanceOf Method || $object instanceof ClassType)) {\n\t\t\t$object = self::getReflection($object);\n\t\t}\n\n\t\t$sourceLines = static::getSource($object->getFileName(), $object->getStartLine() - 1, $object->getEndLine() - 1);\n\n\t\t$phpDocTxt = $object->getDocComment();\n\t\t$phpDoc = [];\n\t\tif (strlen($phpDocTxt) > 0) {\n\t\t\t$phpDoc = explode(\"\\n\", $phpDocTxt);\n\t\t}\n\t\t$phpDoc = new ArrayIterator($phpDoc);\n\t\t$lines = new \\AppendIterator();\n\n\t\t$lines->append($phpDoc);\n\t\t$lines->append($sourceLines);\n\n\t\t$source = '';\n\n\t\tforeach ($lines as $line) {\n\t\t\t$source .= $line . \"\\n\";\n\t\t}\n\t\t$source = str_replace(\n\t\t\t['<span style=\"color: rgb(0,0,187)\">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</span>', '<span style=\"color: rgb(0,0,187)\">&lt;?php<br /></span>'],\n\t\t\t'',\n\t\t\thighlight_string(\"<?php\\n\" . $source, true)\n\t\t);\n\t\t$source = '&nbsp;&nbsp;&nbsp;' . $source;\n\t\treturn $source;\n\n\t}", "function highlight($text, $keywords) {\n\t\t$search = $_GET['search'];\n\t\t$replace = \"$search\";\n\t\tforeach ($keywords as $keyword) {\n\t\t\t$text = preg_replace(\"|($keyword)|Ui\" , \"<span class='hightlight'>$1</span>\" , $text );\n\t\t}\n\t\treturn $text;\n\t}", "public function getTextDecoration () {}", "public function menu_highlight()\n {\n }", "public function highlight(string $string): string\n {\n\n return $string;\n }", "public static function highlightCode($content, $syntax)\n {\n $content = trim($content);\n\n if ($syntax) {\n $content = self::clean((new Highlighter())->highlight($syntax, $content)->value);\n } else {\n $content = self::clean($content);\n }\n\n $number_of_lines = count(explode(\"\\n\", $content));\n\n $output = '<div class=\"syntax_higlighted source-code\">';\n $output .= '<div class=\"syntax_higlighted_line_numbers lines\"><pre>' . implode(\"\\n\", range(1, $number_of_lines)) . '</pre></div>';\n $output .= '<div class=\"syntax_higlighted_source\"><pre>' . $content . '</pre></div>';\n $output .= '</div>';\n\n return $output;\n }", "public static function highlightSql($sql){\n\t\t$keywords1 = 'SELECT|UPDATE|INSERT\\s+INTO|DELETE|FROM|VALUES|SET|WHERE|HAVING|GROUP\\s+BY|ORDER\\s+BY|LIMIT|OFFSET|(?:LEFT\\s+|RIGHT\\s+|INNER\\s+)?JOIN';\n\t\t$keywords2 = 'RANDOM|RAND|ASC|DESC|USING|AND|OR|ON|IN|IS|NOT|NULL|LIKE|TRUE|FALSE|AS';\n\n\t\t$sql = str_replace(\"\\\\'\", '\\\\&#39;', $sql);\n\t\t$sql = preg_replace_callback(\"~(/\\\\*.*\\\\*/)|($keywords1)|($keywords2)|('[^']+'|[0-9]+)~\", 'self::_highlightCallback', $sql);\n\t\t$sql = str_replace('\\\\&#39;', \"\\\\'\", $sql);\n\t\treturn '<pre style=\"color:#555\" class=\"sql-dump\">' . trim($sql) . \"</pre>\\n\";\n\t}", "public function getHighlight(): bool {}", "public function getHighlight(): bool {}", "function highlightWords($text, $word){\n $text = preg_replace('#'. preg_quote($word) .'#i', '<span class=\"\" style=\"background:#F2D41F;color:#114379;font-size:18.5px;font-weight:600px\">\\\\0</span>', $text);\n return $text;\n}", "public function ui_highlight($text, $id=\"default\")\n\t\t\t{\n\t\t\t\treturn '\n\t\t\t\t<div id=\"'.$id.'-hl\" class=\"ui-highlight cf\">\n\t\t\t\t\t<span>'.$text.'</span>\n\t\t\t\t</div>';\n\t\t\t}", "public function getHighlightHighlightMultiTerm(): bool {}", "public function getHighlightHighlightMultiTerm(): bool {}", "function tex_code($name) {\n $sl = preg_quote('\\sl','/');\n $rm = preg_quote('\\rm','/');\n $dol = preg_quote('$','/');\n $slash = preg_quote('\\\\','/');\n $squig_open = preg_quote('{','/');\n $squig_close = preg_quote('}','/');\n $name = preg_replace(\"/(\".$sl.\")/\",'$1<font class=\"italic\">', $name);\n $name = preg_replace(\"/(\".$rm.\")/\",'</font>$1', $name);\n\n\n\n $name = preg_replace(\"/(\".$squig_open.\")/\",'<font class=\"squiggle\">$1', $name);\n $name = preg_replace(\"/(\".$squig_close.\")/\",'$1</font>', $name);\n\n $name = preg_replace(\"/(\".$dol.\"[^\".$dol.\"]+\".$dol.\")/\",'<font class=\"math\">$1</font>', $name);\n $name = preg_replace(\"/(\".$slash.\"[^\\s|\\[|\\]|(|)|\\^|\\_|\\{|<|\\$]+)/\",'<font class=\"object\">$1</font>', $name);\n return $name;\n}", "protected function parseTexts()\n {\n $str = &$this->str;\n\n $str = preg_replace_callback('~(?<!@)@(e|text)\\s*\\(([^()]+)\\)~x', function ($match) {\n return \"<?=e_text({$match[2]});?>\";\n }, $str);\n }", "public static function highlight($needle, $text) {\r\n\t\t$highlightedText = '';\r\n\r\n\t\tforeach (explode(' ', trim($text ?? '')) as $word) {\r\n\t\t\t$replaced = false;\r\n\r\n\t\t\tforeach (explode(' ', trim($needle ?? '')) as $needleWord) {\r\n\t\t\t\tif ($needleWord === '') continue;\r\n\t\t\t\t$position = strpos(strtolower($word), strtolower($needleWord));\r\n\t\t\t\tif ($position > -1) {\r\n\t\t\t\t\t$startStrPart = '';\r\n\t\t\t\t\tif ($position !== 0) {\r\n\t\t\t\t\t\t$startStrPart = substr($word, 0, $position);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$strongStrPart = '<strong>' . substr($word, $position, strlen($needleWord)) . '</strong>';\r\n\r\n\t\t\t\t\t$lastStrPart = '';\r\n\t\t\t\t\tif (strlen($startStrPart) + strlen($needleWord) < strlen($word)) {\r\n\t\t\t\t\t\t$lastStrPart = substr($word, strlen($needleWord) + strlen($startStrPart),\r\n\t\t\t\t\t\t\t\t\tstrlen($word) - strlen($needleWord) - strlen($startStrPart));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$highlightedText .= $startStrPart\r\n\t\t\t\t\t\t\t. $strongStrPart\r\n\t\t\t\t\t\t\t. $lastStrPart . ' ';\r\n\t\t\t\t\t$replaced = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$replaced) {\r\n\t\t\t\t$highlightedText .= $word . ' ';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new Raw($highlightedText);\r\n\t}", "public function highlight($file) {\n\t\t$src = file_get_contents($file);\n\t\t$addedPhp = false;\n\t\tif (strpos($src, '<?') === false) {\n\t\t\t$src = '<? '.$src;\n\t\t\t$addedPhp = true;\n\t\t}\n\t\t$hSrc = str_replace(\"\\n\", '', highlight_string($src, 1));\n\t\tif ($addedPhp) {\n\t\t\t$hSrc = implode('', explode('&lt;?&nbsp;', $hSrc, 2));\n\t\t}\n\t\t\n\t\t// add line numbers\n\t\t$hSrc = str_replace(['<code>', '</code>'], '', $hSrc);\n\t\t$hSrcArr = explode('<br />', $hSrc);\n\t\tfor ($i = 0, $l = count($hSrcArr); $i < $l; $i++) {\n\t\t\t$hSrcArr[$i] = '<a href=\"#line-'.($i + 1).'\" id=\"line-'.($i + 1).'\" class=\"src-line\">'.($i + 1).'</a>'.$hSrcArr[$i];\n\t\t}\n\t\t$hSrc = '<code>'.implode('<br />', $hSrcArr).'</code>';\n\t\t\n\t\treturn $hSrc;\n\t}", "function alpha_highlight_search_results($text){\n if(is_search()){\n $pattern = '/('. join('|', explode(' ', get_search_query())).')/i';\n $text = preg_replace($pattern, '<span class=\"search-highlight\">\\0</span>', $text);\n }\n return $text;\n}", "function search_content_highlight($content = '') {\n\tif (empty($content))\n \t$content = get_the_content();\n $keys = implode('|', explode(' ', get_search_query()));\n $content = preg_replace('/(' . preg_quote($keys, '/') .')/iu', '<strong class=\"search-highlight\">\\0</strong>', $content);\n\n echo '<p>' . $content . '</p>';\n}", "protected function compile()\n\t{\n\t\t$this->Template->code = htmlspecialchars($this->code);\n\n\t\t// Syntax highlighter\n\t\tif ($this->highlight)\n\t\t{\n\t\t\t$arrMapper = array\n\t\t\t(\n\t\t\t\t'ApacheConf' => 'shBrushApacheConf',\n\t\t\t\t'AS3' => 'shBrushAS3',\n\t\t\t\t'Bash' => 'shBrushBash',\n\t\t\t\t'C' => 'shBrushCpp',\n\t\t\t\t'CSharp' => 'shBrushCSharp',\n\t\t\t\t'CSS' => 'shBrushCss',\n\t\t\t\t'Delphi' => 'shBrushDelphi',\n\t\t\t\t'Diff' => 'shBrushDiff',\n\t\t\t\t'Groovy' => 'shBrushGroovy',\n\t\t\t\t'HTML' => 'shBrushXml',\n\t\t\t\t'Java' => 'shBrushJava',\n\t\t\t\t'JavaFX' => 'shBrushJavaFX',\n\t\t\t\t'JavaScript' => 'shBrushJScript',\n\t\t\t\t'Perl' => 'shBrushPerl',\n\t\t\t\t'PHP' => 'shBrushPhp',\n\t\t\t\t'PowerShell' => 'shBrushPowerShell',\n\t\t\t\t'Python' => 'shBrushPython',\n\t\t\t\t'Ruby' => 'shBrushRuby',\n\t\t\t\t'Scala' => 'shBrushScala',\n\t\t\t\t'SQL' => 'shBrushSql',\n\t\t\t\t'Text' => 'shBrushPlain',\n\t\t\t\t'VB' => 'shBrushVb',\n\t\t\t\t'XHTML' => 'shBrushXml',\n\t\t\t\t'XML' => 'shBrushXml'\n\t\t\t);\n\n\t\t\t$this->Template->shClass = 'brush: ' . strtolower($this->highlight);\n\n\t\t\tif ($this->shClass)\n\t\t\t{\n\t\t\t\t$this->Template->shClass .= '; ' . $this->shClass;\n\t\t\t}\n\n\t\t\t// Add the style sheet\n\t\t\t$GLOBALS['TL_CSS'][] = 'assets/highlighter/' . $GLOBALS['TL_ASSETS']['HIGHLIGHTER'] . '/shCore.css|static';\n\n\t\t\t// Add the JavaScripts\n\t\t\t$GLOBALS['TL_HIGHLIGHTER'][] = 'assets/highlighter/' . $GLOBALS['TL_ASSETS']['HIGHLIGHTER'] . '/XRegExp.js';\n\t\t\t$GLOBALS['TL_HIGHLIGHTER'][] = 'assets/highlighter/' . $GLOBALS['TL_ASSETS']['HIGHLIGHTER'] . '/shCore.js';\n\t\t\t$GLOBALS['TL_HIGHLIGHTER'][] = 'assets/highlighter/' . $GLOBALS['TL_ASSETS']['HIGHLIGHTER'] . '/' . $arrMapper[$this->highlight] . '.js';\n\n\t\t\t// The shBrushXml.js file is required for the \"html-script\" option (see #4748)\n\t\t\tif ($this->shClass != '' && strpos($this->shClass, 'html-script') !== false)\n\t\t\t{\n\t\t\t\t$GLOBALS['TL_HIGHLIGHTER'][] = 'assets/highlighter/' . $GLOBALS['TL_ASSETS']['HIGHLIGHTER'] . '/shBrushXml.js';\n\t\t\t}\n\t\t}\n\t}", "public function setHighlightUsePhraseHighlighter(bool $flag): \\SolrQuery {}", "public function setHighlightUsePhraseHighlighter(bool $flag): \\SolrQuery {}", "function highlightKeywords($text, $keyword) {\n $wordsAry = explode(\" \", $keyword);\n $wordsCount = count($wordsAry);\n \n for($i=0;$i<$wordsCount;$i++) {\n $highlighted_text = \"<span style='font-weight:bold;background:yellow' class='rounded p-1'>$wordsAry[$i]</span>\";\n $text = str_ireplace($wordsAry[$i], $highlighted_text, $text);\n }\n\n return $text;\n}", "function highlightKeywords($text, $keyword) {\n $wordsAry = explode(\" \", $keyword);\n $wordsCount = count($wordsAry);\n \n for($i=0;$i<$wordsCount;$i++) {\n $highlighted_text = \"<span style='font-weight:bold;background:yellow' class='rounded p-1'>$wordsAry[$i]</span>\";\n $text = str_ireplace($wordsAry[$i], $highlighted_text, $text);\n }\n\n return $text;\n}", "function highlightResult(array $result, string $fulltext): array\n{\n foreach ($result as $key => $value) {\n $titre = $value['titre'];\n\n // Mise en surbrillance du titre\n if (stripos($titre, clearString($fulltext)) !== FALSE) {\n $pattern = \"#(.*)(\" . clearString($fulltext) . \")(.*)#i\";\n $result[$key]['titre'] = preg_replace($pattern, \"$1<span class='highlight'>$2</span>$3\", $titre);\n\n } elseif (stripos($titre, $fulltext) !== FALSE) {\n $pattern = \"#(.*)(\" . $fulltext . \")(.*)#i\";\n $result[$key]['titre'] = preg_replace($pattern, \"$1<span class='highlight'>$2</span>$3\", $titre);\n\n } else {\n $result[$key]['titre'] = $titre;\n }\n\n // Mise en surbrillance du details\n if (!empty($value['details']) && stripos($value['details'], clearString($fulltext)) !== FALSE) {\n $pattern = \"#(.*)(\" . clearString($fulltext) . \")(.*)#i\";\n $result[$key]['details'] = preg_replace($pattern, \"$1<span class='highlight'>$2</span>$3\", $value['details']);\n\n } elseif (!empty($value['details']) && stripos($value['details'], $fulltext) !== FALSE) {\n $pattern = \"#(.*)(\" . $fulltext . \")(.*)#i\";\n $result[$key]['details'] = preg_replace($pattern, \"$1<span class='highlight'>$2</span>$3\", $value['details']);\n }\n\n // Mise en surbrillance des mots-clés\n if (!empty($value['keywords'])) {\n $keywords = explode(\"\\n\", $value['keywords']);\n\n foreach ($keywords as $string) {\n if (stripos($string, clearString($fulltext)) !== FALSE) {\n $pattern = \"#(.*)(\" . clearString($fulltext) . \")(.*)#i\";\n $result[$key]['keywords'] = '\"' . preg_replace($pattern, \"...$1<span class='highlight'>$2</span>$3...\", $string) . '\"';\n\n break;\n } elseif (stripos($string, $fulltext) !== FALSE) {\n $pattern = \"#(.*)(\" . $fulltext . \")(.*)#i\";\n $result[$key]['keywords'] = '\"' . preg_replace($pattern, \"...$1<span class='highlight'>$2</span>$3...\", $string) . '\"';\n\n break;\n } else {\n $result[$key]['keywords'] = \"\";\n }\n }\n }\n }\n\n return $result;\n}", "public function markup($text);", "function get_highlighted_data($content, $word) {\n $replace = '<span class=\"coloring\">' . $word . '</span>';\n $content = str_replace($word, $replace, $content);\n return $content;\n }", "public static function textFormatting($text) {\n\t\t// Bold text by surrounding with **\n\t\t$text = preg_replace('/\\*\\*(.*)\\*\\*/U', '<span style=\"font-weight: bold;\">\\\\1</span>', $text);\n\t\t// Underline text by surrounding with __ (double underscores)\n\t\t$text = preg_replace('/__(.*)__/U', '<span style=\"text-decoration: underline;\">\\\\1</span>', $text);\n\t\t// Italicize text by surrounding with ~~\n\t\t$text = preg_replace('/~~(.*)~~/U', '<span style=\"font-style: italic;\">\\\\1</span>', $text);\n\t\t// Increase font size to xx-large by surrounding with ++++\n\t\t$text = preg_replace('/\\+\\+\\+\\+(.*)\\+\\+\\+\\+/U', '<span style=\"font-size: xx-large;\">\\\\1</span>', $text);\n\t\t// Increase font size to x-large by surrounding with ++\n\t\t$text = preg_replace('/\\+\\+(.*)\\+\\+/U', '<span style=\"font-size: x-large;\">\\\\1</span>', $text);\t\n\n\t\treturn $text;\n\t}", "function text_to_html($aParams)\r\n{\r\n\t$aParams['aText'] = htmlentities($aParams['aText']);\r\n\r\n\t$aParams['aText'] = preg_replace('/\\[b\\]/', '<b>', $aParams['aText']);\r\n\t$aParams['aText'] = preg_replace('/\\[\\/b\\]/', '</b>', $aParams['aText']);\r\n\r\n\t$aParams['aText'] = preg_replace('/\\[i\\]/', '<i>', $aParams['aText']);\r\n\t$aParams['aText'] = preg_replace('/\\[\\/i\\]/', '</i>', $aParams['aText']);\r\n\r\n\t$aParams['aText'] = preg_replace('/\\[u\\]/', '<u>', $aParams['aText']);\r\n\t$aParams['aText'] = preg_replace('/\\[\\/u\\]/', '</u>', $aParams['aText']);\r\n\r\n\t$aParams['aText'] = preg_replace('/\\[hl\\]/', '<span class=\"highlight\">', $aParams['aText']);\r\n\t$aParams['aText'] = preg_replace('/\\[\\/hl\\]/', '</span>', $aParams['aText']);\r\n\r\n\t$aParams['aText'] = nl2br($aParams['aText']);\r\n\tif ($aParams['aParagraph'])\r\n\t{\r\n\t\t$paragraphs = explode(\"\\r\\n\", $aParams['aText']);\r\n\t\tforeach ($paragraphs as $paragraph)\r\n\t\t{\r\n\t\t\tif (strlen($paragraph) > 0)\r\n\t\t\t{\r\n\t\t\t\t$out .= \"<span class=\\\"user\\\">{$paragraph}</span>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$out = $aParams['aText'];\r\n\t}\r\n\treturn $out;\r\n}", "function markdown_wiki_highlight_code_hook($hook, $entity_type, $returnvalue, $params) {\n\telgg_load_js('highlight');\n\telgg_load_css('highlight');\n}", "function formatTopicMessage($topicMessage) {\r\n global $highlight;\r\n\r\n $topicMessage['titre'] = printSecuTags($topicMessage['titre']);\r\n\r\n if ($highlight != '') {\r\n list($topicMessage['titre'], $topicMessage['txt']) = highlightText(\r\n $topicMessage['titre'], $topicMessage['txt']\r\n );\r\n }\r\n\r\n return $topicMessage;\r\n}", "public function hl($code)\n {\n $hl = new Highlighter();\n $hl->setAutodetectLanguages(array('php', 'javascript', 'css', 'html'));\n $highlighted = $hl->highlightAuto($code);\n// echo \"<pre><code class=\\\"hljs {$highlighted->language}\\\">\";\n// echo $highlighted->value;\n// echo \"</code></pre>\";\n return \"<pre><code class=\\\"hljs {$highlighted->language}\\\">\".($highlighted->value).\"</code></pre>\";\n }", "static function highlightWords($text, $words, $nohighlight = false) {\n $colors = array('yellow', 'pink', 'gray');\n $i = 0;\n /* * * the maximum key number ** */\n $num_colors = max(array_keys($colors));\n\n $words = trim($words);\n $the_count = 0;\n $wordsArray = explode(' ', $words);\n foreach ($wordsArray as $word) {\n if (strlen(trim($word)) != 0) {\n $text = str_ireplace($word, '~' . $i . $word . '^' . $i, $text, $count);\n if ($i == $num_colors) {\n $i = 0;\n } else {\n $i++;\n }\n $the_count = $count + $the_count;\n }\n }\n //var_dump($colors);\n for ($i = 0; $i < count($colors); $i++) {\n if ($nohighlight) {\n $text = str_replace('~' . ($i), '<b><font color=red>', $text);\n $text = str_replace('^' . ($i), '</font></b>', $text);\n } else {\n $text = str_replace('~' . ($i), '<b><span style=\"background-color:' . $colors[$i] . ';display:inline-block\">', $text);\n $text = str_replace('^' . ($i), '</span></b>', $text);\n }\n }\n return $text;\n }", "function geshifilter_highlight_string_process($source_code, $inline_mode) {\n // Make sure that the source code starts with < ?php and ends with ? >\n $text = trim($source_code);\n if (substr($text, 0, 5) != '<?php') {\n $source_code = '<?php'. $source_code;\n }\n if (substr($text, -2) != '?>') {\n $source_code = $source_code .'?>';\n }\n // Use the right container\n $container = $inline_mode ? 'span' : 'div';\n // Process with highlight_string()\n $text = '<'. $container .' class=\"codeblock geshifilter\">'. highlight_string($source_code, TRUE) .'</'. $container .'>';\n // Remove newlines (added by highlight_string()) to avoid issues with the linebreak filter\n $text = str_replace(\"\\n\", '', $text);\n return $text;\n}", "function setHighlightType($_type)\n {\n switch($_type)\n {\n case 'sentence':\n case 'paragraph':\n case 'surroundtext':\n case 'surroundtextsingle':\n case 'teaser':\n case 'array':\n $this->highlightType = $_type;\n return true;\n break;\n \n default:\n $this->highlightType = 'surroundtextsingle';\n return false;\n }\n \n $this->hashMe .= $this->highlightType;\n }", "function SyntaxHighlighter() {\n\tglobal $SyntaxHighlighter;\n\n\tif ( ! isset( $SyntaxHighlighter ) ) {\n\t\t$SyntaxHighlighter = new SyntaxHighlighter();\n\t}\n\n\treturn $SyntaxHighlighter;\n}", "public function getHighlightedSource ($fileName, $errors, $projectSource)\n {\n ob_start();\n $code = $this->cbFDHandler->loadFile($projectSource . '/' . $fileName);\n ini_set('highlight.comment', 'comment');\n ini_set('highlight.default', 'default');\n ini_set('highlight.keyword', 'keyword');\n ini_set('highlight.string', 'string');\n ini_set('highlight.html', 'html');\n \n $code = highlight_string($code, true);\n $code = str_replace(array('&nbsp;' , '&amp;' , '<br />' , '<span style=\"color: '), \n array(' ' , '&#38;' , \"\\n\" , '<span class=\"'), \n substr($code, 33, - 15));\n $code = trim($code);\n $code = str_replace(\"\\r\", \"\\n\", $code);\n $code = preg_replace(\"!\\n\\n\\n+!\", \"\\n\\n\", $code);\n $lines = explode(\"\\n\", $code);\n $previous = false;\n\n // Output Listing \n echo \" <ol class=\\\"code\\\">\\n\";\n foreach ($lines as $key => $line) {\n if (substr($line, 0, 7) == '</span>') {\n $previous = false;\n $line = substr($line, 7);\n }\n \n if (empty($line)) {\n $line = '&#160;'; \n }\n \n if ($previous) {\n $line = \"<span class=\\\"$previous\\\">\" . $line;\n }\n \n // Set Previous Style\n if (strpos($line, '<span') !== false) {\n switch (substr($line, strrpos($line, '<span') + 13, 1)) {\n case 'c':\n $previous = 'comment';\n break;\n case 'd':\n $previous = 'default';\n break;\n case 'k':\n $previous = 'keyword';\n break;\n case 's':\n $previous = 'string';\n break;\n }\n }\n \n // Unset Previous Style Unless Span Continues \n if (substr($line, - 7) == '</span>') {\n $previous = false;\n } elseif ($previous) {\n $line .= '</span>';\n }\n \n $num = $key + 1;\n $classname = 'white';\n $classnameEven = 'even';\n $prefix = '';\n $suffix = '';\n $max = 0;\n $min = count($lines);\n $singleRow = false;\n \n foreach ($errors as $error) {\n \n if (($error['line'] <= $num) && ($error['to-line'] >= $num)) {\n \n if ($max <= (int)$error['to-line']) {\n $max = (int)$error['to-line']; \n }\n if ($min >= (int)$error['line']) {\n $min = (int)$error['line']; \n }\n \n $classnameEven = 'transparent';\n $classname = 'transparent';\n \n if ((int)$error['line'] == $num) {\n $prefix = sprintf('<li id=\"line-%s-%s\" class=\"%s\" ><ul>', \n $error['line'], \n $error['to-line'], \n (($prefix != '') ? 'moreErrors' : $error['source']));\n }\n if ((int)$error['to-line'] == $num) {\n $suffix = \"</ul></li>\";\n }\n }\n }\n if ($num < $max && $min == $num) $suffix = ''; \n echo sprintf('%s<li id=\"line-%d\" class=\"%s\"> <a name=\"line-%d\"></a> <code>%s</code></li>%s' . \"\\n\", \n $prefix, $num, (($key % 2) ? $classnameEven : $classname), $num, $line, $suffix);\n }\n echo \"</ol>\\n\";\n $contents = ob_get_contents();\n ob_end_clean();\n return $contents;\n }", "public static function highlight(string $text, array|string $phrase, array $options = []): string\n {\n if (empty($phrase)) {\n return $text;\n }\n\n $defaults = [\n 'format' => '<span class=\"highlight\">\\1</span>',\n 'html' => false,\n 'regex' => '|%s|iu',\n 'limit' => -1,\n ];\n $options += $defaults;\n\n $html = $format = $limit = null;\n\n /**\n * @var bool $html\n * @var array|string $format\n * @var int $limit\n */\n extract($options);\n\n if (is_array($phrase)) {\n $replace = [];\n $with = [];\n\n foreach ($phrase as $key => $segment) {\n $segment = '(' . preg_quote($segment, '|') . ')';\n if ($html) {\n $segment = \"(?![^<]+>){$segment}(?![^<]+>)\";\n }\n\n $with[] = is_array($format) ? $format[$key] : $format;\n $replace[] = sprintf($options['regex'], $segment);\n }\n\n return preg_replace($replace, $with, $text, $limit);\n }\n\n $phrase = '(' . preg_quote($phrase, '|') . ')';\n if ($html) {\n $phrase = \"(?![^<]+>){$phrase}(?![^<]+>)\";\n }\n\n return preg_replace(sprintf($options['regex'], $phrase), $format, $text, $limit);\n }", "public function buildHighlightedOutput(): SyntaxHighlightingPane {\n if ($this->outputHl === null) {\n $this->outputHl = 'text';\n }\n $outputSyntaxPane = new SyntaxHighlightingPane();\n if ($this->outputHl === 'text') {\n $outputSyntaxPane->useDefaultContentCopyController(false);\n $icon = FontAwesome::i('fas fa-terminal')->fixedWidth(true);\n } else {\n $outputSyntaxPane->useDefaultContentCopyController(true);\n $icon = FileIcons::instance()->iconFor($this->outputHl)->addCssClass('fa-fw');\n }\n $outputSyntaxPane->setPaneTitle($this->buildIcons($this->outputHl, true) . ' ' . $this->titles[self::OUTPUT_TEXT]);\n //$outputSyntaxPane->executeFromFile($this->path, $this->outputHl);\n $outputSyntaxPane->setSource($this->data, $this->outputHl, true);\n return $outputSyntaxPane;\n }", "function highlightWords($text, $words){\n\tforeach ($words as $word){\n\t\t/*** quote the text for regex ***/\n\t\t$word = preg_quote($word);\n\t\t/*** highlight the words ***/\n\t\t$text = preg_replace(\"/\\b($word)\\b/i\", '<span class=\"highlight_word\">\\1</span>', $text);\n\t}\n\t/*** return the text ***/\n\treturn $text;\n}", "public static function highlight($code, $language, $prefix = \"php_\")\n {\n if (strcasecmp($language, 'php') !== 0) {\n return $code;\n }\n \n // caches tokenizer constants\n static $tokenStrings = null;\n\n $openingTagAdded = false;\n\n if (strpos($code, \"<?php\") === false) {\n $code = \"<?php \\n\" . $code;\n $openingTagAdded = true;\n }\n\n // get all tokenizer constants if this is the first call;\n // we will use constants names as class names (eg. T_DOC_COMMENT => .tDocComment)\n if (!$tokenStrings) {\n $tokenStrings = get_defined_constants();\n // throw away constants that don't start with 'T_'\n array_walk($tokenStrings, function ($value, $key) use (&$tokenStrings) {\n if (strpos($key, 'T_') !== 0) {\n unset($tokenStrings[$key]);\n }\n });\n }\n\n $output = $styles = '';\n $tokens = token_get_all((string)$code);\n\n // iterate tokens and generate HTML\n foreach ($tokens as $token) {\n if ($token[0] === T_OPEN_TAG) {\n if ($openingTagAdded) {\n continue;\n }\n }\n\n // turn whitespace into a string token\n if ($token[0] === T_WHITESPACE) {\n $token = $token[1];\n }\n\n if (is_string($token)) {\n \n if (array_key_exists($token, self::$stringClassMapping)) {\n $class = self::$stringClassMapping[$token];\n $output .= sprintf('<span class=\"%s%s\">%s</span>', $prefix, $class, $token);\n continue;\n }\n\n $output .= htmlspecialchars($token, ENT_QUOTES);\n continue;\n }\n\n list($id, $text, $line) = $token;\n\n // escape for HTML output\n $text = htmlspecialchars($text, ENT_QUOTES);\n\n // get the token name\n if (($class = array_search($id, $tokenStrings)) !== false) {\n $output .= sprintf('<span class=\"%s%s\">%s</span>', $prefix, $class, $text);\n } else {\n // we should never reach this point (!?)\n $output .= $text;\n }\n }\n\n return sprintf('%s%s', $styles, $output);\n }", "public function index() {\n $file_path = APP_PATH . 'controllers/HighlighterController.php';\n $lines = file($file_path);\n if($lines) {\n $str = '';\n foreach($lines as $line) {\n $str .= $line;\n }\n }\n $html = Loader::load('HTML');\n $highlighted = $html->highlight($str, 'php');\n $this->set('highlighted', $highlighted);\n $this->load->view('highlight/index');\n }", "function mosShowSource( $filename, $withLineNums=false ) {\n\n\tini_set('highlight.html', '000000');\n\tini_set('highlight.default', '#800000');\n\tini_set('highlight.keyword','#0000ff');\n\tini_set('highlight.string', '#ff00ff');\n\tini_set('highlight.comment','#008000');\n\n\tif (!($source = @highlight_file( $filename, true ))) {\n\t\treturn JText::_( 'Operation Failed' );\n\t}\n\t$source = explode(\"<br />\", $source);\n\n\t$ln = 1;\n\n\t$txt = '';\n\tforeach( $source as $line ) {\n\t\t$txt .= \"<code>\";\n\t\tif ($withLineNums) {\n\t\t\t$txt .= \"<font color=\\\"#aaaaaa\\\">\";\n\t\t\t$txt .= str_replace( ' ', '&nbsp;', sprintf( \"%4d:\", $ln ) );\n\t\t\t$txt .= \"</font>\";\n\t\t}\n\t\t$txt .= \"$line<br /><code>\";\n\t\t$ln++;\n\t}\n\treturn $txt;\n}", "private function hackLNHighlight(string $html) : string {\n\t\t$last = 0;\n\t\t$srch = \">\\n<pre><code class=\\\"language-\";\n\t\t$srchlen = strlen($srch);\n\t\tfor (;;) {\n\t\t\t$start = strpos($html,$srch,$last);\n\t\t\tif ($start === false) break;\n\t\t\t$last = $start + $srchlen;\t// for next round\n\t\t\t$end = strpos($html,'>',$last);\t// find closing >\n\t\t\tif ($end === false) continue;\t// very strange, but skip it\n\t\t\t$leftb = strpos($html,'[',$last);\n\t\t\tif ($leftb === false || $leftb > $end) {\n\t\t\t\t$html = substr_replace($html,'<pre class=\"line-numbers\">',$start+2,5);\n\t\t\t\tcontinue;\t// just insert line-numbers\n\t\t\t}\n\t\t\t$rightb = strpos($html,']',$leftb+1);\n\t\t\tif ($rightb === false) continue;\t// unmatched bracket, probably an error\n\t\t\t$dataLine = html_entity_decode(substr($html,$leftb+1,$rightb-$leftb-1));\n\t\t\t$count = 0;\n\t\t\t$dataLine = ltrim(str_ireplace('/nonr','',$dataLine,$count));\n\t\t\t$dataLine = (strlen($dataLine) > 0 ? ' ' : '') . $dataLine;\n\t\t\t$html = substr($html,0,$start)\n\t\t\t\t. \">\\n<pre\" . ($count > 0 ? '' : ' class=\"line-numbers\"') . $dataLine . '>'\n\t\t\t\t. '<code class=\"language-'\n\t\t\t\t. substr($html,$last,$leftb-$last)\n\t\t\t\t. substr($html,$rightb+1);\n\t\t}\n\t\treturn $html;\n\t}", "function highlight_phrase($str, $phrase, $tag_open = '<mark>', $tag_close = '</mark>') {\n\t\treturn ($str !== '' && $phrase !== '') ? preg_replace ( '/(' . preg_quote ( $phrase, '/' ) . ')/i' . (@UTF8_ENABLED ? 'u' : ''), $tag_open . '\\\\1' . $tag_close, $str ) : $str;\n\t}", "function search_excerpt_highlight() {\n\t$excerpt = get_the_excerpt();\n\t$keys = implode('|', explode(' ', get_search_query()));\n\t$excerpt = preg_replace('/(' . $keys .')/iu', '<strong class=\"search-highlight\">\\0</strong>', $excerpt);\n\t\n\techo '<p>' . $excerpt . '</p>';\n}", "function HiliteText ($text )\r\n\t{\r\n\r\n\t\tif (isset($_REQUEST['search_str']) AND $_REQUEST['remove_hilight'] != \"yes\")\r\n\t\t{\r\n\t\t\t$text = str_ireplace ( $_REQUEST['search_str'], \r\n\t\t\t'<span class=\"HighlightLiteBlue\">'.$_REQUEST['search_str'] . '</span>', $text );\r\n\t\t}\r\n\t\t\r\n\t\tRETURN $text;\t\t\r\n\t}", "function highlight($locator) {\r\n\t\t\techo $this->__getRow('highlight', $locator);\r\n\t\t}", "function hyperlight_before_filter($content) {\n return preg_replace_callback(\n '#<pre(.*?)>(.*?)</pre>#is',\n 'hyperlight_highlight_block',\n $content\n );\n}", "public static function format($text) {\n\t\t$text = preg_replace_callback('/<b>(.+?)<\\/b>/', function($matches) {\n\t\t\treturn SS_Cli::text($matches[1], null, null, true);\n\t\t}, $text);\n\n\t\t$text = preg_replace_callback('/<success>(.+?)<\\/success>/', function($matches) {\n\t\t\treturn SS_Cli::text($matches[1], 'green', null, true);\n\t\t}, $text);\n\n\t\t$text = preg_replace_callback('/<error>(.+?)<\\/error>/', function($matches) {\n\t\t\treturn SS_Cli::text($matches[1], 'red', null, true);\n\t\t}, $text);\n\n\t\t$text = preg_replace_callback('/<caution>(.+?)<\\/caution>/', function($matches) {\n\t\t\treturn SS_Cli::text($matches[1], 'yellow', null, true);\n\t\t}, $text);\n\n\t\t$text = preg_replace_callback('/<info>(.+?)<\\/info>/', function($matches) {\n\t\t\treturn SS_Cli::text($matches[1], 'cyan', null, true);\n\t\t}, $text);\n\n\n\t\treturn $text;\n\t}", "function highlightSearchText($findme, $subject) \r\n{\r\n // Ignores the case and do keep the original capitalization by using $1 in $replacewith \r\n // Required: PHP 5 \r\n\t\r\n\t$rest = $subject; \r\n\t$result = ''; \r\n\t$highlightTagStart = \"<SPAN style=\\\"BACKGROUND-COLOR: #ffff00\\\">\";\r\n\t$highlightTagEnd = \"</SPAN>\";\r\n\r\n\twhile (stripos($rest, $findme) !== false) { \r\n\t\t$pos = stripos($rest, $findme);\r\n\t\t$result = $result . substr($rest, 0, $pos);\r\n\t\t$result = $result . $highlightTagStart;\r\n\t\t$result = $result . substr($rest, $pos, strlen($findme));\r\n $result = $result . $highlightTagEnd;\r\n\t\t$rest = substr($rest, $pos + strlen($findme));\r\n\t\t\r\n\t} \r\n\t// After the last match, append the rest \r\n\t$result = $result . $rest; \r\n\treturn $result; \r\n}", "function ut_highlight( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '',\n\t\t\"outline\" => '',\n\t\t\"text\" => ''\n\t), $atts));\n $content = wpautop(trim($content));\n return '<div class=\"box-light card '.$color.' tx'.$text.' brd-'.$outline.'\">' . do_shortcode($content) . '</div>';\n}", "function highlighted_shortcode( $atts, $content = null ) {\r\n\textract( shortcode_atts( array(\r\n\t\t'color' => 'dark',\r\n\t\t'text' => ''\r\n ), $atts ) );\r\n\t \r\n\treturn '<span class=\"highlight ' . $color . '\">' . $text . $content .'</span>';\r\n}", "function ew_Highlight($src, $bkw) {\n\t\t$outstr = \"\";\n\t\tif (strlen($src) > 0 && (strlen($bkw) > 0)) {\n\t\t\t$x=0;\n\t\t\t$wrky = stripos($src, $bkw);\n\t\t\tif ($wrky !== FALSE) {\n\t\t\t\t$outstr .= substr($src, $x, $wrky) .\n\t\t\t\t\t\"<span class=\\\"ewHighlightSearch\\\">\" .\n\t\t\t\t\tsubstr($src, $wrky, strlen($bkw)) . \"</span>\";\n\t\t\t\t$x = $wrky + strlen($bkw);\n\t\t\t\t$outstr .= substr($src, $x, strlen($src));\n\t\t\t}\t\t\t\n\t\t} else {\n\t\t\t$outstr = $src;\n\t\t}\n\t\treturn $outstr;\n\t}", "function highlightTerms($QueryString, $querys){\r\n\r\n\t\t\t\tforeach ($querys as $query){ \r\n\t\t\t\t\r\n\t\t\t\t\t$queryStringRep = str_ireplace($query, '<span =style\"color:red\">*'.$query.'*</span>', $queryString); \r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn $queryStringRep;\r\n\t\t}", "function indonez_highlight_purple( $atts, $content = null ) {\n return '<span class=\"highlight-purple\">' . do_shortcode($content) . '</span>';\n}", "public function getHighlightRegexSlop(): float {}", "public function getHighlightRegexSlop(): float {}", "function code($texte){\r\n $texte = htmlentities($texte);\r\n\t\r\n //gras\r\n $texte = preg_replace(\"/&lt;gras&gt;(.*)&lt;\\/gras&gt;/siU\", \"<span class='gras_code'>$1</span>\", $texte);\r\n\t//italique\r\n $texte = preg_replace(\"/&lt;italic&gt;(.*)&lt;\\/italic&gt;/siU\", \"<span class='italic_code'>$1</span>\", $texte);\r\n\t//lien\r\n $texte = preg_replace(\"/&lt;lien=&quot;(.*)&quot;&gt;(.*)&lt;\\/lien&gt;/siU\", \"<a href='$1'>$2</a>\", $texte);\r\n\t//image\r\n $texte = preg_replace(\"/&lt;image=&quot;(.*)&quot;\\/&gt;/siU\", \"<img width='200' src='$1'>\", $texte);\r\n\t//citation\r\n $texte = preg_replace(\"/&lt;citation=&quot;(.*)&quot;&gt;(.*)&lt;\\/citation&gt;/siU\", \"<p class='citation_code'><span class='souligne_code' >Citation de $1 :</span><br><span class='italic_code'>$2</span></p>\", $texte);\r\n\t//souligner\r\n $texte = preg_replace(\"/&lt;souligne&gt;(.*)&lt;\\/souligne&gt;/siU\", \"<span class='souligne_code'>$1</span>\", $texte);\r\n\t//couleur\r\n $texte = preg_replace(\"#&lt;color=&quot;(red|green|purple|blue|yellow)&quot;&gt;(.*)&lt;/color&gt;#siU\", \"<span style=\\\"color:$1\\\">$2</span>\", $texte);\r\n\t//taille\r\n $texte = preg_replace(\"#&lt;taille valeur=&quot;(8px|10px|12px|18px|22px|26px)&quot;&gt;(.*)&lt;/taille&gt;#siU\", \"<span style=\\\"font-size:$1\\\">$2</span>\", $texte);\r\n \r\n return($texte);\r\n}", "public function buildCodePane(): SyntaxHighlightingPane {\n $codePane = new SyntaxHighlightingPane();\n $icon = FileIcons::instance()->iconFor('php')->addCssClass('fa-fw');\n $codePane->setPaneTitle($icon . ' ' . $this->titles[self::EXAMPLECODE]);\n $codePane->loadFromFile($this->path);\n $codePane->addCssClass('code');\n return $codePane;\n }", "public function setHighlight(bool $flag): \\SolrQuery {}", "public function setHighlight(bool $flag): \\SolrQuery {}" ]
[ "0.7409183", "0.7131299", "0.7087883", "0.69975585", "0.67841333", "0.67832017", "0.6769217", "0.6764314", "0.6620886", "0.6620886", "0.6611313", "0.65053064", "0.6492326", "0.64656204", "0.6463898", "0.64552104", "0.6366623", "0.6346648", "0.6317799", "0.6316674", "0.6279667", "0.6278883", "0.6278328", "0.62670517", "0.6265431", "0.62242174", "0.62222385", "0.6213574", "0.6154453", "0.61227256", "0.61227256", "0.61218625", "0.6108988", "0.61021954", "0.6100057", "0.6094822", "0.6087363", "0.6085161", "0.6084265", "0.60841036", "0.6067723", "0.60645133", "0.6055917", "0.6041376", "0.6040863", "0.6038683", "0.6038683", "0.60362524", "0.6031518", "0.5975008", "0.5975008", "0.59700567", "0.5963989", "0.59613353", "0.5952435", "0.5942172", "0.59312844", "0.5922619", "0.5921821", "0.5921821", "0.59207636", "0.59207636", "0.59044445", "0.587547", "0.58732647", "0.5865788", "0.58650297", "0.5861716", "0.58605146", "0.5858814", "0.5848675", "0.584476", "0.5841894", "0.5815426", "0.5814413", "0.5794328", "0.5790684", "0.57755536", "0.5761454", "0.575743", "0.57470196", "0.5736567", "0.5732352", "0.57270545", "0.57263803", "0.5718451", "0.5712238", "0.5705374", "0.5677812", "0.5676657", "0.56661093", "0.5665573", "0.5665523", "0.56574655", "0.56519943", "0.56519943", "0.5649728", "0.56428015", "0.56344086", "0.56344086" ]
0.7908151
0
Checks the login lock setting of an application by field, returns true if it is locked
Проверяет настройку блокировки входа приложения по полю, возвращает true, если она заблокирована
public function checkLoginLock($application_id) { $field_id = 8 ;//'login_lock'; $application_fields = $this->factory->getModel('ApplicationField'); $rows = $application_fields->loadAllBy(array("table_row_id" => $application_id, "application_field_attribute_id" => $field_id)); if (!$rows || (count($rows) == 0)){ return "pass"; } else { return "locked"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLocked();", "public function isLocked();", "public function isLocked();", "public function isLocked();", "public function isLocked();", "function isLocked() ;", "public function isLocked() {}", "public function isLocked() {}", "public function isLocked() {\n if(strtotime($this->locktime)+60*5 < time() || $this->lockuser === null) {\n return false;\n } else {\n return $this->lockuser;\n }\n }", "public function setLoginLock($application_id)\n\t{\n\t\t$application_id = (int)$application_id;\n\t\t$application = ECash::getApplicationByID($application_id);\n\n\t\t$company_model = $this->factory->getModel('Company');\n\t\t$company_model->loadBy(array('company_id' => $application->getCompanyId()));\n\n\t\tif (method_exists($factory, \"getMasterDb\"))\n\t\t{\n\t\t\t$db = $this->factory->getMasterDb();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$db = $this->factory->getDB();\n\t\t}\n\t\t\t\n\t\t$business_rules = new ECash_BusinessRules($db);\n\t\t$settings = $business_rules->Get_Rule_Set_Component_Parm_Values($company_model->name_short, 'login_lock');\n\t\t$rate = $settings['max_attempt'];\n\n\t\t$loaded = $this->login_lock->loadBy(array('application_id' => $application_id));\n\t\tif (!$loaded)\n\t\t{\n\t\t\t$this->login_lock->date_created = date('Y-m-d H:i:s');\n\t\t\t$this->login_lock->application_id = $application_id;\n\t\t\t$this->login_lock->counter = 0;\n\t\t}\n\n\t\t$this->login_lock->counter++;\n\t\t$this->login_lock->save();\n\n\t\tif ($this->login_lock->counter >= $rate)\n\t\t{\n\t\t\t$olp_agent = $this->factory->getModel('Agent');\n\t\t\t$olp_agent->loadBy(array('login' => 'olp'));\n\t\t\t$olp_agent_id = $olp_agent->agent_id;\n\t\t\t$application->getContactFlags()->set($olp_agent_id, 'login_lock', 'application_id');\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isLocked(): bool;", "public function isLocked()\n {\n return in_array($this->type, static::$lockedFields);\n }", "public function isLocked()\n {\n return $this->account->getIsLocked();\n }", "function isLocked($rec)\n\t{\n\t\treturn (isset($rec[atkconfig(\"auth_accountdisablefield\")])&&$rec[atkconfig(\"auth_accountdisablefield\")]==1);\n\t}", "public static function lock()\n\t{\n\t\t$uniq = \\CMain::getServerUniqID();\n\t\t$connection = \\Bitrix\\Main\\Application::getConnection();\n\n\t\t$result = $connection->query(\"SELECT GET_LOCK('\".$uniq.self::getTableName().\"', 0) as L\");\n\t\t$lock = $result->fetch();\n\t\tif ($lock && $lock[\"L\"] == 1)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isLocked(){\n if(Auth::check()) {\n $lock = $this->editLock;\n\n if($lock) { // if there is a lock\n\n if (\n $lock->created_by!= Auth::user()->getAuthIdentifier() && // and it is not owned by this user\n $lock->expires_at->gt(Carbon::now()) // and its hasn't expired yet\n ) {\n return true; //its locked!\n }\n }\n //otherwise its not!\n return false;\n }\n return true; //just in case the user is not logged in\n }", "public function locked(){\n\t\treturn $this->locked_at!==null;\n\t}", "public function isLocked(){\n\t\treturn $this->locked;\n\t}", "function PortalIsItLocked() {\n\t$is_lock = false;\n\t$LockFile = '/tmp/MySB_Portal.lock';\n\n\tif (is_file($LockFile)) {\n\t\t$is_lock = true;\n\t}\n\treturn $is_lock;\n}", "function hasLock() ;", "public function is_locked() {\n\t\t\t$this->lock = get_transient( 'dfm_lt_' . $this->key );\n\t\t\treturn (bool) $this->lock;\n\t\t}", "public function isLocked()\n {\n $this->unlock();\n return (Mage::app()->loadCache(self::LOCK_NAME) !== false);\n }", "public function isLocked()\n {\n if ($this->{Foomy_Model_User_Peer::F_LOCKED}>0) {\n return true;\n }\n\n return false;\n }", "public function hasLock() {}", "public static function databaseLocked() {\n\t\treturn is_file(__DIR__ . \"/../install/LOCK\");\n\t}", "function isAccountNonLocked();", "public function isLocked()\n {\n return ($this->isEnabled() && $this->isActual());\n }", "private function try_to_lock() {\n\n\t\t// get current locked status\n\t\t$locked_arr = get_post_meta( self::$post_id, 'swp_locked', TRUE );\n\n\t\tif(!$locked_arr) { // not locked or available to lock\n\t\t\tself::lock();\n\t\t} else {\n\t\t\t// if the same user, refresh lock\n\t\t\tif($locked_arr['locked_by_id'] == self::$user_id){\n\t\t\t\tself::lock();\n\t\t\t}\n\n\t\t\t$lastUpdated = get_post_meta(self::$post_id, 'last_updated', TRUE);\n\t\t\t$expireTime = $lastUpdated + (10 * 60); // add 10 minutes\n\t\t\t$currentTime = self::$current_datetime_obj->getTimestamp();\n\n\t\t\t// check if it's been over 10 min since last save\n\t\t\tif( $currentTime > $expireTime ){\n\t\t\t\t// over 10 minutes, unlock\n\t\t\t\tself::lock();\n\t\t\t} else {\n\t\t\t\tself::get_form_data($locked_arr);\n\t\t\t}\n\t\t}\n\t}", "private function getLock()\n {\n // lock the user to edit\n $result = $this->model->action('navigation','lock',\n array('job' => 'is_locked',\n 'id_node' => (int)$this->viewVar['node']['id_node'],\n 'by_id_user' => (int)$this->controllerVar['loggedUserId']) );\n\n if(($result !== true) && ($result !== false))\n {\n $this->viewVar['node']['lock'] = true;\n }\n else\n {\n $this->viewVar['node']['lock'] = false;\n }\n }", "public function isLocked() : bool {\n return $this->lock && $this->locked;\n }", "public function isLocked(): bool\n {\n return $this->is_locked;\n }", "public function hasLogin(){\n return $this->_has(2);\n }", "function isLock(){\n if (isset($_SESSION['cart']) && $_SESSION['cart']['lock']) {\n return true;\n } else {\n return false;\n }\n }", "protected function isRecordLocked() : bool {}", "protected function isRecordLocked() : bool {}", "public function isLocked() {\n return false;\n }", "public function isLocked()\n {\n return $this->locked;\n }", "public function isLocked()\n {\n return $this->locked;\n }", "public static function checkLock($team){\n\t\ttry{\n\t\t\t$db = static::getDB();\n\t\t\t$stmt = $db->prepare(\"SELECT edit_lock FROM teams WHERE team_name LIKE :team\");\n\t\t\t$stmt->bindParam(':team',$team);\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif($stmt->rowCount() > 0){\n\t\t\t\treturn $result['edit_lock'];\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\n\t\t}\t\n\t}", "public function isAccountNonLocked();", "public function isLockDown()\n\t{\n\t\treturn false;\n\t}", "public function isModuleFieldLocked($module, $field)\n\t{\n\t\t$fieldModel = $this->getProfileTabFieldModel($module, $field);\n\t\treturn $fieldModel->isMandatory() || \\in_array($fieldModel->get('presence'), [1, 3]) ||\n\t\t\t\\in_array($fieldModel->getUIType(), self::$fieldLockedUiTypes) ||\n\t\t\t0 === strcasecmp($fieldModel->getFieldDataType(), 'autogenerated') ||\n\t\t\t0 === strcasecmp($fieldModel->getFieldDataType(), 'id') ||\n\t\t\t(1 !== $fieldModel->getDisplayType() && 10 !== $fieldModel->getDisplayType());\n\t}", "protected function checkLogin() {\n return true;\n }", "public function hasLogin(){\n return $this->_has(6);\n }", "public static function checkLock($name) {\n if(Redis::connection()->get('lock_'.$name)) {\n return true;\n } else {\n return false;\n }\n }", "public function getIsLock()\n {\n return $this->is_lock;\n }", "public function isLocked() {\n // Get the next matches...\n if ($this->getWinnerEntity() && $this->nextMatch('winner')) {\n if (count($this->nextMatch('winner')->getGameIds()) > 1) return TRUE;\n }\n if ($this->getLoserEntity() && $this->nextMatch('loser')) {\n if (count($this->nextMatch('loser')->getGameIds()) > 1) return TRUE;\n }\n\n return FALSE;\n }", "public function getLock(){\n\t\t$isLocked = false;\n\t\t//Check lock\n\t\t$delSql = 'DELETE FROM omoccureditlocks WHERE (ts < '.(time()-900).') OR (uid = '.$this->symbUid.')';\n\t\tif(!$this->conn->query($delSql)) return false;\n\t\t//Try to insert lock for , existing lock is assumed if fails\n\t\t$sql = 'INSERT INTO omoccureditlocks(occid,uid,ts) '.\n\t\t\t'VALUES ('.$this->occid.','.$this->symbUid.','.time().')';\n\t\tif(!$this->conn->query($sql)){\n\t\t\t$isLocked = true;\n\t\t}\n\t\treturn $isLocked;\n\t}", "public function testIsLocked()\n {\n $this->testLock();\n }", "function jam_cms_check_post_lock($post_id){\n\n $lock = get_post_meta($post_id, '_edit_lock', true );\n\n if (!$lock) {\n return false;\n }\n\n $lock = explode( ':', $lock );\n $time = $lock[0];\n $user_id = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post_id, '_edit_last', true );\n\n if (!get_userdata($user_id)){\n return false;\n }\n\n $time_window = apply_filters( 'wp_check_post_lock_window', 150 );\n\n if ($time && $time > time() - $time_window && get_current_user_id() != $user_id ) {\n $user = jam_cms_get_user_by_id($user_id);\n return $user;\n }\n\n return false;\n}", "public function isLocked( )\n {\n return $this->locked;\n }", "public function isLockOwner() {\n if ($this->_isWindows()) {\n throw new Exception('Unable to use isLockOwner() on a Windows system as it requires /proc');\n }\n\n return ($this->_getLockProcessId() === getmypid());\n }", "public function checkSiteLock($site)\n\t{ \t\n\t $value = Mage::getResourceSingleton(\"datafeeder/conf\")->getValue($site.\"/status\");\n\t if($value == '0' || $value == 'empty'){\n\t \t$this->log(\"true\");\n\t \treturn true;\n\t }else{\n\t \t$this->log(\"false\". $value);\n\t \treturn false;\n\t }\n\t}", "public function isLockedByMe()\n {\n return ($this->isLocked() && $this->isLockOwner());\n }", "public function isLockOwner()\n {\n $this->loadLockData();\n if ($this->_getData('user_id') == $this->_getSession()->getUser()->getId()\n && $this->_getData('session_id') == $this->_getSession()->getSessionId())\n {\n return true;\n }\n return false;\n }", "public function isLocked()\n\t{\n\t\treturn $this->getFree() == 0;\n\t}", "function isLockUser($username) {\n\t\t$user = UserFacade::findByField ( 'username', $username )->first ();\n\t\t$isLock = false;\n\t\tif ($user) {\n\t\t\t$currentLimitCount = $user->login_failed_count + 1;\n\t\t\t$userDataUpdate = array (\n\t\t\t\t\t'login_failed_count' => $currentLimitCount \n\t\t\t);\n\t\t\tif ($currentLimitCount > self::LOGIN_LIMIT_TIME) {\n\t\t\t\t$userDataUpdate ['user_locked_flg'] = true;\n\t\t\t\t\n\t\t\t\t$isLock = true;\n\t\t\t}\n\t\t\t\n\t\t\tUserFacade::update ( $userDataUpdate, $user->id );\n\t\t}\n\t\t\n\t\tif ($isLock)\n\t\t\tthrow new GisException ( trans ( 'common.login_user_is_locked' ), \\Gis\\Models\\SystemCode::RESOURCE_LOCKED );\n\t\t\n\t\treturn;\n\t}", "public function getLock($name) {\n $name = addslashes($this->dbdefault.'.'.$name);\n $query = \"SELECT GET_LOCK('$name', 0)\";\n $result = $this->query($query);\n list($lock_ok) = $this->fetchRow($result);\n\n return (bool)$lock_ok;\n }", "public function getLoginIsValid() {\n $t = time();\n \treturn ( ($this->wpj_endtime == 0 && $this->starttime < $t) || ($this->starttime < $t || $this->wpj_endtime > $t) );\n }", "public function isAccountLocked(ActiveRecord $model);", "private function isLocked($lockName){\n $checkLock = \"SELECT IS_FREE_LOCK('$lockName')\";\n $result = $this->dbConnection->query($checkLock);\n $check = $result->fetch_array();\n $result->free();\n\n if ($check[0] == 0){\n //is locked\n return true;\n }\n else{\n //is not locked\n return false;\n }\n }", "public function isLocked(): bool {\n\t\tif (empty($this->pid) && empty($this->server)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_isLocked();\n\t}", "protected function _feedGenIsLocked() {\n return Mage::helper('hawksearch_datafeed/feed')->thereAreFeedLocks();\n }", "public static function isLoginUsed($login){\r\n $data = static::exec_sql('USER_LOGIN_USED',array(':login' => $login));\r\n return !empty($data);\r\n }", "private function hasLockfile(){\n\n return is_file($this->lockfile);\n }", "public static function isLogin() {\n $usr = Session::get('user');\n if (!empty($usr)) {\n return $usr['status'] == 2 ? true : false;\n }\n return false;\n }", "public static function loginEnabled()\n\t{\n\t\treturn TRUE;\n\t}", "public function isLocked()\n {\n $this->checkConfig();\n\n $lockFile = $this->getLockFile();\n\n if (!file_exists($lockFile)) {\n return false;\n }\n\n if ($this->getExpiry()) {\n if (filemtime($lockFile) > strtotime($this->getExpiry())) {\n return true;\n } else {\n $this->unlock();\n return false;\n }\n }\n\n return true;\n }", "public function isTimesheetLocked() {\n\t\n\t\t$obj_id = $this->timesheet_id;\n\t\n $query = \"SELECT `locked_on`\n FROM `timesheets`\n WHERE `timesheet_id` = :timesheet_id LIMIT 1\";\n\n $result = $this->db->select($query, array( 'timesheet_id' => $obj_id));\n\t\t$result = $result[0];\n\t\n\t\tif ($result['locked_on'] <> NULL) {\n\t\t\treturn $result['locked_on'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "function checklock($id) {\n global $conf;\n /* @var Input $INPUT */\n global $INPUT;\n\n $lock = wikiLockFN($id);\n\n //no lockfile\n if(!@file_exists($lock)) return false;\n\n //lockfile expired\n if((time() - filemtime($lock)) > $conf['locktime']) {\n @unlink($lock);\n return false;\n }\n\n //my own lock\n @list($ip, $session) = explode(\"\\n\", io_readFile($lock));\n if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) {\n return false;\n }\n\n return $ip;\n}", "function lw_logincheck() {\n\tglobal $settingsXml;\n\tif (crypt($_COOKIE['login'],$settingsXml->lwLoginKey) != $settingsXml->lwLoginKey) {\n\t\t\t$x = 0;\n\t}\n\telse {\n\t\t\t$x = 1;\n\t}\n\treturn $x;\n}", "public function unlocked(){\n\t\treturn $this->locked_at===null;\n\t}", "private function _isLocked(): bool {\n\t\t// Allow a hook to enable inter-server connection, later\n\t\tif (!$this->isMyServer()) {\n\t\t\treturn $this->server->invokeFilters(self::HOOK_IS_LOCKED, true, [$this]);\n\t\t}\n\t\tif ($this->isMyPID()) {\n\t\t\t// My process, so it's not locked\n\t\t\treturn false;\n\t\t}\n\t\t// Is the process running?\n\t\tif ($this->application->process->alive($this->pid)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->application->warning('Releasing lock from {server}:{pid} as process is dead', [\n\t\t\t'server' => $this->server->id, 'pid' => $this->pid,\n\t\t]);\n\t\t$this->release();\n\t\treturn false;\n\t}", "public function isLocked($attribute, $params) {\n $user = User::model()->findByAttributes(array($params['attributeName'] => $this->$attribute));\n if(!empty($user->is_locked)) \n $this->addError($attribute, 'Your account is locked after several sequential failed login attempts. Use \"contact\" to ask the unlock');\n }", "function thaw() {\r\n \r\n if ($this->module == 'user') {\r\n # $this->get_lock();\r\n return $this->that->ac_get_value(session_id(), $this->name);\r\n }\r\n \r\n return true;\r\n }", "public function getIsLocked() : bool\r\n {\r\n return $this->isLocked;\r\n }", "public function check_login() {\n return true;\n }", "public function isLocked($name) {\n\t\treturn isset($this->locked[$name]);\n\t}", "public function checkLogin(){\n\n\t\t$rval = false;\n\n\t\tif(isset($_SESSION['USER__ID']) && isset($_SESSION['LAST_ACTIVITY'])){\n\n\t\t\tif($_SESSION['LAST_ACTIVITY'] + $this->SESSION_THRESHOLD >= time()){\n\n\t\t\t\t## Update Session\n\t\t\t\t$_SESSION['LAST_ACTIVITY'] = time();\n\n\t\t\t\t## Return True\n\t\t\t\t$rval = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $rval;\n\t}", "private function keepLogin(){\n\t\treturn isset($_POST[self::$keep]);\n\t}", "public function isFreeLock( $name );", "public static function loginCheck(){\n\t\t\tstatic $check = null;\n\t\t\tif( is_null($check) ){\n\t\t\t\tif( isset( $_SESSION[S_USERID],$_SESSION[S_USERNAME],$_SESSION[S_STRING] ) ){\n\t\t\t\t\t$result = DB::select('users')\n\t\t\t\t\t\t->columns('password')\n\t\t\t\t\t\t->where( 'id', '=', $_SESSION[S_USERID] )\n\t\t\t\t\t\t->where( 'state', '=', 1 )\n\t\t\t\t\t\t->first();\n\t\t\t\t\tif( $result ){\n\t\t\t\t\t\tif( self::tokenGenerate($result['password']) === $_SESSION[S_STRING] ) $check = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $check;\n\t\t}", "protected function isLoginInProgress() {}", "protected function lockForWriting(Field $field) {\n\t\t$database = $this->wire('database');\n\t\t$table = $database->escapeTable($field->getTable());\n\t\t$locked = false;\n\t\ttry {\n\t\t\t// attempt lock if possible\n\t\t\tif($database->exec(\"LOCK TABLES `$table` WRITE\") !== false) {\n\t\t\t\t$this->lockedTable = true;\n\t\t\t\t$locked = true;\n\t\t\t}\n\t\t} catch(\\Exception $e) {\n\t\t\t// ignore\n\t\t}\n\t\t\n\t\treturn $locked;\n\t}", "public function getLocked();", "public function requiresLogin()\n {\n return ($this->policy & self::REQUIRE_LOGIN) == self::REQUIRE_LOGIN;\n }", "public function hasLogin()\n {\n return $this->login !== null;\n }", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "public static function GetLock() {\n if ( !self::WithPackageCompile() ) {\n return false;\n }\n\n if ( self::$CurrentOS == self::OsWindows ) {\n if ( !is_file( self::GetPackageCompiledFlagFile() . '.lock' )\n && touch( self::GetPackageCompiledFlagFile() . '.lock' ) )\n {\n return true;\n }\n\n return false;\n } else { // Unix with flock LOCK_NB\n $handle = fopen( self::GetPackageCompiledFlagFile(), 'r+');\n if ( flock ( $handle, LOCK_EX | LOCK_NB ) ) {\n self::$lockHandle = $handle;\n return true;\n }\n\n return false;\n }\n }", "public function isLogin()\n {\n return count(bwSession::get('login', array())) ? true : false;\n }", "public function getLockState() {\n\t\t$element = $this->rowElement->find(\"xpath\", $this->lockStateXpath);\n\t\tif ($element === null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $element->isVisible();\n\t}", "public function getLockEnabled()\n {\n return $this->lock_enabled;\n }", "public static function lock()\r\n\t\t{\r\n\t\t\t// Check the session parameter:\r\n\t\t\tif(!isset($_SESSION))\r\n\t\t\t\tsession_start();\r\n\t\t\r\n\t\t\tif(isset($_SESSION['key:ok']))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t$username = isset($_POST['username']) ? $_POST['username'] : false;\r\n\t\t\t$password = isset($_POST['password']) ? $_POST['password'] : false;\r\n\r\n\t\t\tif(!$username || !$password)\r\n\t\t\t\tself::renderPage();\r\n\r\n\t\t\t// Check if the users file is loaded - it probably isn't -\r\n\t\t\t// then load it if necessary, from the default location.\r\n\t\t\tif(!self::$users)\r\n\t\t\t\tself::load(require self::$defaultConfig);\r\n\r\n\t\t\t// Successful login - set session data and be done with it.\r\n\t\t\tif(self::auth($username, $password))\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['key:ok'] = true;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tself::renderPage('Uh oh...', '<span class=\"e\">Incorrect Credentials</span>');\r\n\t\t}", "public function userWantsToLogin() {\n\t\treturn isset($_POST[self::$login]) || \n\t\t\t isset($_COOKIE[self::$cookieName]);\n\t}", "public static function userLoginCheck() {\r\n $objSession = new LibSession();\r\n Logger::info(unserialize($objSession->get('user')));\r\n return $objSession->get('user')? TRUE : FALSE;\r\n }", "public function lock()\n\t{\n\t\t// attempts to place a 10 second lock the game row in the database via the `atomicLock` column\n\t\t// reloads the game object after becoming locked\n\t\t// times out after 30 seconds\n\n\t\tglobal $maindb;\n\t\tglobal $mysqli;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = null;\n $t_failTime = new DateTime('now');\n $t_failTime->add(new DateInterval(\"PT30S\"));\n\n while (!is_array($a_games) || count($a_games) == 0) {\n $t_currTime = new DateTime('now');\n $t_lockTime = new DateTime('now');\n $t_lockTime->add(new DateInterval(\"PT30S\"));\n $s_currTime = getStringFromDateTime($t_currTime);\n $s_lockTime = getStringFromDateTime($t_lockTime);\n\n if ($t_currTime >= $t_failTime) {\n return FALSE;\n }\n\n $b_success = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='{$s_lockTime}' where `roomCode`='[roomCode]' and `atomicLock` <= '{$s_currTime}'\", $a_params);\n if ($b_success && $mysqli->affected_rows > 0) {\n \tbreak;\n }\n\n // don't hit the mysql server too hard\n sleep(1);\n }\n\n self::loadByRoomCode($this->getRoomCode(), TRUE, $this);\n return TRUE;\n\t}", "static function isLogin($value) {\n \n }", "public function canLogin(): bool\n {\n return in_array($this->getStatus(), [self::STATUS_ACTIVE, self::STATUS_INACTIVE, self::STATUS_NEW], true);\n }", "public function checkPassword()\n {\n $module = $this->params('module');\n $password = $this->params('password');\n // Get config\n $config = Pi::service('registry')->config->read($module);\n // Check password\n if ($config['json_check_password']) {\n if ($config['json_password'] == $password) {\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }", "public function isLocked()\n {\n return (boolean) $this->locked;\n }" ]
[ "0.6783351", "0.6783351", "0.6783351", "0.6783351", "0.6783351", "0.67607975", "0.6640119", "0.6640119", "0.6542612", "0.6524497", "0.64870054", "0.63932043", "0.63886976", "0.63859797", "0.63797075", "0.6330309", "0.63289243", "0.63216656", "0.62947565", "0.62850827", "0.62375855", "0.62021697", "0.61862123", "0.61420316", "0.61283344", "0.6080384", "0.6058557", "0.6055381", "0.6054807", "0.6035694", "0.60170436", "0.6004996", "0.5984072", "0.59818214", "0.597916", "0.59667075", "0.5966614", "0.5966614", "0.595705", "0.59537685", "0.59293944", "0.5927154", "0.592587", "0.591838", "0.5917827", "0.5917273", "0.5902724", "0.5896675", "0.58880365", "0.58523214", "0.5850304", "0.58486885", "0.58473927", "0.58468336", "0.5844529", "0.5814949", "0.5813289", "0.5811858", "0.58076656", "0.5806248", "0.57803804", "0.57654786", "0.57570934", "0.57500696", "0.57240087", "0.5718625", "0.5716907", "0.5713958", "0.5702631", "0.56935686", "0.56846714", "0.5684081", "0.56801283", "0.5675529", "0.56727356", "0.56683964", "0.5663847", "0.5661672", "0.56591415", "0.56413376", "0.5627372", "0.5624162", "0.56188446", "0.5618384", "0.56144106", "0.5607423", "0.56055504", "0.5605217", "0.56042963", "0.5598343", "0.559791", "0.5597429", "0.55926436", "0.5574225", "0.5571957", "0.5569211", "0.5569182", "0.55682135", "0.55623615", "0.5561772" ]
0.7803882
0
Clears the login lock record of an application, doesn't touch the application field
Очищает запись блокировки входа для приложения, не затрагивая поле приложения
public function clearLoginLock($application_id) { $loaded = $this->login_lock->loadBy(array('application_id' => $application_id)); if ($loaded) { $this->login_lock->counter = 0; $this->login_lock->save(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unTempLocked() {\r\n if ($this->Session->check('Login.WrongNum') && $this->Session->check('Login.id')) {\r\n $this->unlockUser($this->Session->read('Login.id'));\r\n }\r\n $this->Session->delete('Login');\r\n }", "public static function unauthenticate(){\n\t\t// delete current user auth credentials from session\n\t\tif (isset($_SESSION['applications_loggedin'][Request::get_application()]))\n\t\t\tunset($_SESSION['applications_loggedin'][Request::get_application()]);\n\t}", "function SQLLock_ClearAll()\n {\n $this->Exec4DSQL (\"SQLLock_ClearAll\", \"\");\n }", "public function clearLoginAttempts();", "public function unlock()\n\t{\n\n\t\tglobal $maindb;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='0000-00-00 00:00:00' where `roomCode`='[roomCode]'\", $a_params);\n\t}", "private static function deleteRecordLocks() {\n\t\t$locker = new RecordLocker\\User();\n\t\t$locker->deleteLocks();\n\t}", "function clearFileLock()\n{\n ftruncate($GLOBALS['lock_file'], 0);\n flock($GLOBALS['lock_file'], LOCK_UN);\n}", "public function removePersistentLogin() {\n\t\tif ($this->cookie_token) {\n\t\t\t$client_hash = $this->hashToken($this->cookie_token);\n\t\t\t$this->removeHash($client_hash);\n\t\t}\n\n\t\t$this->setCookie(\"\");\n\t\t$this->setSession(\"\");\n\t}", "public static function lock_unlog() {\n if(isset($GLOBALS[\"CURRENT_USER\"])) {\n global $CURRENT_USER;\n if($CURRENT_USER != NULL) {\n PHPEasyTemplate::e_403();\n }\n }\n }", "function removeLock() ;", "public function clearLoginAttempts()\n {\n if ($this->getLoginAttempts() == 0 or $this->suspended)\n {\n return;\n }\n\n $this->attempts = 0;\n $this->last_attempt_at = null;\n $this->suspended = false;\n $this->suspended_at = null;\n $this->save();\n }", "public function releaseLock(){\n $this->editLock()->delete();\n }", "public function clearLoginAttempts()\n {\n // If our login attempts is already at zero\n // we do not need to do anything. Additionally,\n // if we are suspended, we are not going to do\n // anything either as clearing login attempts\n // makes us unsuspended. We need to manually\n // call unsuspend() in order to unsuspend.\n if ($this->getLoginAttempts() == 0 or $this->is_suspended) {\n return;\n }\n\n $this->attempts = 0;\n $this->last_attempt_at = null;\n $this->is_suspended = false;\n $this->suspended_at = null;\n $this->save();\n }", "public function clear()\n\t{\n\t\t$this->getAuth()->clearIdentity();\n\t}", "public function clear()\n {\n\n $this->getAuth()->clearIdentity();\n }", "public function clearAuthentication()\n {\n unset($this->session->token);\n unset($this->session->token_expire);\n unset($this->session->refresh_token);\n $this->session->getManager()->getStorage()->clear(get_class($this));\n }", "public function reset()\n {\n // Kills the whole user cache\n apc_clear_cache( \"user\" );\n }", "public function eraseCredentials()\n {\n $this->password = \"\";\n }", "public function clearAuth()\n {\n $this->_registry->clearAuth(true);\n }", "#[Cron(schedule: Temporal::UNIT_HOUR, scope: Cron::SCOPE_SERVER)]\n\tpublic static function deleteUnusedLocks(Application $application): void {\n\t\tself::deleteUnused($application);\n\t}", "function KillLoginInfo ()\r\n\t{\r\n\t\t\r\n\t\tif (isset($_SESSION['user_id']))\r\n\t\t{\t\t\t\r\n\t\t\t//--------Record Last Log-OUT to db:\t\t\r\n\t\t\t$mysql_err_msg = 'Recording User Account Last Log-in';\t\r\n\t\t\t$sql_statement = 'UPDATE 1_user_logins SET' \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.' last_logout = \"'.date(\"Y-m-d H:i:s\").'\"'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.' WHERE user_id = \"'.$_SESSION['user_id'].'\"'\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t;\r\n\r\n\t\t\tReadDB ($sql_statement, $mysql_err_msg);\t//\t'Use ReadDB' instead of 'UpdateDB' to stop db update recording when use logs in or out\t\r\n\t\t}\r\n\r\n\t\t\t\t\t\t\r\n\t\tunset ($_SESSION['CMS_authorized']);\r\n\t\tunset ($_SESSION['CMS_mode']);\r\n\t\tunset($_SESSION['authorized']);\r\n\t\tunset($_SESSION['load_admin']);\t\t\r\n\t\tunset($_SESSION['user_id']);\r\n\t\tunset($_SESSION['access']);\r\n\t\tunset($_SESSION['expire_time']);\t\r\n\t\r\n\t\t//\tIf you log out, kill log-in key so you cant back-up and refresh browser to login again\r\n\t\tunset($_SESSION['login_key']);\t\t\r\n\t}", "function exponent_sessions_clearAllSessionData(){\n\tglobal $db;\n\t$db->delete('sessionticket',\"1\");\n\tunset($_SESSION[SYS_SESSION_KEY]);\n}", "public function logout() {\r\n $this->m_auth->clearIdentity();\r\n }", "public function unlock_update() {\n\t\t\tdelete_transient( 'dfm_lt_' . $this->key );\n\t\t}", "public static function unlockDatabase()\n {\n @rmdir(LOCK_DIRECTORY);\n }", "public function unsetLoggedInAccount() {\n unset($this->loggedInAccount);\n $this->sessionStorage->deleteEntry(\\Login\\ENV::SESSION_CURRENT_USER_ID);\n }", "public function clear()\n {\n foreach ($this->linkedinKeys as $sessionKey) {\n $key = $this->getKey() . $sessionKey;\n if (isset($_SESSION[$key])) {\n unset ($_SESSION[$key]);\n }\n }\n }", "public function setLoginLock($application_id)\n\t{\n\t\t$application_id = (int)$application_id;\n\t\t$application = ECash::getApplicationByID($application_id);\n\n\t\t$company_model = $this->factory->getModel('Company');\n\t\t$company_model->loadBy(array('company_id' => $application->getCompanyId()));\n\n\t\tif (method_exists($factory, \"getMasterDb\"))\n\t\t{\n\t\t\t$db = $this->factory->getMasterDb();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$db = $this->factory->getDB();\n\t\t}\n\t\t\t\n\t\t$business_rules = new ECash_BusinessRules($db);\n\t\t$settings = $business_rules->Get_Rule_Set_Component_Parm_Values($company_model->name_short, 'login_lock');\n\t\t$rate = $settings['max_attempt'];\n\n\t\t$loaded = $this->login_lock->loadBy(array('application_id' => $application_id));\n\t\tif (!$loaded)\n\t\t{\n\t\t\t$this->login_lock->date_created = date('Y-m-d H:i:s');\n\t\t\t$this->login_lock->application_id = $application_id;\n\t\t\t$this->login_lock->counter = 0;\n\t\t}\n\n\t\t$this->login_lock->counter++;\n\t\t$this->login_lock->save();\n\n\t\tif ($this->login_lock->counter >= $rate)\n\t\t{\n\t\t\t$olp_agent = $this->factory->getModel('Agent');\n\t\t\t$olp_agent->loadBy(array('login' => 'olp'));\n\t\t\t$olp_agent_id = $olp_agent->agent_id;\n\t\t\t$application->getContactFlags()->set($olp_agent_id, 'login_lock', 'application_id');\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function removeLock() {}", "public function unlock()\n\t{\n\t\tif (file_exists(PHPFOX_DIR_CACHE . 'cache.lock'))\n\t\t{\n\t\t\tunlink(PHPFOX_DIR_CACHE . 'cache.lock');\n\t\t}\n\t}", "public static function Logout() {\n\t\t\t$_SESSION['intLoginId'] = null;\n\t\t\tunset($_SESSION['intLoginId']);\n\t\t\tQApplication::$Login = null;\n\t\t\tQApplication::$LoginId = null;\n\t\t\tQApplication::Redirect('/index.php/1');\n\t\t}", "public function eraseCredentials()\n {\n// $this->plainPassword = null;\n }", "public function clear()\n\t{\n\t\t$response = $this->Checkfront->get('booking/session/clear');\n\t\t$this->Checkfront->session_clear();\n\t}", "private static function clearAuthenticationState()\n\t{\n\t\tSession::remove(self::$_authTokenName);\n\t\tSession::remove(self::$_authUserName);\n\n\t\tself::$_currentUser = null;\n\t\tself::$_currentUserRoles = null;\n\t}", "protected function clean()\n\t{\n\t\ttouch(PATH_site . self::LOCK_FILE, time() - 3600);\n\t}", "public function clearUserCache() {\n \t$session = SessionWrapper::getInstance(); \n \t\n \t// clear the acl instance for the user\n $aclkey = \"acl\".$session->getVar('userid'); \n $cache = Zend_Registry::get('cache');\n $cache->remove($aclkey); \n }", "function pClear()\n\t{\n\t\t$this->userid = 0;\n\t\t$this->username = '';\n\t\t$this->permanent = false;\n\t\t$this->lastlogin = '';\n\t\t$this->sessionid = '';\n\t\t$this->admin = false;\n\t\t$this->verified = true;\n\n\t\t$this->pStoreCookie();\n\t}", "public function logoff() {}", "public function logoff() {}", "function _deleteLoginAttempts()\n\t{\n\t\tif($this->login_limit)\n\t\t{\n\t\t\t$ip = env('REMOTE_ADDR');\n\t\t\t\n\t\t\tloadModel($this->login_attempts_model);\n\t\t\t$Model = & new $this->login_attempts_model;\n\t\t\t\n\t\t\t$Model->del($ip);\n\t\t\t\n\t\t\tif($this->cookie_active)\n\t\t\t{\n\t\t\t\tsetcookie('othAuth.login_attempts','',time() - 31536000,'/');\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function deauthenticate()\n\t{\n\t\t$session_id = $this->session_start();\n\t\t\n\t\tif (!!$session_id && strlen($session_id) > 0)\n\t\t{\n\t\t\tConnection::query(sprintf(\"UPDATE users SET session = NULL WHERE session = '%s'\",\n\t\t\t\tConnection::escape($session_id)\n\t\t\t));\n\t\t\t\n\t\t\tif (!!Connection::query_error_clear())\n\t\t\t{\n\t\t\t\texit(\"Application failed to end session.\");\n\t\t\t}\n\n\t\t\t$this->session_end();\n\t\t}\n\t}", "function SQLLock_UnlockByUser()\n {\n //echo $this->UsrKeys->UserID;\n $this->Exec4DSQL (\"SQLLock_UnlockByUser\", $this->UsrKeys->UserID);\n }", "public function clear()\n\t{\n\t\t$destroy = $this->getSessionManager()\n ->getSaveHandler()\n ->destroy($this->getSessionId()); \n\t}", "public function eraseCredentials()\n {\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // $this->plainPassword = null;\n }", "public function clearLoginAttemptsIfAllowed()\n {\n $lastAttempt = clone $this->last_attempt_at;\n\n $suspensionTime = static::$suspensionTime;\n $clearAttemptsAt = $lastAttempt->modify(\"+{$suspensionTime} minutes\");\n $now = new Carbon;\n\n if ($clearAttemptsAt <= $now) {\n $this->attempts = 0;\n $this->save();\n }\n\n unset($lastAttempt, $clearAttemptsAt, $now);\n }", "public function logout() {\n self::$zaAuth->clearIdentity();\n }", "public function eraseCredentials(): void\n {\n $this->password = '';\n }", "public function clearFailedLogin(){\n\n\t global $db;\n\n\t #clear count.\n $db->SQL = \"UPDATE ebb_users SET failed_attempts='0' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "public function wipe_auth($name) {\n global $CFG, $USER, $DB, $SESSION;\n\n // search for things in the SESSION first\n $DB->delete_records('oauth_access_token', array('siteid' => $this->site->id, 'userid' => $USER->id));\n $this->request_token = NULL;\n $this->access_token = NULL;\n if (isset($SESSION->local_oauth)) {\n if (isset($SESSION->local_oauth[$name])) {\n unset($SESSION->local_oauth[$name]);\n }\n }\n }", "public function eraseCredentials(): void\n {\n // $this->plainPassword = null;\n }", "public function logout()\n {\n Zend_Auth::getInstance()->clearIdentity();\n }", "public function logout() {\n \t$s = Session::getInstance();\n \tunset($s->user_id);\n $this->setAuthed(false);\n }", "public function checkLoginLock($application_id)\n\t{\n\t\t$field_id = 8 ;//'login_lock';\n\t\t\t\n\t\t$application_fields = $this->factory->getModel('ApplicationField');\n\t\t$rows = $application_fields->loadAllBy(array(\"table_row_id\" => $application_id, \"application_field_attribute_id\" => $field_id));\n\t\tif (!$rows || (count($rows) == 0)){\n\t\t\treturn \"pass\";\n\t\t} else {\n\t\t\treturn \"locked\";\n\t\t}\n\t}", "function authClearOldLogs()\n{\n if (CWLIB_fileExists(CWLIB_LOG_FILE_PATH) && (CWLIB_LOG_FILE_MAX_SIZE <= filesize(CWLIB_LOG_FILE_PATH))) {\n CWLIB_filePutContents(CWLIB_LOG_FILE_PATH, \"\");\n }\n}", "public function resetLoginAttempts();", "public static function reset() {\n\n static::$user = null;\n\n $expires = c::get( 'auth.expires', 60 * 60 * 24 );\n cookie::set( 'auth', str::random(), $expires );\n\n s::restart();\n\n }", "public function reset()\n {\n if(! auth()->user()->id == 1){\n flash('Bad request');\n back();\n }\n \n // Check the compitition is closed - it needs to be\n if (strtolower($this->setting('competition_status')) !== 'closed') {\n flash('Cannot reset the application unless the competition status is \"closed\"');\n back();\n }\n\n // remove all photos and Images\n DB::delete('delete from photos');\n Utils::trashOrphanPhotos();\n\n // remove all Users - except admin\n DB::delete('delete from users where id > 1');\n\n // remove all Applications\n DB::delete('delete from applications');\n\n flash('Application reset completed');\n return back();\n }", "public function logout()\n {\n try {\n Mage::getModel('core/cookie')->delete('sailthru_hid');\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }", "public function clear_active_sessions() {\n $user_id = $this->guard()->User()->id;\n// Sessions::where('user_id', $user_id)->delete();\n Sessions::where(['user_id' => $user_id, 'user_type' => 'D'])->delete();\n }", "public function reset()\n {\n $this->session->remove(self::KEY);\n }", "function sw_clear_tokens(){\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'sw_creds';\n\t\t$wpdb->query(\"TRUNCATE $table_name\");\n\t}", "public function unsetApplicationId(): void\n {\n $this->applicationId = [];\n }", "public function reset()\n {\n $this->isAuthenticated = $this->user = null;\n }", "public static function logOut()\n {\n $_SESSION['id'] = null;\n $_SESSION['role_id'] = null;\n }", "public function eraseCredentials()\n\t{\n\t\t$this->plainPassword = null;\n\t}", "public function clearAll() {\n\t\t$this->authTime = -1;\n\t\t$this->touchTime = -1;\n\t\t$this->lastTouchTime = -1;\n\t}", "function closeAuth(){\n unset($this->DB);\n unset($this->Crypto);\n }", "function unlock()\n {\n \t$this->lock = 0;\n }", "public function eraseCredentials(): void\n {\n $this->plainPassword = NULL;\n }", "public static function Logout() {\n\t\t\t$_SESSION['intLoginId'] = null;\n\t\t\tunset($_SESSION['intLoginId']);\n\t\t\tQApplication::$Login = null;\n\t\t\tQApplication::$LoginId = null;\n\t\t\tQApplication::Redirect('/foodie/index.php/1');\n\t\t}", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "function unlock($id){\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('auth/login', 'refresh');\n\t\t}\n\t\t// redirect them to the Applications\n\t\t$user = $this->ion_auth->user()->row();\n\t\t$this->application_model->unlock_application($id,$user->id);\n\t\t$this->session->set_flashdata('message', 'Application UnLocked Successfully');\n\t\t$this->session->set_flashdata('messagetype',\"alert-success\" );\n\t\tredirect($this->agent->referrer(), 'refresh');\n\t}", "public function eraseCredentials()\n {\n //Implement eraseCredentials() method.\n }", "function logOff() {\n\n\t\tlogger()->addLog(\"Logoff: user_id:\".session()->value(\"user_id\"));\n\t\t//$this->user_id = \"\";\n\n\t\tsession()->reset(\"user_id\");\n\t\tsession()->reset(\"user_group_id\");\n\t\t// session()->reset(\"user_group_permissions\");\n\n\t\t$dev = session()->value(\"dev\");\n\t\t$segment = session()->value(\"segment\");\n\n\n\t\t// Delete cart reference cookie\n\t\tsetcookie(\"cart_reference\", \"\", time() - 3600, \"/\");\n\t\t\n\t\t// Reset session (includes destroy, start and regenerate)\n\t\tsession()->reset();\n\n\t\tsecurity()->resetRuntimeValues();\n\n\t\t// Remember dev and segment even after logout\n\t\tsession()->value(\"dev\", $dev);\n\t\tsession()->value(\"segment\", $segment);\n\n\t\theader(\"Location: /\");\n\t\texit();\n\t}", "public function eraseCredentials() {\n\n\t}", "function shutdown() { Preferences::set('dbLock', 'null'); _shutdown(); }", "public function clearAllLocks()\n {\n foreach ($this->adapters as $adapter) {\n foreach ($adapter->keys('*') as $key) {\n $adapter->del($key);\n }\n }\n }", "public function invalidate(){\n\t\t$this->data = array();\n\t\t$this->redirectUriAfterLogin = '';\n\t\t$this->user = null;\n\t}", "public static function logOut(){\n self::$_currentUser = null;\n unset($_SESSION[self::SESSION_USER_ID_KEY]);\n }", "private function clearCache()\n {\n $this->env->log(\"Clearing application cache.\");\n\n $this->env->execute(\n \"php ./bin/magento cache:flush {$this->verbosityLevel}\"\n );\n }", "public function logout() {\n $this->_user = NULL;\n }", "function resetAuthFields(){\n\t\tmcookie(\"LOGIN_ID\");\n\t\tdomaincookie(\"sharedUserId\");\t\t\t// Unset domainCookie set for Magnify SSO -------\n\t\tdomaincookie(\"sharedAdsFreeFlag\");\n\t\tif($this->isAuthed){\n\t\t\t$this->login_sessid=\"\";\n\t\t\t$this->login_lastactive=0;\n\t\t\t$upd=array(login_sessid=>\"\",login_lastactive=>0);\n\t\t\t$cond=array(id=>$this->id);\n\t\t\tupdate_query(\"subscription\",$upd,$cond);\n\t\t}\n\t}", "public static function reset()\n {\n // TODO: Generate a new secret number and overwrite the previous one\n session_unset();\n session_destroy();\n }", "function unlock() ;", "protected function performLogoff() {}", "protected function performLogoff() {}", "public function logout()\n {\n //destroy token\n if ($this->check()) {\n $this->refreshKey->delete();\n $this->refreshKey = null;\n }\n $this->user = NULL;\n }", "private function clear_login_attempts($login)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'fx_auth')) {\n\t\t\t$this->ci->load->model('fx_auth/login_attempts');\n\t\t\t$this->ci->login_attempts->clear_attempts(\n\t\t\t\t\t$this->ci->input->ip_address(),\n\t\t\t\t\t$login,\n\t\t\t\t\t$this->ci->config->item('login_attempt_expire', 'fx_auth'));\n\t\t}\n\t}", "public function clear()\n\t{\n\t\tegw_cache::flush(self::LEVEL, self::APP);\n\t}", "public function eraseCredentials()\n {\n return;\n }" ]
[ "0.67850626", "0.6695444", "0.6464298", "0.6318517", "0.6287144", "0.62698746", "0.6249629", "0.62263584", "0.6145014", "0.61185586", "0.6061244", "0.6054318", "0.60508054", "0.6010892", "0.5983713", "0.590838", "0.58712035", "0.5862327", "0.5851983", "0.5850554", "0.58400613", "0.58328396", "0.58281803", "0.5824444", "0.5818147", "0.5813441", "0.58079475", "0.57899415", "0.57849205", "0.5763769", "0.5758228", "0.57553095", "0.5745732", "0.5742939", "0.57411957", "0.57368314", "0.57255006", "0.57211447", "0.57211447", "0.5719934", "0.57158715", "0.5711831", "0.57012886", "0.5700621", "0.5700621", "0.5700621", "0.5700621", "0.5700034", "0.56872106", "0.56869286", "0.5659555", "0.5656393", "0.5656393", "0.562902", "0.562902", "0.56275344", "0.5627173", "0.56223017", "0.56197697", "0.56080556", "0.56060535", "0.56046176", "0.55949104", "0.55841464", "0.5579657", "0.55794907", "0.55678713", "0.55626667", "0.5561666", "0.5560624", "0.5557945", "0.5556701", "0.5551994", "0.5551582", "0.555", "0.5547711", "0.5536008", "0.55333894", "0.55333894", "0.55333894", "0.55333894", "0.55317575", "0.5530477", "0.5530413", "0.55141616", "0.55124724", "0.5507705", "0.5502997", "0.54955363", "0.54935515", "0.5490176", "0.54886085", "0.548674", "0.5480722", "0.5475544", "0.54746884", "0.5471822", "0.54708904", "0.5467941", "0.54678863" ]
0.7147676
0
Sets the login lock record of an application, and increments it. If it is more than the value found in the business rule, set the application field
Устанавливает запись блокировки входа для приложения и увеличивает её. Если она превышает значение, найденное в бизнес-правиле, устанавливает поле приложения
public function setLoginLock($application_id) { $application_id = (int)$application_id; $application = ECash::getApplicationByID($application_id); $company_model = $this->factory->getModel('Company'); $company_model->loadBy(array('company_id' => $application->getCompanyId())); if (method_exists($factory, "getMasterDb")) { $db = $this->factory->getMasterDb(); } else { $db = $this->factory->getDB(); } $business_rules = new ECash_BusinessRules($db); $settings = $business_rules->Get_Rule_Set_Component_Parm_Values($company_model->name_short, 'login_lock'); $rate = $settings['max_attempt']; $loaded = $this->login_lock->loadBy(array('application_id' => $application_id)); if (!$loaded) { $this->login_lock->date_created = date('Y-m-d H:i:s'); $this->login_lock->application_id = $application_id; $this->login_lock->counter = 0; } $this->login_lock->counter++; $this->login_lock->save(); if ($this->login_lock->counter >= $rate) { $olp_agent = $this->factory->getModel('Agent'); $olp_agent->loadBy(array('login' => 'olp')); $olp_agent_id = $olp_agent->agent_id; $application->getContactFlags()->set($olp_agent_id, 'login_lock', 'application_id'); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkLoginLock($application_id)\n\t{\n\t\t$field_id = 8 ;//'login_lock';\n\t\t\t\n\t\t$application_fields = $this->factory->getModel('ApplicationField');\n\t\t$rows = $application_fields->loadAllBy(array(\"table_row_id\" => $application_id, \"application_field_attribute_id\" => $field_id));\n\t\tif (!$rows || (count($rows) == 0)){\n\t\t\treturn \"pass\";\n\t\t} else {\n\t\t\treturn \"locked\";\n\t\t}\n\t}", "public function addLoginAttempt()\n {\n $this->attempts++;\n $this->last_attempt_at = $this->freshTimeStamp();\n\n if ($this->getLoginAttempts() >= static::$attemptLimit)\n {\n $this->suspend();\n }\n else\n {\n $this->save();\n }\n }", "public function addLoginAttempt()\n {\n $this->attempts++;\n $this->last_attempt_at = $this->freshTimestamp();\n\n if ($this->getLoginAttempts() >= static::$attemptLimit) {\n $this->suspend();\n }\n else {\n $this->save();\n }\n }", "public function increaseLoginAttempts() {\n $date = date(\"Y-m-d\");\n $user_ip = $_SERVER['REMOTE_ADDR'];\n $table = 'wi_login_attempts';\n \n //get current number of attempts from this ip address\n $loginAttempts = $this->_getLoginAttempts();\n \n //if they are greater than 0, update the value\n //if not, insert new row\n if($loginAttempts > 0)\n $this->WIdb->update (\n $table, \n array( \"attempt_number\" => $loginAttempts + 1 ), \n \"`ip_addr` = :ip_addr AND `date` = :d\", \n array( \"ip_addr\" => $user_ip, \"d\" => $date)\n );\n else\n $this->WIdb->insert($table, array(\n \"ip_addr\" => $user_ip,\n \"date\" => $date\n ));\n }", "public function incrementLoginAttempts();", "public function lock() {\n $this->locktime = date('Y-m-d H:i:s',time());\n $this->lockuser = \\Yii::$app->user->identity->id;\n \\Yii::$app->user->identity->updateLastActive();\n return $this->save();\n }", "public function setPasswordMinutesOfInactivityBeforeLock(?int $value): void {\n $this->getBackingStore()->set('passwordMinutesOfInactivityBeforeLock', $value);\n }", "private static function _create_lock(Application $application, string $code): self {\n\t\t$em = $application->entityManager();\n\t\t$lock = $em->getRepository(Lock::class)->findBy(['code' => $code]);\n\t\tif ($lock) {\n\t\t\tassert($lock instanceof self);\n\t\t\t$lock->used = Timestamp::now();\n\t\t\treturn $lock;\n\t\t}\n\t\t$lock = new Lock($application);\n\t\t$lock->code = $code;\n\t\t$lock->used = Timestamp::now();\n\t\t$em->persist($lock);\n\t\treturn $lock;\n\t}", "function increase_attempt($ip_address, $login)\n {\n $la = new LoginAttempts();\n $la->ip_address = $ip_address;\n $la->login = $login;\n $la->save();\n \n //$this->db->insert(self::TABLE, array('ip_address' => $ip_address, 'login' => $login));\n }", "private function increase_login_attempt($login)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'fx_auth')) {\n\t\t\tif (!$this->is_max_login_attempts_exceeded($login)) {\n\t\t\t\t$this->ci->load->model('fx_auth/login_attempts');\n\t\t\t\t$this->ci->login_attempts->increase_attempt($this->ci->input->ip_address(), $login);\n\t\t\t}\n\t\t}\n\t}", "function update_failed_login_attempts()\n\t{\n\n\t\t$ACCOUNT = new ACCOUNT();\n $aid = $ACCOUNT->getId($this->login); \n\n //found a valid account, record attempt failure\n if ($aid)\n {\n \n \t$sql = \"UPDATE auth_accountperm SET failed_logins=(failed_logins+1) WHERE account_id='$aid'\";\n \t$this->DB->query($sql);\n\n \tif (defined(\"ENABLE_ACCOUNT_LOCKOUT\")) $this->lock_account($aid);\t\n\n\t\t}\n\t\t\n\t}", "function lock($id){\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('auth/login', 'refresh');\n\t\t}\n\t\t// redirect them to the Applications\n\t\t$user = $this->ion_auth->user()->row();\n\t\t$this->application_model->lock_application($id,$user->id);\n\t\t$this->session->set_flashdata('message', 'Application Locked Successfully');\n\t\t$this->session->set_flashdata('messagetype',\"alert-success\" );\n\t\tredirect($this->agent->referrer(), 'refresh');\n\t}", "public function setFailedLogin(){\n\n\t global $db;\n\n\t #get new count.\n\t\t$newCount = $this->getFailedLoginCt();\n\t\t$incrementFailedCt = $newCount['failed_attempts'] + 1;\n\n\t #get the count from the user table.\n $db->SQL = \"UPDATE ebb_users SET failed_attempts='$incrementFailedCt' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "public function setPasswordMinutesOfInactivityBeforeLock($val)\n {\n $this->_propDict[\"passwordMinutesOfInactivityBeforeLock\"] = intval($val);\n return $this;\n }", "function lock_account($aid)\n\t{\n\n if ($aid)\n {\n \n // verify that the number of login attempts exceeds the allowed number\n $sql=\"SELECT failed_logins FROM auth_accountperm WHERE account_id='$aid';\";\n $failLogin = $this->DB->single($sql);\n\n if ( $failLogin[\"failed_logins\"] >= ACCOUNT_LOCKOUT_ATTEMPTS )\n {\n\t\n // disable account and timestamp\n $sql = \"UPDATE auth_accountperm SET failed_logins_locked=TRUE,enable=FALSE,locked_time=now() WHERE account_id='$aid';\";\n $this->DB->query($sql);\n \n }\n\n }\n \n\t}", "private function _update_reg_id_count() {\r\n\t\t$reg_count = (int) get_option( $this->_session['registration_id'] . '_breakout_count' );\r\n\t\t$new_count = $reg_count ? $reg_count + 1: 1;\r\n\t\tupdate_option( $this->_session['registration_id'] . '_breakout_count', $new_count );\r\n\t}", "public function locked() {\n\t\t$this->layout = 'lock';\n\t\t$this->set('title_for_layout', __('Account Locked', true));\n\t\t$this->set('page_heading', __('Account Locked', true));\n\t\t$this->setJsVar('referer', $this->referer());\n\n\t}", "public function lock_update() {\n\t\t\tset_transient( 'dfm_lt_' . $this->key , $this->lock_key, 400 );\n\t\t}", "public function update_login_attempts($ip_address = NULL)\n {\n if (is_null($ip_address))\n $ip_address = $this->ip_address;\n \n $a = new Attempt();\n $a->where('ip_address', $ip_address)->get();\n \n if ( $a->exists() )\n {\n $current_time = time();\n $created = strtotime($a->created);\n \n // Minutes comparison\n $minutes = floor($current_time - $created / 60);\n \n\t // If current time elapsed between creation is greater than the attempts, reset\n if (($current_time - $created) > $this->config['auth.login_attempts_expiry'])\n {\n $this->reset_login_attempts($ip_address);\n // add the first attempt after reset them\n $a = $a->get_copy();\n $a->ip_address = $ip_address;\n\t $a->attempts = 1;\n\t $a->save();\n }\n else{\n\t // Increment new attempts\n\t $a->attempts += 1;\n\t $a->save();\n }\n }\n else\n {\n $a->ip_address = $ip_address;\n $a->attempts = 1;\n $a->save();\n }\n }", "public function update_login_counter()\n\t{\n\t\t$counter = 1;\n\n\t\t$this->db->select('option_value');\n\t\t$this->db->where('option_title', 'LOGIN_CNT');\n\t\t$row = $this->db->get(DBOPT, 1)->row();\n\t\t$user = $this->db->last_query();\n\t\techo 'q='.$user;exit;\n\t\t\n\t\t$counter = intval($row->option_value)+1;\n\t\t\n\t\tif($counter > 1000)\n\t\t{\n\t\t\t$this->dbutil->optimize_database();\n\t\t}\n\t\telse if($counter > 2000)\n\t\t{\n\t\t\t$this->db->set('option_value', 1);\t\n\t\t\t$this->db->where('option_title', 'LOGIN_CNT');\n\t\t\t$this->db->update(DBOPT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//update counter\n\t\t\t$this->db->set('option_value', $counter);\t\n\t\t\t$this->db->where('option_title', 'LOGIN_CNT');\n\t\t\t$this->db->update(DBOPT);\n\t\t}\n\t}", "public function setAutoIncAccID(){\r\n\t\t$clientAc = new Database();\r\n\t\t$clientAc->connect();\r\n\t\t$queryMax = \"SELECT MAX(clientaccountid)clientaccountid\r\n\t\t FROM `clientaccount`\";\r\n\r\n\t\t$clientAc->query($queryMax);\r\n\t\t$clientAc->close();\r\n\t\t$newAccNum=$clientAc->queryFirstResult[clientaccountid];\r\n\t\t$this->autoIncAccID = $newAccNum+1;\r\n\t}", "public function lockLab() {\n\t$this -> lock = 1;\n\t$rc = $this -> save ();\n\treturn $rc;\n\t}", "public static function deleteDangling(Application $application): int {\n\t\t$em = $application->entityManager();\n\t\t$query = $em->createQuery('SELECT DISTINCT server FROM ' . Lock::class);\n\t\t$serverIDs = [];\n\t\tforeach ($query->toIterable('server') as $server) {\n\t\t\t$serverIDs[] = $server;\n\t\t}\n\t\t// Deleting unlinked locks\n\t\t$rowCount = 0;\n\t\tif (count($serverIDs) === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t$ex = Criteria::expr();\n\t\t$criteria = Criteria::create()->where($ex->notIn('server', $serverIDs));\n\t\tforeach ($em->getRepository(Lock::class)->findBy([$criteria]) as $lock) {\n\t\t\t/* @var $lock self */\n\t\t\tself::releaseLock($lock, implode(',', $serverIDs));\n\t\t\t++$rowCount;\n\t\t}\n\t\treturn $rowCount;\n\t}", "public function clearLoginLock($application_id)\n\t{\n\t\t$loaded = $this->login_lock->loadBy(array('application_id' => $application_id));\n\t\tif ($loaded) {\n\t\t\t$this->login_lock->counter = 0;\n\t\t\t$this->login_lock->save();\n\t\t}\n\t\treturn true;\n\t}", "public function incrementLoginAttempts(Request $request)\n {\n app(RateLimiter::class)->hit(\n $this->getThrottleKey($request)\n );\n }", "public function lock()\n\t{\n\t\t// attempts to place a 10 second lock the game row in the database via the `atomicLock` column\n\t\t// reloads the game object after becoming locked\n\t\t// times out after 30 seconds\n\n\t\tglobal $maindb;\n\t\tglobal $mysqli;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = null;\n $t_failTime = new DateTime('now');\n $t_failTime->add(new DateInterval(\"PT30S\"));\n\n while (!is_array($a_games) || count($a_games) == 0) {\n $t_currTime = new DateTime('now');\n $t_lockTime = new DateTime('now');\n $t_lockTime->add(new DateInterval(\"PT30S\"));\n $s_currTime = getStringFromDateTime($t_currTime);\n $s_lockTime = getStringFromDateTime($t_lockTime);\n\n if ($t_currTime >= $t_failTime) {\n return FALSE;\n }\n\n $b_success = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='{$s_lockTime}' where `roomCode`='[roomCode]' and `atomicLock` <= '{$s_currTime}'\", $a_params);\n if ($b_success && $mysqli->affected_rows > 0) {\n \tbreak;\n }\n\n // don't hit the mysql server too hard\n sleep(1);\n }\n\n self::loadByRoomCode($this->getRoomCode(), TRUE, $this);\n return TRUE;\n\t}", "public function increase_login_attempts($identity) \n\t{\n\t\tif ($this->config->item('track_login_attempts')) \n\t\t{\n\t\t\t$ip_address = $this->input->ip_address();\n\t\t\t$this->db->insert($this->tables['login_attempts'], array('ip_address' => $ip_address, 'login' => $identity, 'time' => time()));\n\t\t}\n\t}", "public function updateLocks() {}", "function setApp(Ac_Application $app) {\n if ($app !== ($oldApp = $this->app)) {\n if ($this->isOpen) throw new Ac_E_InvalidUsage(\"Cannot \".__FUNCTION__.\"() while isOpen(). close() first\");\n $this->app = $app;\n }\n }", "public static function instance(Application $application, string $code): self {\n\t\t$em = $application->entityManager();\n\t\t$lock = $em->getRepository(Lock::class)->findOneBy(['code' => $code]);\n\t\tif (!$lock) {\n\t\t\t$lock = self::_create_lock($application, $code);\n\t\t} elseif (!$lock->_isMine()) {\n\t\t\ttry {\n\t\t\t\t$em->refresh($lock);\n\t\t\t} catch (ORMException|TransactionRequiredException $e) {\n\t\t\t\t$lock = self::_create_lock($application, $code);\n\t\t\t}\n\t\t}\n\t\treturn $lock;\n\t}", "protected function incrementLoginAttempts(Request $request)\n {\n app(RateLimiter::class)->hit(\n $this->getThrottleKey($request)\n );\n }", "public function setAospUserlessCount(?int $value): void {\n $this->getBackingStore()->set('aospUserlessCount', $value);\n }", "function Lock($UserID)\n\t{\n\t\tjf::SQL(\"UPDATE {$this->TablePrefix()}xuser SET LockTimeout=? , FailedLoginAttempts=0 WHERE ID=? LIMIT 1\",jf::time()+self::$LockTime,$UserID);\n\t}", "public function claim($time = 600) {\n $this->locked = time() + $time;\n $this->save();\n }", "public function unlock()\n\t{\n\n\t\tglobal $maindb;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='0000-00-00 00:00:00' where `roomCode`='[roomCode]'\", $a_params);\n\t}", "private function lock()\n {\n return $this->model->action('user','lock',\n array('job' => 'lock',\n 'id_user' => (int)$this->current_id_user,\n 'by_id_user' => (int)$this->controllerVar['loggedUserId']) );\n }", "public function testUpdateApplicationToken()\n {\n $objTestdata = $this->testUserList();\n $response = $this->call('GET', 'token');\n $this->assertEquals(200, $response->status());\n }", "public static function deleteUnused(Application $application): int {\n\t\t$em = $application->entityManager();\n\t\t$ex = Criteria::expr();\n\t\t$pastTimestamp = Timestamp::now()->addUnit(-1, Temporal::UNIT_DAY);\n\t\t$crit = Criteria::create()->where($ex->isNull('server'))->andWhere($ex->isNull('pid'))->andWhere($ex->lte('expires', $pastTimestamp));\n\t\t$n = 0;\n\t\tforeach ($em->getRepository(Lock::class)->findBy([$crit]) as $lock) {\n\t\t\t$em->remove($lock);\n\t\t\t$n++;\n\t\t}\n\t\t$em->flush();\n\t\treturn $n;\n\t}", "public function setWorkProfilePasswordPreviousPasswordBlockCount(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordPreviousPasswordBlockCount', $value);\n }", "public function lock() {\r\n \t\r\n \tglobal $_SERVER;\r\n \t\r\n \t$db = self::getConnection();\r\n \t$col = $db->selectCollection(self::$_prefix . 'lock');\r\n \t$params = array(\r\n \t\t'ts' => new \\DateTime(),\r\n \t\t'ip' => $_SERVER['REMOTE_ADDR']\r\n \t); \r\n \t$col->insert($params);\r\n \t\r\n \tself::log('Locked','info');\r\n \t\r\n }", "public function setAppActionIfDeviceLockNotSet($val)\n {\n $this->_propDict[\"appActionIfDeviceLockNotSet\"] = $val;\n return $this;\n }", "public function setAppActionIfDeviceLockNotSet($val)\n {\n $this->_propDict[\"appActionIfDeviceLockNotSet\"] = $val;\n return $this;\n }", "public function setIncrementProcessAttempt();", "public function setPasswordPreviousPasswordBlockCount(?int $value): void {\n $this->getBackingStore()->set('passwordPreviousPasswordBlockCount', $value);\n }", "public function lock($name) {\n $_SESSION['lock'][] = $name;\n }", "public function setAppVersion($app, $version) {\n\t\t$gschema = new Gatuf_DB_SchemaInfo();\n\t\t$sql = new Gatuf_SQL('application=%s', $app);\n\t\t$appinfo = $gschema->getList(array('filter' => $sql->gen()));\n\t\tif ($appinfo->count() == 1) {\n\t\t\t$appinfo[0]->version = $version;\n\t\t\t$appinfo[0]->update();\n\t\t} else {\n\t\t\t$schema = new Gatuf_DB_SchemaInfo();\n\t\t\t$schema->application = $app;\n\t\t\t$schema->version = $version;\n\t\t\t$schema->create();\n\t\t}\n\t\treturn true;\n\t}", "public function setOfficeAppsCount(?int $value): void {\n $this->getBackingStore()->set('officeAppsCount', $value);\n }", "private function try_to_lock() {\n\n\t\t// get current locked status\n\t\t$locked_arr = get_post_meta( self::$post_id, 'swp_locked', TRUE );\n\n\t\tif(!$locked_arr) { // not locked or available to lock\n\t\t\tself::lock();\n\t\t} else {\n\t\t\t// if the same user, refresh lock\n\t\t\tif($locked_arr['locked_by_id'] == self::$user_id){\n\t\t\t\tself::lock();\n\t\t\t}\n\n\t\t\t$lastUpdated = get_post_meta(self::$post_id, 'last_updated', TRUE);\n\t\t\t$expireTime = $lastUpdated + (10 * 60); // add 10 minutes\n\t\t\t$currentTime = self::$current_datetime_obj->getTimestamp();\n\n\t\t\t// check if it's been over 10 min since last save\n\t\t\tif( $currentTime > $expireTime ){\n\t\t\t\t// over 10 minutes, unlock\n\t\t\t\tself::lock();\n\t\t\t} else {\n\t\t\t\tself::get_form_data($locked_arr);\n\t\t\t}\n\t\t}\n\t}", "public function setAndroidCorporateWorkProfileCount(?int $value): void {\n $this->getBackingStore()->set('androidCorporateWorkProfileCount', $value);\n }", "public function storeIdentityLock($key, $suk, $vuk);", "function setLockSeting($var)\n {\n \tif(!is_numeric($var))\n \t\treturn;\n \tif($var <= 2 && $var >= 0)\n \t\t$this->lock = $var;\n }", "public function controllerAdminLockContact(Application $app, $guid)\n {\n $this->initParameters($app);\n\n // this controller is executed outside of the CMS and get no language info!\n $this->app['translator']->setLocale($app['request']->getPreferredLanguage());\n\n if (false === (self::$comment = $this->CommentsData->selectAdminGUID($guid))) {\n throw new \\Exception(\"Invalid call, the GUID $guid does not exists.\");\n }\n self::$comment_id = self::$comment['comment_id'];\n\n // REJECT the comment\n self::$comment['comment_confirmation'] = date('Y-m-d H:i:s');\n self::$comment['comment_status'] = 'REJECTED';\n $this->CommentsData->update(self::$comment, self::$comment_id);\n\n // ... and LOCK the contact!\n self::$contact = $this->app['contact']->select(self::$comment['contact_id']);\n self::$contact_id = self::$contact['contact']['contact_id'];\n\n self::$contact['contact']['contact_status'] = 'LOCKED';\n $this->app['contact']->update(self::$contact, self::$contact_id);\n $this->app['contact']->addProtocolInfo(self::$contact_id,\n \"The contact is LOCKED because the comment with the ID \".self::$comment['comment_id'].\" was REJECTED.\");\n\n // send a information to the contact\n $this->contactLockContact();\n\n $message = $this->app['translator']->trans('The comment with the ID %comment_id% is REJECTED and too, the contact with the ID %contact_id% has LOCKED.',\n array('%comment_id%' => self::$comment['comment_id'], '%contact_id%' => self::$contact_id));\n return $this->app->redirect(self::$comment['comment_url'].'?message='.base64_encode($message));\n }", "public function lock()\n {\n $this->is_locked = true;\n \n // transaction do\n self::connection()->executeSql(\"UPDATE wiki_pages SET is_locked = TRUE WHERE id = ?\", $this->id);\n self::connection()->executeSql(\"UPDATE wiki_page_versions SET is_locked = TRUE WHERE wiki_page_id = ?\", $this->id);\n // end\n }", "public function addLock()\n {\n $locked = $this->resource->addLock();\n if ($locked !== true) {\n $this->lockedUser = $this->modx->getObject('modUser', $locked);\n if ($this->lockedUser) {\n $locked = false;\n }\n }\n return $locked;\n }", "public function setConfigMgrDeviceCount(?int $value): void {\n $this->getBackingStore()->set('configMgrDeviceCount', $value);\n }", "public function lock() {\n $this->session->set_userdata('mode', 'staff');\n \n $refer = $this->agent->referrer();\n\n redirect($refer);\n }", "public function updateLogin($user)\n {\n $update['countLogin'] = $user['count_login'] + 1;\n $update['lastLogin'] = date('Y-m-d H:i:s');\n $update['tryLogin'] = 0;\n parent::save($update, $this->find($user['id']), self::SAVE_UPDATE);\n }", "public function lock($_user, $lockStartTime = NULL) {\n $_user['lockout'] = $lockStartTime ?? time();\n $this->storage->save('cockpit/accounts', $_user);\n $this->app->trigger('flood.lockout', [$_user['user']]);\n }", "private function _update_password_lockout_table()\n\t{\n\n\t\t$field = array(\n\t\t\t'user_agent'\t=> array(\n\t\t\t\t'name'\t\t\t=> 'user_agent',\n\t\t\t\t'type'\t\t\t=> 'VARCHAR',\n\t\t\t\t'constraint'\t=> 120\n\t\t\t)\n\t\t);\n\n\t\t$this->EE->dbforge->modify_column('password_lockout', $field);\n\t}", "public function setApplicationId($val)\n {\n $this->_propDict[\"applicationId\"] = $val;\n return $this;\n }", "public function setAppCrashCount(?int $value): void {\n $this->getBackingStore()->set('appCrashCount', $value);\n }", "public function setApplication($application);", "public function setActiveUserCount($val)\n {\n $this->_propDict[\"activeUserCount\"] = intval($val);\n return $this;\n }", "protected function editLockPermissions() {}", "public function increaseLoginAttempts($username)\n\t{\n\t\t$loginAttempts = $this->findLoginAttempts($username);\n\n\t\treturn $this->persistLoginAttempts($username, $loginAttempts + 1);\n\t}", "public function updateCountLogin($user, $add = 1)\n {\n if (1 === $add){\n $update['tryLogin'] = $user['try_login'] + $add;\n } else {\n $update['tryLogin'] = 0;\n }\n parent::save($update, $this->find($user['id']), self::SAVE_UPDATE);\n }", "public function setFailedSignInCount(?int $value): void {\n $this->getBackingStore()->set('failedSignInCount', $value);\n }", "public function addLoginAttempt(\\Netinteractive\\Sentry\\Throttling\\ThrottleInterface $record)\n {\n $blueprint = $record->getBlueprint();\n $record->attempts++;\n $record->last_attempt_at = new Carbon();\n\n if ($record->getLoginAttempts() >= $blueprint->getAttemptLimit()) {\n $this->suspend($record);\n }\n else {\n $this->getMapper()->save($record);\n }\n }", "protected function IncreaseFailedLoginAttempts($UserID)\n\t{\n\t\tjf::SQL(\"UPDATE {$this->TablePrefix()}xuser SET FailedLoginAttempts=FailedLoginAttempts+1 WHERE ID=? LIMIT 1\",$UserID);\n\t}", "public function addLock( $IP, $USERNAME, $LOCKED, $IP_BLACKLIST, $RETURN_ID = FALSE )\n {\n $authLockCol = $this->configModel()->uac_auth_lock(); //assign Auth Lock Model Columns\n $_columns = array();\n $_columns[$authLockCol->ip] = array( $IP, bcDB::TYPE_STRING );\n $_columns[$authLockCol->username] = array( $USERNAME, bcDB::TYPE_STRING );\n $_columns[$authLockCol->locked] = array( $locked, bcDB::TYPE_INTEGER );\n $_columns[$authLockCol->ip_blacklist] = array( $IP_BLACKLIST, bcDB::TYPE_INTEGER );\n return $this->model()->uac_auth_lock()->write( $_columns, $RETURN_ID );\n }", "public function setSuccessfulSignInCount(?int $value): void {\n $this->getBackingStore()->set('successfulSignInCount', $value);\n }", "public function setPasswordPreviousPasswordBlockCount($val)\n {\n $this->_propDict[\"passwordPreviousPasswordBlockCount\"] = intval($val);\n return $this;\n }", "public function testLock()\n {\n $userPK = 'c5fba703-fd07-4a1c-b7b0-345a77106c32';\n $Users = \\Cake\\ORM\\TableRegistry::get('Users');\n\n // Set session data\n $this->session($this->userCreds['admin']);\n\n // Lock\n // ----\n $this->get('admin/users/lock/' . $userPK . '/lock');\n // Verify state\n $nb = $Users->find('all', ['conditions' => ['id' => $userPK, 'status' => 2]])->count();\n $this->assertEquals(1, $nb);\n $this->assertRedirect('admin/users');\n\n // Unlock\n // ------\n $this->get('admin/users/lock/' . $userPK . '/unlock');\n // Verify state\n $nb = $Users->find('all', ['conditions' => ['id' => $userPK, 'status' => 1]])->count();\n $this->assertEquals(1, $nb);\n $this->assertRedirect('admin/users');\n\n // Test with a removed user\n $userPK = '38bffe56-5406-4f18-a9d2-f3b2a59608a5';\n $this->get('admin/users/lock/' . $userPK . '/lock');\n // Verify state\n $this->assertResponseError();\n }", "public function setDeployedAppCount($val)\n {\n $this->_propDict[\"deployedAppCount\"] = intval($val);\n return $this;\n }", "public function setDeployedAppCount($val)\n {\n $this->_propDict[\"deployedAppCount\"] = intval($val);\n return $this;\n }", "public function setDeployedAppCount($val)\n {\n $this->_propDict[\"deployedAppCount\"] = intval($val);\n return $this;\n }", "private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add($key . '.lock', '', 5);\n }", "public function incrementSpamCount()\n\t{\n\t\t// Save global spam count\n\t\t$current = $this->get('spam_count', 0);\n\t\t$this->set('spam_count', ($current+1));\n\t\t$this->set('user_id', \\User::get('id'));\n\t\t$this->save();\n\n\t\t// Also increment session spam count\n\t\t$current = Session::get('spam_count', 0);\n\t\tSession::set('spam_count', ($current+1));\n\t}", "public function setModernAppsCount(?int $value): void {\n $this->getBackingStore()->set('modernAppsCount', $value);\n }", "private function addAttempt()\n\t{\n\t\t$ip = $this->getIp();\n\n\t\t$attempt = ORM::for_table('attempts')->where('ip', $ip)->find_one();\n\t\t\n\t\t$attempt_expiredate = date(\"Y-m-d H:i:s\", strtotime(\"+30 minutes\"));\n\t\t\n\t\tif (!$attempt) {\n\t\t\t$attempt_count = 1;\n\n\t\t\t$attempt = ORM::for_table('attempts')->create();\n\t\t\t$attempt->ip = $ip;\n\t\t\t$attempt->expiredate = $attempt_expiredate;\n\t\t}\n\t\t\n\t\t$attempt_count = $attempt->count + 1;\n\t\t\n\t\t$attempt->count = $attempt_count;\n\n\t\t$attempt->save();\n\t}", "public function testUpdateAnApplication()\n {\n }", "function increase_attemps() {\n\t\tif(!isset($_SESSION['ATTEMPS'])) {\n\t\t\t$_SESSION['ATTEMPS'] = 0;\n\t\t} else {\n\t\t\t$_SESSION['ATTEMPS'] = $this->get_session('ATTEMPS')+1;\n\t\t}\n\t\t$this->display_login();\n\t}", "private function updateAutoLoginCache() {\n $autoLogin = $this->interface->getEntriesForSetting($this->getSettingObject(\"autologin\"));\n\n foreach ($autoLogin as $row)\n $this->autoLoginCache[ intval($row[ 'id' ]) ][] = $row[ 'value' ];\n }", "protected static function lockDatabase() {\n\t\tif (!is_file(__DIR__ . \"/../install/LOCK\"))\n\t\t\ttouch(__DIR__ . \"/../install/LOCK\");\n\t}", "private function updateApplicationTab() {\n\n\t\t$sth = $this->context->connection->prepare(\n\t\t\t\"UPDATE page_definition_tab SET page_definition_id = :pageDefinitionId,\n\t\t\t\tphp_key = :phpSelector, application_definition_id = :appId\n\t\t\tWHERE instance_id = :instId AND page_definition_tab_id = :id\");\n\n\t\t$this->context->connection->bindInstance($sth);\n\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t$sth->bindValue(\n\t\t\t\":pageDefinitionId\", $this->pageDefinitionId, \\PDO::PARAM_INT);\n\t\t$sth->bindValue(\n\t\t\t\":phpSelector\", $this->phpSelector, \\PDO::PARAM_STR);\n\t\t$sth->bindValue(\":appId\",\n\t\t\t$this->typeData->APPLICATION_DEFINITION_ID, \\PDO::PARAM_INT);\n\n\t\t$sth->execute();\n\n\t}", "public function setApplication(Application $application)\n {\n $this->application = $application;\n }", "public function app_login()\n {\n $options = array\n (\n 'client_id' => $this->_appId,\n 'client_secret' => $this->_appSecret,\n 'grant_type' => 'client_credentials',\n );\n\n try\n {\n $token_response = $this->call('get', 'oauth/access_token', $options);\n }\n catch(FacebookException $e)\n {\n //TODO: Exception Handling\n }\n\n // For app login only set local variables, so user experience is not permanently changed\n $this->_token = $token_response['access_token'];\n $this->_expires = 0;\n }", "public function testUpdateApplicationToken()\n {\n $response = $this->call('GET', 'token');\n $this->assertEquals(200, $response->status());\n }", "public function setApplication(?Identity $value): void {\n $this->getBackingStore()->set('application', $value);\n }", "public function getLock() {\n\t\tif (isset($this -> lock)) {\n\t\t\treturn (int) $this -> lock;\n\t\t} else {\n\t\t\t// By default return 0\n\t\t\treturn 1;\n\t\t}\n\t}", "public function setInGracePeriodDeviceCount(?int $value): void {\n $this->getBackingStore()->set('inGracePeriodDeviceCount', $value);\n }", "public function lock()\r\n {\r\n frameBup::_()->getModule('backup')->lock();\r\n }", "function lock($id)\n {\n // Replace lock\n if ( $id > 0 && !$this->is_locked($id) )\n {\n\n if(!isset($this->session['PAGE_ACTIVE_TIMER']))\n $this->session['PAGE_ACTIVE_TIMER'] = array();\n\n $this->session['PAGE_ACTIVE_TIMER'][$id] = time();\n\n $sql = 'REPLACE INTO webpage_locks';\n $sql .= '(webpage_id, locker_id, last_active_timestamp)';\n $sql .= \" VALUES($id, {$this->user->getId()}, \" . $this->kernel->db->escape(gmdate('Y-m-d H:i:s', time())) . \")\";\n $statement = $this->kernel->db->query( $sql );\n if ( !$statement )\n {\n $error_msg = array_pop($this->kernel->db->errorInfo());\n $this->kernel->db->rollback();\n $this->kernel->quit( 'DB Error: ' . $error_msg, $sql, __FILE__, __LINE__ );\n }\n }\n }", "public function onBeforeLock($event) {\n\t\t$this->raiseEvent(\"onBeforeLock\",$event);\n\t}", "protected function incrementLoginAttempts(Request $request)\n {\n // Se controla el numero de intentos de login que realiza el usuario con la cache.\n Cache::increment('key');\n $val = Cache::get('key');\n $intenpermitidos = 5;\n $seg = new seguridad;\n $int = new intentos;\n $cc = $seg->select()->where('id', '=', 1)->first();\n $intentos = $int->select()->where('id', '=', $cc->intentos_id)->first();\n $valcc = $intentos->intentos;\n if ($valcc == 0) {\n $intenpermitidos = 5;\n }else{\n $intenpermitidos = $valcc;\n }\n\n\n $aux = $intenpermitidos + 1;\n if ($val == $aux) {\n $status = 0;\n $user = new User;\n $comfirm_token = str_random(255);\n $data['email'] = $email = $request->email;\n $the_user = $user->select()->where('email', '=', $email)->get();\n $user->where('email', '=', $email)\n ->update(['status' => $status,'comfirm_token' => $comfirm_token]);\n $data['name'] = $user->name;\n $data['comfirm_token'] = $user->comfirm_token=str_random(255);\n Mail::send('auth.recuperacuenta', ['data' => $data], function($mail) use($data) {\n $mail->subject('Comfirmacion de cuenta');\n $mail->to($data['email'], $data['name']);\n });\n $message = 'Se exedió el numero de intentos permitidos, Se desactivo la cuenta vinculada al correo ingresado, para que puedas seguir utilizando tu cuenta se ha enviado un enlace al propietario de la cuenta';\n \\Session::flash('flash_message', $message);\n Cache::flush();\n return redirect()->guest('login');\n //Cache::forget('key');\n } elseif ($val > $intenpermitidos) {\n $message = $val . '/' . $intenpermitidos;\n \\Session::flash('flash_message', $message);\n Cache::flush();\n return redirect()->guest('login');\n } else {\n $email = $request->email;\n $message = '!Uups..' . $val . '/' . $intenpermitidos . ' intentos' . ' ' . $email;\n \\Session::flash('flash_message_info', $message);\n return redirect()->guest('login');\n }\n\n\n app(RateLimiter::class)->hit(\n $this->getThrottleKey($request)\n );\n }", "function set_status($is_locked) {\n\t\t$this->chk_key();\n\t}", "public function testUpdateAnApplication()\n {\n $config = Configuration::getDefaultConfiguration()\n ->setHost('http://127.0.0.1:4010')\n ->setUsername('YOUR_ACCOUNT_ID')\n ->setPassword('YOUR_API_KEY');\n\n\n $apiInstance = new DefaultApi(\n new Client(),\n $config\n );\n\n //$account_id = $account_id_test_value;\n //$application_id = $application_id_test_value;\n //$application_request = $application_request_test_value;\n \n $response = $apiInstance->updateAnApplication($this->application_id_updateAnApplication_test_value(), $this->application_request_updateAnApplication_test_value());\n \n \n $this->assertInstanceOf('\\FreeClimb\\Api\\Model\\ApplicationResult',$response);\n }", "public function lock()\n {\n $this->locked = true;\n }", "public function set_appID($_value)\n {\n $this->appID = $value;\n }", "public function set_appID($_value)\n {\n $this->appID = $value;\n }" ]
[ "0.5866213", "0.5739405", "0.570873", "0.5687612", "0.55903345", "0.5552853", "0.5534733", "0.5462993", "0.54414374", "0.53247297", "0.53113526", "0.52873254", "0.51391506", "0.5112745", "0.50826854", "0.50349414", "0.5027329", "0.50073415", "0.49853542", "0.49541664", "0.49456358", "0.49270713", "0.49243736", "0.4920534", "0.48851115", "0.48695353", "0.4859436", "0.48567575", "0.48443487", "0.48426342", "0.4826382", "0.4826308", "0.48014587", "0.4795008", "0.4794593", "0.4781068", "0.47775942", "0.47732016", "0.47667274", "0.47642905", "0.47562996", "0.47562996", "0.47475028", "0.4733686", "0.47076777", "0.4700376", "0.46656272", "0.46537486", "0.46484506", "0.4648014", "0.46290123", "0.46222267", "0.46035784", "0.45993", "0.45919788", "0.4591222", "0.45759198", "0.45727175", "0.45704105", "0.45696667", "0.45685226", "0.4562662", "0.45604864", "0.45560962", "0.45509925", "0.45501107", "0.45454586", "0.45453504", "0.45359483", "0.45277706", "0.4526849", "0.45229384", "0.45226297", "0.45166302", "0.45166302", "0.45166302", "0.45128554", "0.45091635", "0.45082656", "0.4508086", "0.4503555", "0.44935027", "0.44837016", "0.44794324", "0.44729617", "0.44591704", "0.4458664", "0.44565594", "0.44557568", "0.44478762", "0.44446146", "0.4437507", "0.44349423", "0.44296533", "0.44283408", "0.4425777", "0.44245607", "0.44152278", "0.44146034", "0.44146034" ]
0.7678127
0
getUserNickName : return user nickname
getUserNickName : возвращает никнейм пользователя
public static function getUserNickName(): string { return User::find(Authentication::getUserId())->nickname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNickName()\n {\n return $this->getUid();\n }", "public function get_nickname() {\n\n\t\treturn isset( $this->data['nickname'] ) ? $this->data['nickname'] : '';\n\t}", "public function getNickname()\n {\n return $this->{Foomy_Model_User_Peer::F_NICKNAME};\n }", "public function nickname()\n\t{\n\t\treturn (Html::nickname($this->userdata('u_nickname'), $this->userdata('u_id'), $this->userdata('u_color')));\n\t}", "public function getNickname() {\n if (!$this->exists()) {\n __require(\"i18n\");\n __require(\"api\");\n\n if ($this->isLikelyDeletedUser()) {\n /*\n Determine if the deleted user was an API client or a real\n user. If it was an API client, the client ID would consist\n of \"api:\" followed by a number. Use the proper \"DeletedUser\"\n label depending on which type of user this was.\n */\n if (\n isset($this->data[\"id\"]) &&\n substr($this->data[\"id\"], 0, strlen(APIClient::USER_ID_PREFIX))\n == APIClient::USER_ID_PREFIX\n ) {\n return I18N::resolve(\"admin.table.users.api_deleted\");\n } else {\n return I18N::resolve(\"admin.table.users.deleted\");\n }\n } else {\n return I18N::resolve(\"admin.table.users.anonymous\");\n }\n }\n return $this->data[\"nick\"];\n }", "public function getNick()\n {\n return $this->nick;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getUsername()\n {\n return $this->nickname;\n }", "public function getUsername()\n {\n return $this->getNickname();\n }", "public function get_nick( $_id_user ) {\n }", "public function getUsername(): string\n {\n return (string) $this->nickname;\n }", "public function getNickname()\n {\n return $this->_nickname;\n }", "public function getNickname() {\n\t\treturn $this->nickname;\n\t}", "public function getNick()\n {\n return $this->_nick;\n }", "public function nickname(): string {\n\t\treturn $this->meta ? $this->meta->nickname[0] ?? '' : '';\n\t}", "public function getnickname()\n {\n return $this->nombre;\n }", "public function getUsername()\n {\n $username = $this->user->nickname;\n\n if ($username && User::usernameAvailable($username)) {\n return $username;\n } elseif ($username && !User::usernameAvailable($username)) {\n return $username.$this->getId();\n } else {\n return 'user'.$this->getId();\n }\n }", "public function getNickname() { return $this->nickname; }", "public function getNickname()\n {\n return $this->response['nickname'] ?: null;\n }", "public function nick()\n {\n return $this->nick;\n }", "public function getNickname()\n {\n return $this->getMetaValue('nickname');\n }", "public function getNickname()\n\t{\n\t\treturn $this->response['screen_name'] ? : null;\n\t}", "public function getNickname(): ?string\n {\n return $this->nickname;\n }", "public function getNickname() {\n // TODO: create an utility class and endsWith() function, use it here:\n if ($this->email != null && $this->authDomain != null && substr(\n $this->email, -strlen($this->authDomain)) === $this->authDomain) {\n $suffixLen = strlen($this->authDomain) + 1;\n return substr($this->email, 0, -$suffixLen);\n } elseif ($this->federatedIdentity) {\n return $this->federatedIdentity;\n } else {\n return $this->email;\n }\n }", "public function username(){\n global $L, $users;\n\n if($this->getValue(\"uuid\") === \"bludit\"){\n if($users->exists($this->getValue(\"username\")) !== false){\n $user = new User($this->getValue(\"username\"));\n return $user->nickname();\n }\n return false;\n }\n return $this->getValue(\"username\");\n }", "abstract public function getUserNickName($projectUserId);", "public function nick(): ?string\n {\n return FFI::vips()->vips_connection_nick($this->pointer);\n }", "public function getUsu_nick()\n {\n return $this->usu_nick;\n }", "protected function username() {\n $username = '';\n if ($current_user = $this->user_datas()) {\n $username = $current_user->get_name(); // username is used by default\n \n // if there's a last name, great !\n if ($last_name = $current_user->get_last_name()) {\n $username = $last_name;\n }\n \n // ok there's a first name, go for it !\n if ($first_name = $current_user->get_first_name()) {\n $username .= ' '.$first_name;\n }\n }\n return $username;\n }", "function user_getUsername()\n\t{\n\t\t$u = cookie_get('txtUserName');\n\t\tif( strlen($u)==0 )\n\t\t{\n\t\t\treturn \"YourName\";\n\t\t}\n\t\treturn $u;\n\t}", "private\n function generate_nick()\n {\n return 'user' . time();\n }", "public function getNicknames();", "public function get_username() {\n if (method_exists($this, 'is_anonymous') && $this->is_anonymous()) {\n return 'Anonymous';\n }\n\n $user = $this->get_user();\n return fullname($user);\n }", "public function get_username();", "function getDisplayName()\n {\n return $this->getNickName();\n }", "function getUserName() {\n\t\t$userInfo = @preg_split(\"/\\:/\", $_COOKIE['userId']);\n\t\tif ($userInfo[0]) {\n\t\t\t$filename = getUserDir().\"cache/\".$userInfo[0];\n\t\t\t$userInfo = new SettingsFile($filename);\n\t\t\treturn $userInfo->get(\"username\");\n\t\t}\n\t}", "function getUsername();", "public function getUsername()\n {\n return $this->getNameUser().' '.$this->getLastnameUser();\n }", "public function username() {\n\t\treturn substr( $this->address, 0, strpos( $this->address, '@' ) );\n\t}", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function findUserNickname ($str) {\n $matches = array();\n preg_match('/<title>([-_A-Za-z0-9]+) - Kinksters - FetLife<\\/title>/', $str, $matches);\n return $matches[1];\n }", "public function getUsername(): string\n {\n return (string) $this->pseudo;\n }", "public function getUsername(): string\n {\n return (string) $this->pseudo;\n }", "public function getUserName(): string\n {\n return $this->userInfo->getUsername();\n }", "function denora_get_uname($nick)\n{\n\tglobal $denora_aliases_db;\n\t$data = array();\n\t\n\t$query = sql_query(\"SELECT uname FROM $denora_aliases_db WHERE nick='\".sql_escape_string($nick).\"'\");\n\t$uname = sql_fetch_array($query);\n\t\n\treturn $uname[0];\n}", "function getUserNicknameById ($id = NULL) {\n if (isset($this->id) && !$id) {\n $id = $this->id;\n }\n\n $result = $this->connection->doHttpGet(\"/users/$id\");\n return $this->connection->findUserNickname($result['body']);\n }", "public function getName()\n {\n if (!$this->user->full_name) {\n return $this->user->nickname;\n }\n\n return $this->user->full_name;\n }", "public function get_username() {\r\n\r\n\t\techo \"Username: \".$this->user_name.\"\\n\";\r\n\t}", "public function getUsername()\n {\n return ($this->user_id) ? $this->user->username : $this->guest_name;\n }", "public function get_nickname()\n\t{\n\t\treturn ($this->exists()) ? $this->get_table().'_'.$this['id']->get() : null;\n\t}", "function GetNickName($nid,$mode = 1){\n\t\n\tglobal $db_admin,$db_setup;\n\t\n\t$res_adm = mysql_query(\"SELECT admin_nick, admin_firstname, admin_name FROM $db_admin WHERE admin_id=\".(integer)$nid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$ar_adm = mysql_fetch_array($res_adm);\n\t/* Pokud je $mode 2 - Zobrazi se jmeno */\n\tif ($mode == 2){\n\t\treturn stripslashes($ar_adm['admin_firstname']).\" \".stripslashes($ar_adm['admin_name']);\n\t} elseif ($mode == 3) {\n\t\t/* Pokud je $mode 3 - vybere se podle nastaveni zobrazovani nicku/jmen */\n\t\t$res_setup = mysql_query(\"SELECT setup_show_author_nick FROM $db_setup\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t$ar_setup = mysql_fetch_array($res_setup);\n\t\tif ($ar_setup['setup_show_author_nick'] == 2){\n\t\t\treturn stripslashes($ar_adm['admin_firstname']).\" \".stripslashes($ar_adm['admin_name']);\n\t\t}else{\n\t\t\treturn stripslashes($ar_adm['admin_nick']);\n\t\t}\n\t} else {\n\t\t/* Pokud je $mode 1 (nebo cokoliv jineho) - Zobrazi se Nick */\n\t\treturn stripslashes($ar_adm['admin_nick']);\n\t}\n}", "public function username(): string {\n\t\treturn $this->user->user_login ?? '';\n\t}", "function getUsername(){\n\t\t$UserName = '<username>';\n\t\treturn $UserName;\n\t}", "public function getUsername()\n {\n return $this->jmeno . ' ' . $this->prijmeni;\n }", "function getUsername()\n {\n require_once('User.php');\n # Get the user object\n $user = new User($this->UserId);\n # Return his/hers username\n return $user->getUsername();\n }", "function getUsername()\r\n\t{\r\n\t\t// Tomar la referencia al registro\r\n\t\t$registry = &$_SESSION['registry'];\r\n\r\n\t\t// Registrar los datos del usuario logeado\t\t\r\n\t\treturn $registry->getEntry('USERNAME');\r\n\t\t\r\n\t}", "private function getUsername() {\n return $this->name;\n }", "public function username() {\n\n\t\tif ( $username = Cache::get( 'username' ) ) {\n\t\t\treturn $username;\n\t\t}\n\n\t\t$response = $this->get( 'https://connect.garmin.com/modern/' );\n\t\t$body = (string) $response->getBody();\n\n\t\t// Looking for a gross string like this: \\\"displayName\\\":\\\"{$username}\\\"\n\t\tpreg_match( '/displayName\\\\\\\":\\\\\\\"(.*?)\\\\\\\"/', $body, $matches );\n\t\t$username = $matches[1] ?? '';\n\n\t\tif ( ! empty( $username ) ) {\n\t\t\tCache::set( 'username', $username );\n\t\t}\n\n\t\treturn $username;\n\n\t}", "public function getDirUserNickname()\r\n {\r\n return $this->dir_user_nickname;\r\n }", "public function testgetNickname() {\n $customer = $this->getRandomCustomer();\n $data = $customer->getData();\n $nick = $data['nickname'];\n $nick == '' ? $nick = $data['prename'] : $nick;\n $this->assertEquals($nick, $customer->getNickname());\n }", "public function getUsername(): string\n {\n return $this->first_name . ' ' . strtoupper($this->last_name);\n }", "public static function getUsername(UriInterface $uri): string\n {\n $userInfo = explode(':', $uri->getUserInfo());\n return (isset($userInfo[0]) ? $userInfo[0] : '');\n }", "public function getUsername(): string\n {\n return strtolower(str_replace(\" \",\"_\", $this->fullName));\n }", "public static function getDisplayName()\r\n\t{\r\n\t\treturn storageGet( \"UserName\" );\r\n\t}", "private function getDisplayName()\n {\n $displayName = $this->getUser()->getFirstName() . ' ' . $this->getUser()->getLastName();\n if (' ' != $displayName) {\n return $displayName;\n }\n\n return $this->getUser()->getUsername();\n }", "function uidToNickname($uid)\n {\n if (!is_int($uid)) {\n return false;\n }\n\n if ($uid == $this->uid) {\n return (string) $this->nick_name;\n }\n\n foreach ($this->friends as $friend) {\n if ($friend['uid'] == $uid) {\n return (string) $friend['nick_name'];\n }\n }\n\n /*\n * We don't know who this is, just return the string \"User $uid\"\n */\n return 'User ' . $uid;\n\n }", "public function getUsername()\n {\n return $this->getValueByKey($this->response['return'], 'username');\n }", "public function getSurnameNameOrNickname()\n {\n $this->getSurnameOrName();\n\n return $this->getNickname();\n }", "public function setNickname($var)\n {\n GPBUtil::checkString($var, True);\n $this->nickname = $var;\n }", "public function getUsername () {\t\t\n\t\treturn $this->DataUser['username'];\n\t}", "public function getUserName()\n {\n return $this->user_name;\n }", "public function getUsername(): string\n {\n return (string) $this->loginname;\n }", "public function getUsername() {}", "public function getUserName(): string\n\t{\n\t\treturn $this->statuses[0]->user->name;\n\t}", "function get_the_author_nickname()\n{\n}", "public static function get_member_nickname($network_id) {\n return self::get_one(\"member_nickname\", \"mlm_member\", \"member_network_id = '{$network_id}'\");\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public static function getUsername() {\n\n }", "public function getUserName()\r\n\t{\r\n\t\treturn cSession::getUserName();\r\n\t}", "public function getUserName()\n {\n $value = $this->get(self::USERNAME);\n return $value === null ? (string)$value : $value;\n }", "public function getUsername() : string\n {\n return $this->accountEmail; // Login with the Email instead of the Username.\n }", "public function get_user_name()\n {\n if (is_object($this->user)) {\n return $this->user->get_username();\n }\n else if (isset($_SESSION['username'])) {\n return $_SESSION['username'];\n }\n }", "public function getUserByNickname($nickname)\n {\n }", "public function getUserName() : string\n {\n return empty($this->userName) ? \"\" : $this->userName;\n }" ]
[ "0.8364561", "0.8220601", "0.8162631", "0.81285167", "0.80334467", "0.7971727", "0.79661673", "0.79661673", "0.79661673", "0.79661673", "0.79661673", "0.79661673", "0.79661673", "0.7953252", "0.79451084", "0.79326755", "0.79198366", "0.79081756", "0.7900562", "0.79001725", "0.7890158", "0.78709906", "0.7831829", "0.78014565", "0.7783609", "0.77315235", "0.77156353", "0.7647928", "0.74986756", "0.7492909", "0.74506485", "0.74485993", "0.73918486", "0.73710847", "0.73328876", "0.7322651", "0.72993654", "0.72904915", "0.7254737", "0.7246407", "0.7225518", "0.7218073", "0.71886504", "0.71717834", "0.7143659", "0.71190345", "0.71190345", "0.71190345", "0.71190345", "0.71170205", "0.7109345", "0.7109345", "0.71029484", "0.7096716", "0.7094862", "0.70493597", "0.7041144", "0.70405346", "0.70395523", "0.70291066", "0.7026641", "0.7022787", "0.70179415", "0.7014454", "0.7011033", "0.6993844", "0.6986018", "0.6984523", "0.6929199", "0.69281054", "0.69269615", "0.6926396", "0.692498", "0.6924455", "0.69236064", "0.69134635", "0.6912732", "0.691164", "0.6904938", "0.69012487", "0.689937", "0.68940884", "0.6893435", "0.68875086", "0.68611044", "0.68586314", "0.68586314", "0.68586314", "0.68586314", "0.68586314", "0.68586314", "0.68586314", "0.68586314", "0.68571264", "0.6855174", "0.6849909", "0.68405473", "0.6837443", "0.6832223", "0.6830204" ]
0.8802905
0
signout user and remove all $_SESSION entries
разлогинить пользователя и удалить все записи $_SESSION
public static function signout() { unset($_SESSION['norobot']); unset($_SESSION["userid"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_sign_out(){\n\t$_SESSION = array();\n\tsession_destroy();\t\n}", "function logOut(){\n\t\tunset($_SESSION['user']);\n\t}", "function signout(){\n\tsession_start();\n\t$_SESSION['user_id'] = '';\n\t$_SESSION['first_name'] = '';\n\t$_SESSION['admin']='';\n\tunset($_SESSION['user_id']);\n\tunset($_SESSION['first_name']);\n\tunset($_SESSION['admin']);\n\n\tsession_write_close();\n}", "function logout () {\n\t\tunset ($_SESSION['userID']);\n\t\tunset ($_SESSION['userPassword']);\n\t}", "public function logOut(){\n $_SESSION = array();\n session_destroy();\n\n }", "public static function logOut(){\n self::$_currentUser = null;\n unset($_SESSION[self::SESSION_USER_ID_KEY]);\n }", "function user_logout() {\n\tunset($_SESSION['user']);\n\tsession_regenerate_id();\n}", "public function user_logout()\n {\n $_SESSION['login'] = false;\n unset($_SESSION);\n\t\tsession_destroy();\n }", "public static function logout() {\n self::prependSessionKey();\n self::enforceUserIsAuthenticated();\n self::expireCachedUserRecord();\n $_SESSION[self::$SESSION_KEY] = array();\n }", "public function Logout(){\n\t\tunset($_SESSION['ID']);\n\t\tunset($_SESSION['username'] );\n\t\tunset($_SESSION['level'] ); \n\t\tunset($_SESSION['id'] );\n\t\tunset($_SESSION['username'] );\n\t\tunset($_SESSION['correct'] );\n\t\tunset($_SESSION['problems']);\n\t}", "function logOutUser() {\n $_SESSION = array();\n session_destroy();\n}", "public function Logout() \r\n {\r\n $_SESSION['user'] = null;\r\n }", "function logOut() {\n\t $this->session()->clear('loggedInAs');\n\t}", "public function signOutProc()\r\n {\r\n session_start();\r\n session_unset();\r\n session_destroy();\r\n $this->redirect(\"Business/business_main\");\r\n }", "function logoutUser()\n\t{\n\t\tsession_unset();\n\t\t$_SESSION\t= array();\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "function logout(){\n unset($_SESSION['user']);\n session_destroy();\n }", "public function userLogout(){\n // removes user information from session //\n unset($_SESSION['id']);\n unset($_SESSION['username']);\n\n // deletes the session //\n session_destroy();\n\n header('location: ' . '../index.php');\n }", "public function signOut()\n {\n $cfg = $this->config(); //assign Auth Config Object\n $model = $this->model(); //assign Auth Model Object\n $authCol = $this->configModel()->uac_auth(); //assign Auth Model Columns\n $sess = bcUAC::session(); //assin Auth Session Object\n $sess->useNamespace( $cfg->SESSION_NS );\n if ( isset( $sess->AUTH_USER_ID ) ):\n\n $_columns = array();\n $_columns[$authCol->online] = array( 0, bcDB::TYPE_INTEGER );\n $_columns[$authCol->last_activity] = array( $_SERVER['REQUEST_TIME'], bcDB::TYPE_INTEGER );\n $_filters = array();\n $_filters[$authCol->id] = array( '=', $sess->AUTH_USER_ID, bcDB::TYPE_INTEGER, NULL );\n $model->uac_auth()->update( $_columns, $_filters, array(), NULL );\n endif;\n $sess->destroy();\n }", "public function logout()\n {\n unset($_SESSION['user_id']);\n unset($this->user_id);\n $this->signed_in= false;\n }", "public function logout(){\r\n DB::getInstance()->query( \"DELETE FROM users_session WHERE user_email = '\" . $this->data()->user_email . \"'\" );\r\n Cookie::delete($this->_cookieName);\r\n Session::delete($this->_sessionName);\r\n }", "function userLogout()\n{\n\t$_SESSION['user'] = \"\";\n\tsession_destroy();\n}", "public function logout() {\n\t\tunset($_SESSION['user_id']);\n\t\tunset($_SESSION['user_name']);\n\t\tunset($_SESSION[LOCALE]);\n\t\t// session_unset();\n\t\t// session_destroy();\n\t\t// $_SESSION = array();\n\t\t$this->flash_page('user logout successfully!', '/admin/login', 1);\n\t}", "public static function logout() {\r\n\t\tif (session_id() == '') self::initSession();\r\n\t\t$_SESSION['piratenid_user'] = array('authenticated' => false);\r\n\t}", "function signout()\r\n{\r\n//if($_SESSION['signed_in'] == true)\r\n//{\r\n\t//unset all variables\r\n\t$_SESSION['loggedin'] = NULL;\r\n\t$_SESSION['uuser'] = NULL;\r\n\t$_SESSION['user_id'] = NULL;\r\n\r\n\r\n}", "public function logout() {\n \t$s = Session::getInstance();\n \tunset($s->user_id);\n $this->setAuthed(false);\n }", "static function clearSessionUser() {\n session_destroy();\n }", "public static function logOut()\n {\n $_SESSION['id'] = null;\n $_SESSION['role_id'] = null;\n }", "function logout()\n {\n if(isset($_SESSION[$this->sessionIdentifier.\"islogado\"]) && isset($_SESSION[$this->sessionIdentifier.\"user\"]))\n {\n $user = unserialize($_SESSION[$this->sessionIdentifier.\"user\"]);\n //Apaga entradas na tabela de Sess„o para este utilizador\n $this->delete(array('userid'=>$user->id));\n }\n unset($_SESSION[$this->sessionIdentifier.\"islogado\"]);\n unset($_SESSION[$this->sessionIdentifier.\"user\"]);\n unset($_SESSION[$this->sessionIdentifier.\"islogadoId\"]);\n session_destroy();\n header(\"location:login.php\");\n }", "public function log_out()\n\t\t{\n\t\t\t$_SESSION['user'] = null;\n\t\t\t$_SESSION['partners'] = null;\n\t\t\t$_SESSION['sections_student'] = null;\n\t\t\t$_SESSION['sections_ta'] = null;\n\t\t\t$_SESSION['permissions'] = null;\n\n\t\t\tadd_alert('Logged out!', Alert_Type::SUCCESS);\n\t\t\t//session_write_close();\n\t\t\tredirect_to_index();\n\t\t\t\n\t\t}", "public function doLogout() {\n\t\tunset($_SESSION[self::$LOGGED_IN_USER]);\n\t}", "public static function log_out() \n\t{\t\t\n\t\tunset($_SESSION['admin_id']);\n\t\tsession_destroy();\n\t}", "public function logOutProfessional()\n {\n session_start();\n $_SESSION=array();\n session_destroy();\n $this->checkSessions();\n }", "protected function logOutUser(){\r\n echo \"logged out \" . $_SESSION['username2'];\r\n //Unset the username and userID session \r\n unset($_SESSION['userID']);\r\n unset($_SESSION['username2']);\r\n unset($_SESSION['orderID']);\r\n unset($_SESSION['role']);\r\n \r\n }", "public function logOut()\n\t{\n\t\tsession_start();\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\t$this->index();\n\t}", "function user_logout() {\n\t\n\t// End the session and unset all vars\n\t\n\tsession_unset ();\n\tsession_destroy ();\n}", "public function logout()\n {\n unset($_SESSION['user_id']);\n }", "function logoff_user()\n{\n session_unset();\n session_destroy();\n}", "public function logOut()\n {\n session_unset();\n session_destroy();\n }", "public static function destroySession() {\n //unset session befre destroy\n $olduser = $_SESSION['loggedin'];\n unset($_SESSION['loggedin']);\n unset($_SESSION['username']);\n// unset($_SESSION['email']);\n session_unset();\n session_destroy();\n }", "public function sign_out() {\n\t\t\n \n session_destroy();\n \n \n\t\t\n\t\tredirect('login') ;\n\t\n\t}", "public static function logout()\n {\n unset($_SESSION['user_id']);\n }", "public function logout()\n {\n\n $_SESSION['name'] = null;\n $_SESSION['email'] = null;\n $_SESSION['password'] = null;\n\n $_SESSION = array();\n\n session_destroy();\n\n $this->membership();\n }", "public function logout() {\n\t\t$this->pixie->session->remove($this->user_id_key);\n\t}", "public function logout() {\n if (isset($_SESSION['user_id'])) unset($_SESSION['user_id']);\n if (isset($_SESSION['user_name'])) unset($_SESSION['user_name']);\n if (isset($_SESSION['user_token'])) unset($_SESSION['user_token']);\n if (isset($_SESSION['user_data'])) unset($_SESSION['user_data']);\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n }", "public function logout() {\n unset($_SESSION['user']);\n unset($_SESSION['login_time']);\n unset($_SESSION['logged_in']);\n session_destroy();\n }", "function logout_user () {\n\t\t\n\t\tunset($_SESSION['Username']);\n\t}", "public static function logout () {\n\t\t\tself::init();\n\t\t\t$_SESSION['_xoket_auth_user'] = '';\n\t\t\tunset( $_SESSION['_xoket_auth_user'] );\n\t\t}", "public function logout() {\n $this->userData = array();\n $_SESSION = array();\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000, $params[\"path\"],\n $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n\n $this->fireEvent('logout');\n }", "public function logout(){\n // unsetting session variables and then destroying the session\n unset($_SESSION['user_id']);\n unset($_SESSION['user_name']);\n unset($_SESSION['user_email']);\n session_destroy();\n // redirecting user back to login page\n redirect('users/login');\n }", "function m_LogOut()\n\t{\n\t\tunset($_SESSION['user']);\t\t\t\t\t\t\t\t\n\t\theader(\"Location: \".SITE_URL.\"adminindex.php?err=2\");\n\t}", "public function logout()\r\n {\r\n $_SESSION['user'] = null;\r\n unset($_SESSION['user']);\r\n if (isset(($_SESSION['admin']))) {\r\n unset($_SESSION['admin']);\r\n }\r\n }", "function signout()\n{\n\t/*DESTROY ALL SESSIONS!! HAHAHAHA - Evil Laugh >:> */\n\tsession_destroy();\n\theader(\"Location: index.php\");\n\texit();\n}", "public function log_out() {\n\t\t\t//setcookie(\"recipe_t\", \"\", time()-60*60*24*365, \"/\");\n\t\t\tunset($_SESSION[$this->session_key]);\n\t\t\tsession_destroy();\n\t\t}", "function signout()\r\n{\r\n session_unset();\r\n // destroy the session\r\n session_destroy();\r\n header(\"location:login.php\");\r\n\r\n}", "public function signOut() {\n\n session_regenerate_id(true);\n\n session_unset();\n\n session_destroy();\n\n setcookie($this->settings['session.name'], '', $this->settings['session.lifetime'], $this->settings['session.path'], $this->settings['session.domain'], $this->settings['session.secure'], $this->settings['session.httponly']);\n\n $this->info = null;\n\n $this->signedIn = false;\n\n }", "public function logout() {\n if (isset($_SESSION['user_id'])) {\n unset($_SESSION['user_id']);\n }\n if (isset($_SESSION['admin'])) {\n unset($_SESSION['admin']);\n }\n session_unset();\n session_destroy();\n }", "public function logoutUser() {\r\n\t\tsession_unset();\r\n\t\tsession_destroy();\r\n\t}", "public function logout() {\n\n session_start();\n unset($_SESSION['nimbus_user_id']);\n unset($_SESSION['nimbus_access']);\n unset($_SESSION['nimbus_first_name']);\n unset($_SESSION['nimbus_last_name']);\n }", "function doLogout()\r\n{\r\n\tif (isset($_SESSION['user_id'])) {\r\n\t\tunset($_SESSION['user_id']);\r\n\t\tsession_unregister('user_id');\r\n\t}\r\n\tif (isset($_SESSION['user_name'])) {\r\n\t\tunset($_SESSION['user_name']);\r\n\t\tsession_unregister('user_name');\r\n\t}\r\n\tif (isset($_SESSION['user_type'])) {\r\n\t\tunset($_SESSION['user_type']);\r\n\t\tsession_unregister('user_type');\r\n\t}\r\n\t\t\r\n\theader('Location: login.php');\r\n\texit;\r\n}", "function logout() {\r\n //Doble seguridad: unset + destroy\r\n unset($_SESSION[\"login\"]);\r\n unset($_SESSION[\"userID\"]);\r\n unset($_SESSION[\"username\"]);\r\n unset($_SESSION[\"given\"]);\r\n unset($_SESSION[\"course\"]);\r\n\r\n\r\n session_destroy();\r\n}", "public function logoutAttempt(){\r\n session_start(); \r\n unset($_SESSION['user']); \r\n session_destroy(); \r\n header(\"Location:index.php\"); \r\n\r\n }", "public function user_logout(){\n\t\tsession_destroy();\n\t}", "public function logout() {\n if ($_SESSION['logged_in'] == true) {\n $_SESSION['logged_in'] = false;\n unset($_SESSION['user_id']);\n }\n }", "public function log_out() {\n session_unset();\n session_destroy();\n code_cookie::set(\"cookie_hash\", NULL, mktime() - 36000000);\n setcookie(\"logged_in_user_id\", NULL, mktime() - 36000000); // this one needs to use setcookie as it's not player-specific\n }", "function logout() {\r\n $_SESSION = array();\r\n }", "final function logout() {\n session_unset();\n session_destroy();\n }", "public function logout() {\n unset( $_SESSION['user'] );\n $_SESSION = [];\n // On détruit la session !\n session_destroy();\n // On redirige l'utilisateur\n $this->redirect( 'home' );\n }", "public function logout() {\n\n\t//poništavamo sessiu\n\tunset($_SESSION['user_id']);\n\n\t//poništavamo objekat\n\tunset($this->user_id);\n\t$this->signed_in = false;\n\n\n\t}", "public function signout() {\n\t$this->session->unset_userdata('admin_details');\n\t$this->session->unset_userdata('adminid');\n\t$this->session->unset_userdata('adminname');\n\t$this->session->unset_userdata('adminemail');\n\t$this->session->sess_destroy();\n\tredirect('administrator');\n\t}", "public function signout()\n {\n if(isset($this->user_id))\n $this->db->function_call($this->proc['SignOut'], [$this->user_id], \"update\");\n\n // Clear properties\n unset($this->user_id);\n $this->signed_in = false;\n\n // Clear Cookies\n unset($_COOKIE['selector']);\n unset($_COOKIE['token']);\n setcookie(\"selector\", '', time() - 3600, '/');\n setcookie(\"token\", '', time() - 3600, '/');\n\n // Clear Session\n session_unset();\n session_destroy();\n }", "function logout_user() {\n\t $session_names = array('user_id', 'user_time', 'user_unique');\n\n\t\tif (isset($_SESSION[$this->qls->config['cookie_prefix'] . 'user_unique'])) {\n $this->qls->SQL->delete('sessions',\n array('id' =>\n array(\n '=',\n $_SESSION[$this->qls->config['cookie_prefix'] . 'user_unique']\n )\n )\n );\n\t\t}\n\n // Remove all session information and unset the cookie\n $_SESSION = array();\n\n\t\tif (isset($_COOKIE[session_name()])) {\n\t\t setcookie(session_name(), '', time() - 42000, '/');\n\t\t}\n\n\t\tif (isset($_COOKIE[$this->qls->config['cookie_prefix'] . 'user_id'])) {\n\t\t\tforeach ($session_names as $value) {\n\t\t\t setcookie($this->qls->config['cookie_prefix'] . $value, 0, time() - 3600, $this->qls->config['cookie_path'], $this->qls->config['cookie_domain']);\n\t\t\t}\n\t\t}\n\n\t $this->qls->redirect($this->qls->config['logout_redirect']);\n\t}", "public static function logout(){\n\t\tself::$user = NULL;\n\t\tSession::clear();\n\t\tsession_destroy();\n\t}", "public function logout(){ \n unset($_SESSION['username']);\n }", "function logout() {\n\t\t$this->Session->setFlash('Session Terminada');\n\t\tforeach($_SESSION as $container => $arrayContainer){\n\t\t if($container !== 'Auth' AND $container !== 'Config' AND $container !== 'Message'){//Belong to normal Session\n\t\t unset($_SESSION[$container]); // Sanitize the Global var $_SESSION\n\t\t }\n\t\t}\n $this->redirect($this->Auth->logout());\n\n\t}", "public function logout(){\r\n if(isset($_SESSION['user'])){\r\n unset($_SESSION['user']);\r\n }\r\n header('Location: index.php'); \r\n }", "public function logout() {\n\n //releasing sessions\n unset($_SESSION['user_id']);\n unset($_SESSION['user_name']);\n unset($_SESSION['user_email']);\n unset($_SESSION['user_type']);\n // session_destroy();\n\n // redirecting to login page of same controller\n redirect('users/login');\n }", "private function _logout()\n {\n $_SESSION = [];\n session_reset();\n }", "function logout()\n{\n\tunset($_SESSION['user']);\n\n\t//Destruir la session\n\tsession_destroy();\n\n\t//Borrar la cookie de recordarme\n\tsetcookie('fs05_user', 0, time() * -1);\n\n}", "private function logout() : void {\n\t\t$_SESSION['login'] = false;\n\t}", "public function logout() {\n deleteSession();\n }", "protected function logout(){\r\n\t\tunset($_SESSION['is_logged_in']);\r\n\t\tunset($_SESSION['user_data']);\r\n\t\tsession_destroy();\r\n\t\t//redirect\r\n\t\theader('Location: '.ROOT_URL);\r\n\t}", "public function Logout()\n {\n unset($_SESSION['user']);\n $this->acronym = \"\";\n $this->name = \"\";\n $this->isAuthenticated = false;\n }", "function session_log_out()\n\t{\n\t\tglobal $u;\n\t\tglobal $email;\n\t\t\n\t\tif ( isset ($u))\n\t\t{\n\t\t\t//makes sure we have someone in database with matching credentials\n\t\t\t$authentication_query = sprintf(\"SELECT * FROM users WHERE (u = $u) AND (session = '%s')\", mysql_real_escape_string(session_id()));\n\t\t\t\n\t\t\t$authentication_result = mysql_get_result_from_query($authentication_query);\n\t\t\t\n\t\t\tif (!!($result_assoc = mysql_fetch_assoc($authentication_result)))\n\t\t\t{\n\t\t\t\t//if we found someone, then we clear their session from the database\n\t\t\t\tmysql_perform_query(\"UPDATE users SET update = NULL, session = NULL WHERE (u = $u)\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//...and we prevent any other parts of the script calling this function from using the session information\n\t\t\t\tunset ($u);\n\t\t\t\tunset ($email);\n\t\t\t}\n\t\t\t\n\t\t\t//see below...\n\t\t\tsession_adjourn();\n\t\t}\n\t}", "public function logout()\n {\n session_start();\n session_destroy();\n unset($_SESSION[\"uid\"]);\n\n header(\"Location: \" . ROOT);\n exit();\n }", "public function logout(){\n\t\t\tunset($_SESSION['USERNAME']);\n\t\t\theader(\"location: index.php\");\n\t\t\tsession_start();\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t}", "public function logoutUser() {\n if (!isset($_SESSION)) {\n session_start();\n }\n session_destroy();\n $_SESSION = array();\n $this->redirect('home');\n }", "function logout()\r\n {\r\n \t// Remove the user name from the session variable\r\n \t$username = $_SESSION['username'];\r\n \tunset($_SESSION['username']);\r\n \tunset($_SESSION['password']);\r\n\r\n }", "public function destroySession() {\n unset($_SESSION['uid'],\n $_SESSION['sid'],\n $_SESSION['user'],\n $_SESSION['pass'],\n $_SESSION['email'],\n $_SESSION['tz'],\n $_SESSION['admin'],\n $_SESSION['active']);\n session_destroy();\n $this->live = false;\n if(isset($_COOKIE['auth'])) {\n unset($_COOKIE['auth']);\n setcookie('auth', false, time()-60, '/');\n }\n }", "function doUserLogout(){\n\t\n\tunset($_SESSION['loggedIn']);\n\tunset($_SESSION['userId']);\n\t\n\tsession_destroy();\n\t\n\t//redirect to the home page\n\theader(\"location: index.php\");\n\texit;\t\n}", "public function signout()\n\t{\n\t\tif (isset($_COOKIE['session_token'])) {\n\t\t unset($_COOKIE['session_token']);\n\t\t setcookie('session_token', '', -1, '/');\n\t\t} \n\t\n\t\t// redirect('/app/user/signin');\n\t\theader(\"Location: /app/user/signin\");\n\t}", "public function logout()\n {\n $this->_queries->delete('users_sessions', array('user_id', '=', $this->userdata()->id));\n Session::delete($this->_sessionName);\n Cookie::delete($this->_cookieName);\n }", "public function logout(){\n session_regenerate_id();\n session_unset();\n session_destroy();\n }", "function logout(){\n session_destroy(); // This can essentially do everything\n }", "public function logout() {\n\t\t$this->session->clear();\n\t}", "public function destroy(){\n unset($_SESSION['user']);\n \n }", "public function logout()\n\t{\n\n\t\tunset( $_SESSION[ 'user_id' ] );\n\t\tunset( $_SESSION[ 'user_role' ] );\n\t\tunset( $_SESSION[ 'user_full_name' ] );\n\t\tunset( $this->user_id );\n\n\t\t$this->logged_in = false;\n\n\t}", "function logout(){\n\t\t\n\t\t$_SESSION[\"authenticated\"] = FALSE;\n\t\tsession_destroy();\n\t\t\t\n\t\t\n\t}", "public function logout()\n {\n $this->user = null;\n \n unset($_SESSION);\n session_destroy();\n }" ]
[ "0.8511401", "0.8419349", "0.8197163", "0.81223565", "0.8116245", "0.8105525", "0.80686593", "0.8059241", "0.80284226", "0.7993156", "0.798487", "0.7971111", "0.79499406", "0.7930562", "0.7925662", "0.7923331", "0.7923331", "0.78951436", "0.7887149", "0.7885735", "0.7881265", "0.7876587", "0.7874399", "0.78729403", "0.78486955", "0.78362286", "0.78294307", "0.78207064", "0.7819794", "0.781633", "0.78121996", "0.7812184", "0.7805795", "0.7793017", "0.7778614", "0.77781016", "0.77770257", "0.7776704", "0.77730805", "0.77705806", "0.77573764", "0.7752256", "0.7746706", "0.77461636", "0.77378076", "0.7728743", "0.7724525", "0.771322", "0.7711616", "0.7708698", "0.77058417", "0.76999277", "0.76895005", "0.76885176", "0.76769215", "0.76744956", "0.76735204", "0.7663896", "0.76611537", "0.7661029", "0.7659966", "0.7659838", "0.7650875", "0.7646942", "0.76421094", "0.7642018", "0.7640138", "0.76363766", "0.76328707", "0.76307595", "0.76272273", "0.7625747", "0.762466", "0.76236284", "0.76128894", "0.76104224", "0.76099753", "0.7601366", "0.7598268", "0.75980395", "0.7597782", "0.75944024", "0.757598", "0.756662", "0.7564108", "0.7562921", "0.7562905", "0.75583506", "0.75581527", "0.75564134", "0.7551937", "0.7541745", "0.7539809", "0.7538666", "0.7533641", "0.7529776", "0.75251347", "0.7523937", "0.75221115", "0.7515413" ]
0.8508535
1
sendAdminsitratorEmail : Send to the admin an information email for a new account creation
sendAdminsitratorEmail : Отправить администратору информационное электронное письмо по созданию нового аккаунта
public static function sendAdminsitratorEmail(string $email) { $mail = new PHPMailer(true); try { //Server settings // $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output $mail->isSMTP(); // Send using SMTP $mail->Host = $_ENV['SMTP_SERVER']; // Set the SMTP server to send through if (strcmp($_ENV['SMTP_USEAUTH'], "true") == 0) { $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $_ENV['SMTP_USERNAME']; // SMTP username $mail->Password = $_ENV['SMTP_PASSSWORD']; // SMTP password } if (strcmp($_ENV['SMTP_USESSL'], "true") == 0) { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged } $mail->Port = $_ENV['SMTP_PORT']; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above //Recipients $mail->setFrom($_ENV['SMTP_MAILFROM'], 'Blindtest mailer daemon'); $mail->addAddress($_ENV['REGISTRATION_ADMIN_EMAIL']); // Add a recipient $mail->addReplyTo($_ENV['SMTP_MAILFROM'], 'Blindtest mailer daemon'); // Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'New account creation for Blindtest'; $mail->Body = "<p>Hello,</p>" . "\r\n" . "<p>A new account has been created for $email." . "</p>\r\n"; $mail->AltBody = "Hello," . "\r\n" . "A new account has been created for $email." . "\r\n"; $mail->send(); } catch (Exception $e) { die("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sendEmails()\n {\n // get emails of administrators\n $adminEmails = array();\n $this->model->action('user','getUsers',\n array('result' => & $adminEmails,\n 'role' => array('=',20),\n 'status' => array('=',2),\n 'fields' => array('email') )); \n\n $adminBody = 'Hi,<br>A new comment was added to the following article:'; \n $adminBody .= '<a href=\"'.$this->config['site_url'].'?id_article='.$this->tplVar['article']['id_article'].'\">'.$this->tplVar['article']['title'].'</a>';\n \n if($this->config['article']['default_comment_status'] == 1)\n {\n $adminBody .= '<br><br>You have to validate new comments!'; \n }\n \n $this->model->action('common', 'sendMail',\n array('toEmail' => & $adminEmails,\n 'fromEmail' => '',\n 'subject' => 'New comment added',\n 'body' => (string)$adminBody)); \n \n }", "private function sendEmails()\n {\n // get emails of administrators\n $adminEmails = array();\n $this->model->action('user','getUsers',\n array('result' => & $adminEmails,\n 'role' => array('=',20),\n 'status' => array('=',2),\n 'fields' => array('email') )); \n\n $adminBody = 'Hi,<br>A new comment was added to the following article:'; \n $adminBody .= '<a href=\"http://'.$this->router->getBase().'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->config->getModuleVar('article','title').'</a>';\n \n if($this->config->getModuleVar('article','default_comment_status') == 1)\n {\n $adminBody .= '<br><br>You have to validate new comments!'; \n }\n \n $this->model->action('common', 'sendMail',\n array('toEmail' => & $adminEmails,\n 'fromEmail' => '',\n 'subject' => 'New comment added',\n 'body' => (string)$adminBody)); \n \n }", "public function AdminEmail()\n\t{\t\n\t\tob_start();\n\t\t$sep = \"\\n\";\n\t\t\n\t\techo 'A new grant application has been received ...', $sep, 'Name: ', stripslashes($this->FullName()), $sep;\n\t\tif ($this->details['userid'])\n\t\t{\techo 'Registered Student: ';\n\t\t\tif (($student = new Student($this->details['userid'])) && $student->id)\n\t\t\t{\techo $this->InputSafeString($student->GetName()), ' - ', SITE_URL, 'iiadmin/member.php?id=', $student->id;\n\t\t\t} else\n\t\t\t{\techo 'student id ', $this->details['userid'], ' not found';\n\t\t\t}\n\t\t\techo $sep;\n\t\t}\n\t\techo 'Phone: ', stripslashes($this->details['phone']), $sep, 'Email: ', stripslashes($this->details['email']), $sep, 'Address: ', $sep, stripslashes($this->details['address']), $sep, 'Postcode: ', stripslashes($this->details['postcode']), $sep, $sep, 'Grant requested £', number_format($this->TotalGrant(), 2), $sep, $sep, 'View in admin panel: ', SITE_URL, 'iiadmin/grantapp.php?id=', $this->id;\n\t\t\n\t\t//$this->VarDump($mailbody);\n\t\t$mail = new HTMLMail();\n\t\t$mail->SetSubject('IIDR Grant application');\n\t\t$mail->SendEMailForArea('GRANTAPPS', '', ob_get_clean());\n\t\t\n\t}", "public function emailTOadmin($data){\n\t\t$adminMail = MU_Model::getAdminEmail();\n\t\tif($adminMail == \"\"){\n\t\t\t$adminMail = \"mysoftware77@gmail.com\";\n\t\t}\n\t$message = \"Firstname: \".$data['sub_fname'].\n\t\"Lastname: \".$data['sub_lname'].\n\t\"Email: \".$data['sub_email'];\n\t\t$this->email->clear();\t \n $this->email->to($adminMail);\n $this->email->from($data['sub_email']);\n $this->email->subject(\"You got a new subscriber.\");\n $this->email->message($message);\n $send = $this->email->send();\n\t}", "public function emailTOadmin($data){\n\t\t$adminMail = MU_Model::getAdminEmail();\n\t\tif($adminMail == \"\"){\n\t\t\t$adminMail = \"mysoftware77@gmail.com\";\n\t\t}\t\t\n\t\t$message = \"Firstname: \".$data['sub_fname'].\n\t\t\"Lastname: \".$data['sub_lname'].\n\t\t\"Email: \".$data['sub_email'];\n\t\t$this->email->clear();\t \n\t $this->email->to($adminMail);\n\t $this->email->from($data['sub_email']);\n\t $this->email->subject(\"You got a new subscriber.\");\n\t $this->email->message($message);\n\t $send = $this->email->send();\n\t if($send){\n\t \t$this->emailToPassenger();\n\t }\n\t}", "public function created(Admin $admin)\n {\n $data = [\n 'name' => $admin['name'],\n 'superadminboady' => $admin['name'].' Want to Admin',\n ];\n $superAdmins = Superadmin::first();\n\n $superAdmins->notify(new Superadminnotification($data));\n $maildata= array(\n \n 'name'=> $admin->name,\n 'subject'=>'Verify Your Email',\n 'message' => 'Your Request Has Been Submit Succesfully. Please use the code '. $admin->status . ' for email varification or Click the link ' .'<a target=\"_blank\" href=\"'. url('/login/adminvarificationlink/'. $admin->email.'/'. $admin->status) . '\">Varify Now</a>'. ' .Thank You',\n );\n \n Mail::to($admin)->send(new AdmininfoMail($maildata));\n \n }", "public static function sendWelcomeMsg() {\r\n \r\n // El usuario acaba de registrarse y logarse automátcamente así que podemos coger los datos de la sesión \r\n $planName = Yii::$app->user->identity->membership->getPlanAdminName();\r\n \r\n MyMailUserWelcome::send2User(Yii::$app->user->identity->getFullName(), Yii::$app->user->identity->email);\r\n \r\n MyMailUserWelcome::send2Admin(Yii::$app->user->identity->getFullName(), Yii::$app->user->identity->email, $planName);\r\n }", "public function notifiy_admin_by_mail() {\n //when the new affiliate and advertiser signup//\n //\n $username = $this->input->get('username');\n if ($username) {\n $this->load->model(\"admin/m_users\");\n //send a mail to admin when a new user register;;;;;\n $filter = array();\n $filter['username'] = $username;\n// $filter['check_status'] = \"NO\";\n $user = $this->m_users->getUsers($filter);\n if ($user) {\n $admins = $this->m_users->getUsers(array(\"UTID\" => ADMIN));\n\n $admin_emails = implode(\",\", array_column($admins, \"email\"));\n $user = isset($user[0]) ? $user[0] : array();\n\n $email = array();\n\n switch ($user['UTID']) {\n case ADVERTISER:$email['subject'] = \"New Advertiser {$user['name']} is Registered.\";\n break;\n case AFFILIATE:$email['subject'] = \"New Affiliate {$user['name']} is Registered.\";\n default:\n break;\n }\n\n $email['message'] = $this->load->view(\"account/email/notify_to_admin\", $user, TRUE);\n $email['to'] = $admin_emails;\n\n $this->mailer->send_mail($email);\n }\n //\n //end of code\n\n return;\n }\n }", "public function reportToAdmin(){\n \t//send email to admin\n \t//record attempt to access to db\n }", "public function sendEmailToAdmin($senderName, $senderEmail, $subject, $emailTemplateVariables)\r\n {\r\n \t$adminName \t\t= \tMage::getStoreConfig('general/store_information/name');\t\t//\tStore Name\r\n\t\t$adminEmail \t= \t'noreply@studypravesh.com';\t\r\n\t\t//$adminEmail \t= \tMage::getStoreConfig('trans_email/ident_general/email');\t//\tStore Email\r\n\t\t\r\n\t\tif(empty($senderEmail)){\r\n\t\t\t$senderName\t=\t$adminName;\r\n\t\t\t$senderEmail=\t$adminEmail;\r\n\t\t}\r\n\t\t\r\n\t\t//\tCreating email content/body\r\n\t\t$emailContent\t=\t'Hi '.$adminName.'<br><br>The following data has been submitted on website.<br>';\r\n\t\t\r\n\t\t$output = \"\";\r\n\t\tforeach ( $emailTemplateVariables as $key => $value ) {\r\n\t\t\t$output .= '<br>'.sprintf( \"%s: %s\\n\" , ucfirst(str_replace('_',' ',$key)) , $value );\r\n\t\t}\r\n\t\t$emailContent.=\t$output;\r\n\t\t$emailContent.=\t'<br><br> Thanks and Regards<br>'.$adminName;\r\n\t\t//echo $emailContent;die;\r\n \r\n $mail = new Zend_Mail();\r\n //$mail->setBodyText($emailContent);\r\n\t\t$mail->setBodyHtml($emailContent);\r\n $mail->setFrom($senderEmail, $senderName);\r\n $mail->addTo($adminEmail, $adminName);\r\n $mail->setSubject($subject);\r\n try {\r\n $mail->send();\r\n\t\t\tMage::log('Email sent to admin.', null, 'email.log');\r\n }catch(Exception $ex) {\r\n Mage::log('Unable to send email to admin.', null, 'email.log');\r\n }\r\n }", "public function email()\n {\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->user->email)\n ->setSubject(\"Password Reset Confirmation\")\n ->setViewParam('passwordReset', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->sendHtmlTemplate('password-reset.phtml');\n }", "function notify_user_create($user) {\n \n $app = \\Slim\\Slim::getInstance();\n \n $message = \"Hello, <br>\";\n \n $message .= '<br> A new user has been created on <a href=\"'.app_url().'\">' . get_config('appname') . '</a> <br>';\n \n $message .= \"Username: \" . $user->username . '<br>';\n $message .= \"Email adress: \" . $user->email . '<br>';\n \n $subject = get_config('appname') . \" : New User Created\";\n \n // notifies all admin users of user create\n $admins_list = '';\n $admins = User::all(array(\n 'conditions' => array(\"role = ?\", \"admin\"),\n 'select' => \"email\"\n ));\n foreach($admins as $admin) {\n $admins_list .= $admin->email.',';\n }\n \n mail($admins_list, $subject, $message, get_notifier_headers(get_config('admin_email')));\n \n}", "public function sendWelcomeEmail() {\n\t\t\t\n\t\t$email_service = new EmailService();\n\t\t$email_service -> sendActivationEmail($this, \\Configuration::getConfiguration('sites') -> site2);\n\t\t\n\t}", "public function _sendNewAccountEmail($data) {\n\t}", "function sendCreationMail($userId) {\n\tif(! $userId)\n\t\treturn;\n\n\tdo_action(ACTION_PREFIX . 'before_creation_mail', $userId);\n\n\tWC()->mailer()->customer_new_account($userId);\n\n\tdo_action(ACTION_PREFIX . 'after_creation_mail', $userId);\n}", "private function sendEmail()\n\t{\n\t\t//get all supervisors.\n\t\t$supervisorModel = Doctrine_Query::create()\n\t\t\t->from('Default_Model_EntitySupervisor')\n\t\t\t->orderBy('id ASC')\n\t\t;\n\n\t\tif ($supervisorModel->count() > 0) {\n\t\t\t//send email to all supervisor.\n\t\t\tforeach ($supervisorModel->execute() as $supervisorValue) {\n\t\t\t\t//create dynamic variable array for email template.\n\t\t\t\t$dynamicVars = array(\n\t\t\t\t\t'DATE_TIME' => date('d/m/Y H:i:s'),\n\t\t\t\t\t'USER_NAME' => $this->_postedData['firstname'] . ' ' . $this->_postedData['lastname'],\n\t\t\t\t\t'USER_EMAIL' => $this->_postedData['email']\n\t\t\t\t);\n\n\t\t\t\t//send email.\n\t\t\t\tPRJ_Email::send('membership_request', $supervisorValue, $dynamicVars, array($this->_file));\n\t\t\t}\n\t\t}\n\t}", "public function sendEmail() {\n $userId = CommonProcess::getCurrentUserId();\n if (Roles::isAdminRole()) {\n // Update from administrator\n // Do nothing\n } else {\n switch ($userId) {\n case $this->approved:\n case self::STATUS_APPROVED:\n case self::STATUS_CANCEL:\n case self::STATUS_REQUIRED_UPDATE:\n // Send email\n EmailHandler::sendApprovedWorkPlan($this, $this->rCreatedBy);\n break;\n case $this->created_by: // Current user is creator\n // Send email to approver\n switch ($this->status) {\n case self::STATUS_APPROVED:\n if (isset($this->rApproved)) {\n // Send email\n EmailHandler::sendReqApprovedWorkPlan($this, $this->rApproved);\n }\n break;\n\n default:\n break;\n }\n break;\n\n default:\n break;\n }\n }\n }", "private function enviarEmailAdministrador(){\n require '../../estrutura/core/email/EnvioEmail.php';\n $oControllerEstruturaPadrao = new ControllerPadraoEstrutura();\n $oControllerEstruturaPadrao->envioEmailAdm();\n \n }", "function new_user_email_admin_notice()\n{\n}", "function send_mail() {\r\n\t//send email on succesfuly register\r\n\t\t\t$body_msg = \"you successfuly registered on HINFO \r\n\t\t\t\\nlogin: \" . $_POST['login'] .\r\n\t\t\t\"\\npassword: \" . $_POST['pass'] .\r\n\t\t\t\"\\n\\n для полного доступа к ресурсам дождитесь письма от администратора.\";\r\n\t\t\tmail($_POST['email'],\"Registration\", $body_msg);\r\n\t\t\t//send mail to admin\r\n\t\t\tmail('adolgopolov@ro-nso.ru','hinfo user', $body_msg);\r\n}", "public function sendAccountCreateMail($params, $email)\n {\n /* Get current id lang*/\n $id_lang = (int)$this->context->language->id;\n\n /* We send an email to a customer */\n Mail::Send(\n (int)$id_lang,\n 'pendingaccount',\n $this->l('Welcome!'),\n array(\n '{firstname}' => (string)$params['newCustomer']->firstname,\n '{lastname}' => (string)$params['newCustomer']->lastname,\n '{email}' => (string)$params['newCustomer']->email,\n '{passwd}' => ''),\n (string)$params['newCustomer']->email,\n (string)$params['newCustomer']->firstname . ' ' . (string)$params['newCustomer']->lastname,\n (string)Configuration::get('PS_SHOP_EMAIL'),\n (string)Configuration::get('PS_SHOP_NAME'),\n null,\n null,\n dirname(__FILE__) . '/mails/'\n );\n\n /* We send email ton admin shop */\n Mail::Send(\n (int)Configuration::get('PS_LANG_DEFAULT'),\n 'newaccount',\n $this->l('A new account need to be activated !'),\n array(\n '{firstname}' => (string)$params['newCustomer']->firstname,\n '{lastname}' => (string)$params['newCustomer']->lastname,\n '{email}' => (string)$params['newCustomer']->email,\n '{passwd}' => ''),\n (string)$email,\n (string)Configuration::get('PS_SHOP_NAME'),\n (string)Configuration::get('PS_SHOP_EMAIL'),\n (string)Configuration::get('PS_SHOP_NAME'),\n null,\n null,\n dirname(__FILE__) . '/mails/'\n );\n }", "private function EmailUser(){\n //notifying them of the sale completion.\n }", "public function createAccount() {\n if (AdminUser::all()->isNotEmpty()) {\n echo 'Admin account is already setup.';\n return;\n }\n\n AdminUser::create([\n 'first_name' => 'Todd',\n 'last_name' => 'Farrell',\n 'username' => 'todd',\n 'email' => 'todd.farrell@hellolayover.com',\n 'password' => bcrypt('Todd@HelloLayover'),\n ]);\n\n echo 'Admin account created successfully.';\n }", "public function sendAnonymiseEmailAction() {\n\n if (!Mage::helper('gaiterjones_gdpr')->isEnabled()) {\n return;\n }\n\n $customer = Mage::getModel('customer/customer')->load($this->getRequest()->getParam('id'));\n if (!$customer->getId()) {\n Mage::getSingleton('core/session')->addError('No customer ID provided.');\n $this->_redirect('*');\n return;\n }\n\n /** @var Mage_Core_Model_Email_Template $email */\n $user = Mage::getSingleton('admin/session');\n $locale = Mage::app()->getLocale()->getLocaleCode();\n $email = Mage::getModel('core/email_template')->loadDefault('gaiterjones_gdpr_confirm', $locale);\n if ($email->getId()) {\n $email->sendTransactional($email->getId(), 'sales', $customer->getEmail(), $customer->getName(), array(\n 'email' => $customer->getEmail(),\n 'name' => $customer->getName(),\n 'link' => Mage::getUrl('gaiterjones_gdpr/customer/deleteaccount'),\n 'locale' => $locale\n ), 0);\n }\n\n $this->_redirect('adminhtml/customer/edit', array('id' => $customer->getId()));\n Mage::getSingleton('core/session')->addSuccess('Anonymisation email successfully sent.');\n return;\n }", "public function afterCreate(){\n $content = \"Your Username: \".$this->email.\" | Password: admin. <a href='http://sdchospital.com/ewallet'>Login</a> to Update your Password.\";\n $body = $this->setHeaderRow().$this->setBodyRow().$this->mainBodyAction($this->firstname, $content).$this->setFooterRow();\n $messageRow = $this->getDI()->getMailer()->createMessage()\n ->to($this->email, $this->firstname)\n ->subject('Notification')\n ->content($body);\n //Set the CC addresses for this message\n $messageRow->cc(self::_ADMIN_LEVEL_1);\n $messageRow->bcc(self::_ADMIN_LEVEL_2);\n $messageRow->send();\n }", "public function index()\n\t{\n \t\t\n\t\tif (! $this->request->isCLI())\n\t\t{\n\t\t\treturn \"This script can not access.\" . PHP_EOL;\n\t\t}\t\n\n\t\t$result = $this->user->create(['status' => FALSE]);\n\n\t\tif ($result != FALSE)\n\t\t{\n\t\t\t$mail = new PHPMailer();\n\t\t\t//Server settings\n\t\t\t$mail->SMTPDebug = SMTP::DEBUG_SERVER; \t\t\t\t\t\t//Enable verbose debug output\n\t\t\t$mail->isSMTP(); \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Send using SMTP\n\t\t\t$mail->Host = 'smtp.googlemail.com'; \t\t\t\t\t\t\t//Set the SMTP server to send through\n\t\t\t$mail->SMTPAuth = true; \t\t\t\t\t\t\t\t\t\t\t//Enable SMTP authentication\n\t\t\t$mail->Username = 'akashp@websoptimization.com'; \t\t\t//SMTP username\n\t\t\t$mail->Password = 'akash@wo`123'; \t\t\t\t\t\t\t\t//SMTP password\n\t\t\t$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; \t\t//Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n\t\t\t$mail->Port = 587; \t//TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\t\t\t$mail->setFrom('akashp@websoptimization.com', 'ci practical test');\n\n\t\t\tif (count($result) > 0) \n\t\t\t{\n\t\t\t\tforeach ($result as $key => $value)\n\t\t\t\t{\n\t\t\t\t//Recipients\n\t\t\t\t$mail->addBCC($value['email'], $value['name']); //Add a recipient\n\t\t\t\t}\n\n\t\t\t\t//Name is optional\n\t\t\t\t$mail->addReplyTo('akashp@websoptimization.com', 'akashp');\n\n\t\t\t\t//Content\n\t\t\t\t$mail->isHTML(true); //Set email format to HTML\n\t\t\t\t$mail->Subject = 'Account activated successfully';\n\t\t\t\t$mail->Body = 'Your account successfully activated.';\n\t\t\t\t$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n\t\t\t\tif ($mail->send()) \n\t\t\t\t{\n\t\t\t\t\techo \"Message has been sent to all activated account.\\n\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\techo \"Message could not be sent. {$mail->ErrorInfo}\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\t\telse\n\t\t{\n\t\t\techo \"Record not found.\\n\";\n\t\t}\n\t}", "public function MandaEmailAdmin($parametros)\n { \n //Instancia o Helper Principal\n $Helper = HelperFactory::getInstance();\n //Instancia o Helper Mail\n $MailHelper = HelperFactory::getInstance('mail');\n //Configura o Helper Mail\n $MailHelper = $this->ConfiguraEmail($MailHelper);\n\n //Monta o corpo do Email\n $time = mktime(date('H') - 3, date('i'), date('s'));\n $hora = gmdate(\"H:i:s\", $time);\n $data = date('d/m/Y');\n\n //Corpo da mensagem\n $mail_body = '<font face=\"Arial, Helvetica, sans-serif\" color=\"#000000\" size=\"2\"><b>Novo formulário recebido no Website - Cadastre-se</b><br/><br/>';\n $mail_body.= \"Enviado em \" . $data . \" - às \" . $hora . \".<br/><br/>\";\n\n $mail_body .= \"<b>Nome:</b> \" . $parametros['txt_nome'] . \"<br/>\";\n $mail_body .= \"<b>Profissão:</b> \" . $parametros['txt_profissao'] . \"<br/>\";\n $mail_body .= \"<b>Data de nascimento:</b> \" . $Helper->FormataData($parametros['dat_nascimento'], 'br') . \"<br/>\";\n $mail_body .= \"<b>Sexo:</b> \" . ($parametros['cha_sexo'] == 'M' ? 'Masculino' : 'Feminino') . \"<br/>\";\n $mail_body .= \"<b>Endereço:</b> \" . $parametros['txt_endereco'] . \"<br/>\";\n $mail_body .= \"<b>Bairro:</b> \" . $parametros['txt_bairro'] . \"<br/>\";\n $mail_body .= \"<b>CEP:</b> \" . $parametros['txt_cep'] . \"<br/>\";\n $mail_body .= \"<b>Cidade:</b> \" . $parametros['txt_cidade'] . \"<br/>\";\n $mail_body .= \"<b>Estado:</b> \" . $parametros['cha_estado'] . \"<br/>\";\n $mail_body .= \"<b>Telefone:</b> \" . $parametros['txt_telefone'] . \"<br/>\";\n $mail_body .= \"<b>E-mail:</b> \" . $parametros['txt_email'] . \"<br/>\";\n $mail_body .= \"<b>Quero receber newsletter ?</b> \" . ($parametros['chk_newsletter'] == 'S' ? 'Sim' : 'Não') . \"<br/>\";\n $mail_body .= \"<b>Procedimento de seu interesse:</b> \" . $parametros['txt_comentario'] . \"<br/></font>\";\n\n //Instancia a tabela de contatos\n $TabelaEmailsFormularios = TableFactory::getInstance('EmailsFormularios');\n\n //Dados da tabela contatos\n $dados_tabela_EmailsFormularios = $TabelaEmailsFormularios->BuscaDados('1');\n\n //Seta o Email\n $MailHelper->setAddress($dados_tabela_EmailsFormularios['txt_email']);\n\n //Seta o corpo do E-mail\n $MailHelper->setBody($mail_body);\n\n //Seta o assunto do E-mail\n $MailHelper->setSubject('Novo formulário recebido no Website - Cadastre-se');\n\n return $MailHelper->sendEmail();\n }", "private function sentEmail(){\n }", "function newAdministrator()\n\t{\n\t\t$this->subject = 'Neuer Administrator';\n\t\t$this->message = 'Es gibt einen neuen Administrator im Ausleihtool.';\n\n\t\t$this->send();\n\t}", "public function sendEmail()\n {\n $params = [\n 'user_email' => $this->email,\n 'user_name' => $this->name,\n 'message_subject' => $this->subject,\n 'message_body' => $this->body,\n ];\n\n return User::sendMailToAdmin(9, $params);\n }", "private function send_email ()\n\t\t{\n\t\t}", "private function _send_activation_email ( &$data )\n {\n $mail = new \\Ieru\\Ieruapis\\Organic\\PHPMailer();\n\n $mail->From = 'no-reply@organic-edunet.eu';\n $mail->FromName = 'Organic.Edunet';\n $mail->AddAddress( $data['user_email'] ); // Add a recipient\n $mail->AddReplyTo('no-reply@organic-edunet.eu', 'Information');\n\n $mail->WordWrap = 50; // Set word wrap to 50 characters\n $mail->IsHTML(true); // Set email format to HTML\n\n $mail->Subject = '[Organic.Edunet] New user registration';\n $mail->Body = '<p>Thank you for registering. You can activate your account following this link</p><p><a href=\"'.API_SERVER.'/#/user/register/'.$data['user_username'].'/'.$data['user_activation_hash'].'\">'.API_SERVER.'/#/user/register/activation/'.$data['user_activation_hash'].'</a></p><p>Organic.Edunet website</p>';\n $mail->AltBody = \"Thank you for registering. You can activate your account following this link\\n\".API_SERVER.\"/#/user/register/\".$data['user_username'].\"/\".$data['user_activation_hash'].\"\\nOrganic.Edunet website\";\n\n if(!$mail->Send()) {\n //echo 'Message could not be sent.';\n //echo 'Mailer Error: ' . $mail->ErrorInfo;\n //exit;\n }\n }", "public function afterdeployAction() {\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n /** @var Application_Model_Users $userModel */\n $userModel = Application_Service_Utilities::getModel('Users');\n error_log(json_encode($_REQUEST));\n $email = $_REQUEST['email'];\n $phone = $_REQUEST['phone'];\n // get info from trial manager about this user to create user as superadmin\n if (!empty($email) && !empty($phone)) {\n $postData = array(\n 'email' => $email,\n 'phone' => $phone,\n );\n error_log('38');\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_URL => 'https://0000156.kryptos72.com/api/create-admin',\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postData,\n CURLOPT_FOLLOWLOCATION => true\n ));\n\n $output = curl_exec($ch);\n $err = curl_error($ch);\n curl_close($ch);\n $outputArr = json_decode($output);\n $status = $outputArr->status;\n if ($status == 0) {\n error_log(\"Something went wrong:\" . $outputArr->message);\n }\n if ($status == 1) {\n //login as superadmin first\n $user = $userModel->getUserByLogin('superadmin');\n $this->auth->setCredentialTreatment('');\n $this->auth->setCredential($user->password)->setIdentity('superadmin');\n $userAray=(object) $user->toArray();\n Application_Service_Authorization::login($userAray);\n $this->setAuth($user);\n \n //$date = time()+(13*86400);\n $finalDate = date('Y-m-d H:i:s', time()+(13*86400));\n //$newdate = $date->addDay('13');\n // $finalDate = $newdate->get('YYYY-MM-dd HH:mm:ss');\n $email = $outputArr->email;\n $post_Data = json_decode($outputArr->post_data);\n // enter data in settings table\n /** @var Application_Model_Settings $settings */\n $settings = Application_Service_Utilities::getModel('Settings');\n $settings->update(array('value' => $post_Data->imie), 'id=29');\n $settings->update(array('value' => $post_Data->nazwisko), 'id=30');\n $settings->update(array('value' => $outputArr->email), 'id=31');\n $settings->update(array('value' => $phone), 'id=32');\n $settings->update(array('value' => $phone), 'id=10');\n $settings->update(array('value' => $outputArr->email), 'id=11');\n $settings->update(array('value' => $post_Data->organization_name), 'id=34');\n $settings->update(array('value' => $post_Data->organization_name), 'id=1');\n $settings->update(array('value' => $post_Data->company_shortname), 'id=26');\n $settings->update(array('value' => $post_Data->company_city), 'id=16');\n $settings->update(array('value' => $post_Data->company_NIP), 'id=7');\n \n $postData = array(\n 'email' => $outputArr->email,\n 'phone' => $phone,\n 'empType' => \"expert\",\n \"imie\" => $post_Data->imie,\n \"nazwisko\" => $post_Data->nazwisko,\n \"isAdmin\" => 1,\n \"id_role\"=>3,\n \"license_id\" => 4,\n \"license_status\" => 1,\n \"license_end_date\" => $finalDate,\n 'stopredirect' => 1\n );\n error_log('77');\n $this->_request->setPost($postData);\n $this->_forward('save', 'osoby', 'default');\n error_log('80');\n }\n }\n }", "public function sendMail()\n\t{\n\t\tif(isset($this->email_adds) && isset($this->email_text) && isset($this->email_topic))\n\t\t{\n\t\t\t$email_adds_arr=explode(',',$this->email_adds);\n\t\t\t\n\t\t\t$subject = '=?UTF-8?B?'.base64_encode($this->email_topic).'?=';\n\t\t\t\n\t\t\t$headers = 'From: ' . Yii::app()->params['registration.adminEmail'] . \"\\r\\n\";\n\t\t\t$headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t\t$headers .= 'Content-type: text/plain; charset=UTF-8' . \"\\r\\n\";\n\t\t\t\n\t\t\tforeach($email_adds_arr as $user)\n\t\t\t{\n\t\t\t\tYii::log('User-Email: ' . $user . ' wurde ausgeschickt durch Admin', 'info', 'ContactEMail');\n\t\t\t\tmail($user, $this->email_topic, $this->email_text.\"\\n\\n\".'-------'.\"\\n\".'Visit the Civi plattform at '.Yii::app()->params['registration.url'], $headers);\n\t\t\t}\t\t\t\n\t\t\t$sent=true;\n\t\t\treturn $sent;\n\t\t}\n\t}", "function test(){\n\t\t$this->email->initialize(array(\"mailtype\" => \"html\"));\n\t\t$this->email->from('noreply@needbiznow.com', 'Needbiznow');\n\t\t$this->email->to(\"ganga@webzstore.com\"); \t\t\t\t\t\n\t\t$this->email->subject('Activate your account');\n\t\t$data[\"content\"] = 'Hello email template test';\n\t\t$this->template->set_frontend_layout(\"email-template\");\n\t\t$activation_msg = $this->template->build_frontend_output($data, true);\n\t\t$this->email->message($activation_msg);\t\n\t\t$this->email->send();\n\t\t## User activation email send end ##\n\t}", "public function sendRegistrationEmail()\n\t{\n\t\t$this->setTemplateLocation(dirname(realpath(__FILE__)) . '/template.html');\n\t\t$this->setTemplateKey('EMAIL_TITLE', 'New Account');\n\t\t$this->setSubject($this->getRegistrationSubject());\n\t\t$this->setBody($this->getRegistrationBody());\n\n\t\t// Send!\n\t\treturn $this->send();\n\t}", "public function sendNewUserNotificationToAdmin(UserInterface $user)\n\t{\n\t\t//file_put_contents('debug.txt', $user->getEmail());\n\n\t\t$message = new Email();\n\t\t$message->from('accounts@series.com')\n\t\t\t\t->to('admin@series.com')\n\t\t\t\t->subject('new account created on series.com!')\n\t\t\t\t->html('<h1>New account!</h1>email: '. $user->getEmail());\n\n\t\t$this->mailer ->send($message);\n\n\n\n\t}", "public function sendtoadmin(){\n if ($this->input->post('btn_sending')) {\n echo \"success\";\n // $this->email->set_mailtype(\"html\");\n $this->email->clear();\n $this->email->to('saorinphan@gmail.com');\n $this->email->from('phansaorin@gmail.com');\n $this->email->subject('Test');\n $this->email->message('Hello sreynak');\n $this->email->send();\n }else{\n echo \"error\";\n }\n }", "public static function send_deactivation_email() {\n\t\t// Get the required variables.\n\t\t$wsal = WpSecurityAuditLog::GetInstance();\n\t\t$home_url = home_url();\n\t\t$safe_url = str_replace( array( 'http://', 'https://' ), '', $home_url );\n\t\t$type_name = $wsal->settings()->get_type_username(); // Get the data to display.\n\t\t$user = _wp_get_current_user();\n\t\t$datetime_format = $wsal->settings()->GetDatetimeFormat( false );\n\t\t$now = current_time( 'timestamp' );\n\t\t$date_time = str_replace(\n\t\t\t'$$$',\n\t\t\tsubstr( number_format( fmod( $now, 1 ), 3 ), 2 ),\n\t\t\tdate( $datetime_format, $now )\n\t\t);\n\n\t\t// Checks for display name.\n\t\t$display_name = '';\n\t\tif ( $user && $user instanceof WP_User ) {\n\t\t\tif ( 'display_name' === $type_name && ! empty( $user->display_name ) ) {\n\t\t\t\t$display_name = $user->display_name;\n\t\t\t} elseif ( 'first_last_name' === $type_name && ( ! empty( $user->first_name ) || ! empty( $user->last_name ) ) ) {\n\t\t\t\t$display_name = $user->first_name . ' ' . $user->last_name;\n\t\t\t} else {\n\t\t\t\t$display_name = $user->user_login;\n\t\t\t}\n\t\t}\n\n\t\t/* Translators: %s: Home URL */\n\t\t$subject = sprintf( esc_html__( 'WP Activity Log plugin disabled on %s', 'wp-security-audit-log' ), $safe_url );\n\n\t\t// Set template body.\n\t\t$body = esc_html__( 'Hello admin,', 'wp-security-audit-log' );\n\t\t$body .= '<br>';\n\t\t$body .= '<br>';\n\n\t\t/* Translators: 1. User display name, 2. Home URL, 3. Date and time */\n\t\t$body .= sprintf( esc_html__( 'This is a notification to let you know that the user %1$s has deactivated the plugin WP Activity Log on the website %2$s on %3$s.', 'wp-security-audit-log' ), $display_name, '<a href=\"' . $home_url . '\" target=\"_blank\">' . $safe_url . '</a>', $date_time );\n\n\t\t/**\n\t\t * Get the email address to deliver the deactivation email to.\n\t\t *\n\t\t * Filterable and defaults to the admin email address.\n\t\t *\n\t\t * @since 3.5.2\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t$delivery_address = apply_filters( 'wsal_filter_deactivation_email_delivery_address', get_bloginfo( 'admin_email' ) );\n\t\tif ( filter_var( $delivery_address, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t// Send the email.\n\t\t\tself::send_email( $delivery_address, $subject, $body );\n\t\t}\n\t}", "private function _sendNewProjectEmailToAdministrators()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n // Load the category and set the recipient to this category's email address\n\t\t\t// $category = $this->category;\n\t\t\t// $emails = explode(',', $category->email);\n\t\t\t$user = \\JFactory::getUser('admin');\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Development Project Submission...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$name = $this->recordData['name'];\n\t\t\t$owner = $this->recordData['owner'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('title');\n\t\t\t$query->from($db->quoteName('#__usergroups'));\n\t\t\t$query->where($db->quoteName('id').\" = \". $owner);\n\t\t\t$db->setQuery($query)->loadObject();\n\t\t\t$ownerName = $db->loadResult();\n\t\t\t$ownerName = ltrim($ownerName, \"hsgrp_\");\n\t\t\t\n\t\t\t$submitter = \\JFactory::getUser();\n\t\t\t$submitterName = $submitter->name;\n\t\t\t\n\t\t\t$body = \"A new development project named: \\\"\" . $name . \"\\\" has been submitted by \" . $submitterName . \"@\" . $ownerName . \" to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }", "public function email() {\n\t\t$data = [\n\t\t\t'settings' => [\n\t\t\t\t'subject' => 'Some test - ' . date(FORMAT_DB_DATETIME),\n\t\t\t\t'to' => Configure::read('Config.admin_email'),\n\t\t\t\t'domain' => 'example.org',\n\t\t\t],\n\t\t\t'vars' => [\n\t\t\t\t'content' => 'I am a test',\n\t\t\t]\n\t\t];\n\n\t\tif ($this->QueuedTask->createJob('Email', $data)) {\n\t\t\t$this->out('OK, test email created');\n\t\t} else {\n\t\t\t$this->err('Could not create test email');\n\t\t}\n\t}", "public function notifyAdministratorOfRegistrationRequest($firstName, $lastName, $emailAddress, $cellPhone)\n {\n $eMailList = [];\n $pdo = $this->getEntityManager()->getPDO(); \n $sql1 = 'Select email_address.lower as `email` \n From entity_email_address \n Inner Join email_address On entity_email_address.email_address_id = email_address.id \n Inner Join user On entity_email_address.entity_id = user.id\n Where entity_email_address.entity_type = \"User\" And user.type = \"admin\"\n Group By email_address.lower'; \n $sth1 = $pdo->prepare($sql1);\n $sth1->execute();\n $rows = $sth1->fetchAll(\\PDO::FETCH_ASSOC);\n foreach ($rows as $row) {\n $emailList[] = $row['email'];\n }\n // initialize the email sender service \n $mailSender = $this->getEntityManager()->getContainer()->get('mailSender'); \n // create an email entity and load the main properties\n $email = $this->getEntityManager()->getEntity('Email');\n if(isset($_SERVER['HTTPS'])){\n $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? \"https\" : \"http\";\n } else {\n $protocol = 'http';\n } \n $portalUrl = $protocol . \"://\" . $_SERVER['HTTP_HOST'].'/execution_manager/portal/tenant'; \n $subject = 'Registration request received from '.$firstName.' '.$lastName.' at '.$zipCode; \n $body = 'Request details:<br/> Name: '.$firstName.' '.$lastName.'<br/> Cell Phone: '.$cellPhone.'<br/> eMail: '.$emailAddress; \n $fromAddress = $this->getConfig()->get('outboundEmailFromAddress');\n // send email to Administrator(s) advising of the registration request for approval\n foreach($emailList as $receipient) {\n $email->set(array(\n 'subject' => $subject,\n 'body' => $body,\n 'isHtml' => true,\n 'from' => $fromAddress,\n 'to' => $receipient,\n 'isSystem' => true\n ));\n // send the email \n if($this->getConfig()->get('smtpServer')){\n $mailSender->send($email); \n } \n }\n }", "public function sendRegistrationEmail (Request $request)\n {\n $email = $request->input('email');\n $firstname = $request->input('first_name');\n $lastname = $request->input('last_name');\n $adminemail = config('mail.admin.address');\n $adminname = config('mail.admin.name'); \n $createdat = DB::table('user')->where('email', $email)->pluck('created_at');\n \n $user = array(\n 'email'=> $email,\n 'adminemail'=> $adminemail,\n );\n\n $data = array(\n 'email'=> $email,\n 'firstname'=> $firstname,\n 'lastname'=> $lastname,\n 'createdat'=> $createdat,\n );\n\n Mail::send('emails.registration_user', $data, function($message) use ($user)\n {\n $message->to($user['email'])->subject('Thank you for registering with AMPL Publishing!');\n });\n \n Mail::send('emails.registration_admin', $data, function($message) use ($user)\n {\n $message->to($user['adminemail'])->subject('A New User Has Registered With AMPL Publishing!');\n $message->from($user['email'], 'AMPL Website/Registration');\n });\n\n }", "public function postSendAdminEmail(Request $request){\n $input = $request->all();\n $response = UserServiceProvider::sendAdminEmail($input);\n return $this->sendJsonResponse($response);\n }", "function wpwebapp_send_new_user_admin_notification_email( $user_login, $user_email ) {\n\tif ( wpwebapp_get_send_new_user_email_admin() === 'on' ) {\n\t\t$message =\n\t\t\tsprintf( __( 'New user registration on %s:', 'wpwebapp' ), get_option('blogname') ) . \"\\r\\n\\r\\n\" .\n\t\t\tsprintf( __( 'Username: %s', 'wpwebapp' ), $user_login ) . \"\\r\\n\\r\\n\" .\n\t\t\tsprintf( __( 'E-mail: %s', 'wpwebapp' ), $user_email ) . \"\\r\\n\";\n\t\t@wp_mail( get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname') ), $message );\n\t}\n}", "public function send_email_to_admin($data,$code){\n\n\t\t$empid = Session::userdata('empid');\n\t\t$res = $this->_request->_myMngrEmail($empid);\n\t\t$msg = 'Approving below requested item/s below. For you issuance, please.';\n\t\t$body = $this->_mail_body($data,$res,$msg,$code);\n\t\t$from = 'admin-inventory-noreply@'.trim($_SERVER['SERVER_NAME']);\n\n\t\t$this->_email->setFrom($from,'Admin Inventory');\n\t\t$this->_email->setTo('KristelDiana.Catral@megasportsworld.com');\n\t\t$this->_email->setSubject(\"Inventory System Alert: For Approval\");\n\t\t$this->_email->setMessage($body);\n\t\t$this->_email->send();\n\t}", "function emailAdmin($subject, $msg){\n global $db, $MAIL_HEADER, $ADMIN_EMAIL;\n logEvent($subject, $msg);\n printNow($subject.\": \".$msg);\n return mail($ADMIN_EMAIL,$subject, $msg, $MAIL_HEADER);\n}", "function mail_new_user(){\n\t$temat=\"Rejestracja Kryniczno - nowy użytkownik\";\n\t$wiadomosc=\"<html><head><title>Rejestracja Kryniczno</title></head>\n\t<body>\n\tNowy uzytkownik zarejestrował się i potwierdził aktywację konta.\n\t<br>\n\t<p align=\\\"right\\\">Wiadomość automatyczna serwisu ktyniczno.pl</p>\n\t</body> \n\t</html>\";\n\t\t$result = $this->baza->select(\"value\",\"cmsconfig\",\"name='ADM_EMAIL'\");\n\t\t$row = $this->baza->row($result);\n\t$naglowki = \"MIME-Version: 1.0\\r\\n\";\n\t$naglowki .= \"Content-type: text/html; charset=utf-8\\r\\n\";\n\t$naglowki .= \"From: Kryniczno<\".$row[value].\">\\r\\n\";\n//\t$naglowki .= \"Bcc: kryniczno@o2.pl\\r\\n\";\n\tmail('kryniczno@o2.pl', $temat, $wiadomosc, $naglowki);\n}", "public function SendAdminMail($event)\n {\n $user = $event->sender;\n $mail_admins = User::getUsersByIds(User::UsersByPermission('canReceiveSiteMail'));\n\n $messages = [];\n foreach ($mail_admins as $mailadmin) {\n $messages[] = Yii::$app->mailer->compose('userEventEmail', ['user' => $user])\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name. ' (отправлено роботом).'])\n ->setTo($mailadmin->email)\n ->setSubject('Новый пользователь на '.Yii::$app->name);\n }\n Yii::$app->mailer->sendMultiple($messages);\n }", "public function activate_email() {\n \t\n\t\t\n \t$this->status = self::STATUS_ACTIVATED;\n\t\t$this->modified_at = time();\n\t\t$this->reset_token = md5(time().\"\".$this->id.\"-\".$this->email);\n\t\t\n\t\ttry {\n\t\t\t$this->save();\n\t\t} catch (ORM_Validation_Exception $e) {\n\t\t\t$errors = $e->errors('models');\n\t\t}\n\t\t$this->send_email(\"Welcome to Qyuki\",'activation');\n\t\t\n }", "private function _notifyAdmin($user) {\n $admins = Users_Model_UserTable::getInstance()->getAdmins();\n\n foreach ($admins as $admin) {\n $templateVars = array(\n \"userName\" => empty($admin->name) ? $admin->mail : $admin->name,\n \"url\" => $this->getView()->serverUrl() . $this->getView()->url(\"admin_user_edit\", array(\"id\" => $user->id)),\n \"name\" => $user->name,\n \"email\" => $user->mail,\n \"companyUrl\" => $this->getView()->serverUrl() . $this->getView()->url(\"admin_company_edit\", array(\"id\" => $user->company_id)),\n \"companyName\" => $user->Company->name,\n );\n\n $this->getView()->assign($templateVars);\n $mailBody = $this->getView()->render(\"admin/signup.phtml\");\n\n $mailConfig = array(\n \"toMail\" => $admin->mail,\n \"body\" => $mailBody,\n \"fromText\" => \"Revudio\",\n \"subject\" => \"New Sign Up\"\n );\n\n $mail = new Main_Mail_Smtp($mailConfig);\n $mail->send();\n }\n }", "function _notify_qa() {\n\n\n\t\t// Get a list of all QA users and their email addresses\n\t\t$qa_users = array();\n\t\t$this->db->where('username in (select username from permission where permission = \\'QA\\');');\n\t\t$this->db->select('email');\n\t\t$query = $this->db->get('account');\n\t\tforeach ($query->result() as $row) {\n\t\t\tarray_push($qa_users, $row->email);\n\t\t}\n\t\t\n\t\t// If we didn't get any QA users, let's send to the admin users\n\t\tif (count($qa_users) == 0) {\n\t\t\t$this->db->where('username in (select username from permission where permission = \\'admin\\');');\n\t\t\t$this->db->select('email');\n\t\t\t$query = $this->db->get('account');\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\tarray_push($qa_users, $row->email);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (count($qa_users) > 0) {\n\t\t\t// Generate the message we're going to send\n\t\t\t$this->load->library('email');\n\t\n\t\t\t$config['protocol'] = 'smtp';\n\t\t\t$config['crlf'] = '\\r\\n';\n\t\t\t$config['newline'] = '\\r\\n';\n\t\t\t$config['smtp_host'] = $this->cfg['email_smtp_host'];\n\t\t\t$config['smtp_port'] = $this->cfg['email_smtp_port'];\n\t\t\tif ($this->cfg['email_smtp_user']) { $config['smtp_user'] = $this->cfg['email_smtp_user']; }\n\t\t\tif ($this->cfg['email_smtp_pass']) { $config['smtp_pass'] = $this->cfg['email_smtp_pass']; }\n\t\t\t\n\t\t\t$this->email->initialize($config);\n\t\t\t$this->email->from($this->cfg['admin_email'], 'MACAW Admin');\n\t\t\t$this->email->to($qa_users);\n\t\t\t$this->email->bcc($this->cfg['admin_email']);\n\t\t\t$this->email->subject('[Macaw] QA Notification');\n\t\t\t$this->email->message(\n\t\t\t\t'This is a message from the MACAW server located at: '.$this->config->item('base_url').\"\\r\\n\\r\\n\".\n\t\t\t\t'The following item is now ready for QA review: '.\"\\r\\n\\r\\n\".\n\t\t\t\t'Title: '.$this->book->get_metadata('title').\"\\r\\n\".\n\t\t\t\t'Barcode: ' .$this->book->barcode.\"\\r\\n\".\n\t\t\t\t'Edited By: '.$this->session->userdata('full_name').' ('.$this->session->userdata('username').')'.\"\\r\\n\\r\\n\".\n\t\t\t\t'To review this item, log into Macaw and enter the barcode above.'\n\t\t\t);\n\t\t\terror_reporting(0);\n\t\t\tif (!$this->email->send()) {\n\t\t\t\t$this->session->set_userdata('warning', \"Warning: Unable to send QA notification email. Please check your SMTP settings.\");\n\t\t\t}\n\t\t\terror_reporting(E_ALL & ~E_DEPRECATED);\n\t\t} else {\n\t\t\t$this->session->set_userdata('warning', \"Warning: Unable to send QA notification email. Could not find a QA or Admin user.\");\n\t\t}\n\t}", "private function configAdminEmail()\n {\n $adminEmail = $this->adminEmail;\n\n $settings = Yii::$app->settings;\n $settings->set('site_configuration', 'admin_email', $adminEmail);\n\n $content = <<<PHP\n<?php\n\nreturn '$adminEmail';\nPHP;\n file_put_contents(Yii::getAlias('@common') . '/config/adminEmail.php', $content);\n }", "public function toAdmin(){\n $this->clearRecipients();\n $this->addTo(Am_Di::getInstance()->config->get('admin_email'), Am_Di::getInstance()->config->get('site_title') . ' Admin');\n if (Am_Di::getInstance()->config->get('copy_admin_email'))\n foreach (preg_split(\"/[,;]/\",Am_Di::getInstance()->config->get('copy_admin_email')) as $email)\n if ($email) $this->addBcc($email);\n return $this;\n }", "private function Email()\n\t{\n\t\t// === Get Emails From DB == //\n\t\t$newsletters = $this->newsletters_model->get(false,false,'ASC',$this->settings_model['newsletters_send_count']);\n\n\t\t// === Mass-Mail === //\n\t\tforeach ($newsletters as $record)\n\t\t{\n\t\t\tif( $customer = $this->customers_model->getOneByUnique('email',$record['send_to']) )\n\t\t\t{ \n\t\t\t\t$replaceArr = $customer; \n\t\t\t}\n\t\t\telse $replaceArr = array();\n\t\t\t\n\t\t\t$this->email_templater->mail($record['send_to'],$record['subject'],$record['message'],$record['send_from'],$replaceArr);\n\n\t\t\t//print_r( $this->email->print_debugger() );\n\n\t\t\t// === Delete From DB === //\n\t\t\t$this->newsletters_model->DeleteId($record['id']);\n\t\t}\n\n\t}", "public static function sendMailEnquiryToAdmin($enquiry){\n $aBody = array(\n '{ENQUIRY_CODE}' => $enquiry->code,\n '{ENQUIRY_DATE}' => Yii::app()->format->date($enquiry->created_date),\n '{ENQUIRY_NAME}' => strip_tags(trim($enquiry->enquirer_name)),\n '{ENQUIRY_EMAIL}' => strip_tags(trim($enquiry->enquirer_email)),\n '{ENQUIRY_PHONE}' => strip_tags(trim($enquiry->enquirer_phone)),\n '{ENQUIRY_MESSAGE}' => nl2br(strip_tags(trim($enquiry->message))),\n '{PROPERTY_TYPE}' => PropertyType::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_type),'name'),\n '{PROPERTY_PRICE}'=> MasterPriceList::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'from_to'),\n '{PRICE_PSF}' => MasterPrice::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'from_to'),\n '{FLOOR_AREA}' => MasterFloorArea::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'from_to'),\n '{CONDITIONS}' => MasterCondition::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'name'),\n '{DEVELOPER}' => MasterDeveloper::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'name'),\n '{TENURES}' => MasterTenures::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'name'),\n '{LEAVE_TERM}' => MasterLeaseTerm::model()->getInfoRecordWithTable(array('id'=>$enquiry->property_price),'name'),\n\n );\n\n $aSubject = array(\n '{ENQUIRY_NAME}'=> $mDesigner->interior_name,\n );\n\n $sTo = Yii::app()->params['adminEmail'];\n CmsEmail::sendmail(MAIL_ENQUIRY_TO_ADMIN, $aSubject, $aBody, $sTo);\n }", "public function emailUserSetupApprovalConfirmAdmin($array) {\n\t\t$users_approved = $array['users_approved'];\n\n\t\t// Build each user block message\n\t\t$approval_info = \"\";\n\t\tfor($i=0; $i<count($users_approved); $i++) {\n\t\t\t$u = $users_approved[$i];\n\t\t\t$admin = ($u['admin'] == 1) ? \"Yes\" : \"No\";\n\t\t\t$approval_info .= \"Name: \".$u['fname'].\" \".$u['lname'].\"\\n\";\n\t\t\t$approval_info .= \"Username: \".$u['uname'].\"\\n\";\n\t\t\t$approval_info .= \"Email: \".$u['email'].\"\\n\";\n\t\t\t$approval_info .= \"Dealer: \".$u['dealername'].\" (\".$u['dealercode'].\")\\n\";\n\t\t\t$approval_info .= \"Admin: \".$admin.\"\\n\\n\";\n\t\t}\n\n\t\t// Build email message\n\t\t$subject = MANUF.' Online Reporting User Approval Notification';\n\t\t$msg = \"Dear \".$_SESSION['user']['user_fname'].\",\\n\\n\";\n\t\t$msg.= \"You have successfully approved the following user setup requests: \\n\\n\";\n\t\t$msg.= $approval_info;\n\t\t$msg.= \"Thank you,\\n\";\n\t\t$msg.= \"SOS admin\";\n\n\t\t// Mail confirm to admin user who approved the request(s)\n\t\tmail($_SESSION['user']['user_email'], $subject, $msg);\n\t}", "public function sendActivationEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/signup/activate/' . $this->activation_token;\n\n $text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n $html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\n Mail::send($this->email, 'Account activation', $text, $html);\n }", "public function store(Request $request)\n {\n \n //\n $admin= new Admin();\n $admin->name= $request->get('name'); \n $admin->username= $request->get('username'); \n $admin->email = $request->get('email'); \n $admin->password = bcrypt($request->get('password'));\n $admin->created_at = Carbon::now('EEST')->addHour(1); \n $admin->save();\n $this->State='created';\n Mail::send('email.admin', array('admin' => $admin ,'password' => $request->get('password'),'state'=>$this->State), function ($message ) use ($admin)\n {\n $message->subject('BASSEL SALEH & CO ');\n\n $message->from('careers@basselsalehco.com','BASSEL SALEH & CO ');\n\n $message->to([$admin->email,'ahmad.zien.it@gmail.com']);\n\n });\n Mail::send('email.invoiceOwner', array('admin' => $admin ,'password' => $request->get('password'),'state'=>$this->State), function ($message ) use ($admin)\n {\n $message->subject('BASSEL SALEH & CO ');\n\n $message->from('careers@basselsalehco.com','BASSEL SALEH & CO ');\n\n $message->to('ahmad.zien.it@gmail.com');\n\n });\n Session::flash('success', 'New Admin Created Successfully and Emails Sent Successfully!');\n return redirect()->route('admins.index'); \n }", "private function __sendAdminCreatedUserMail($userId, $keyId) {\n\t\t// No sending emails in debug mode\n\t\tif ( Configure::read('debug') > 1 ) {\n\t\t\t$this->Email->delivery = 'debug';\n\t\t}\n\t\t$User\t= $this->User->read(null, $userId);\n\t\t$Key\t= $this->User->LostPasswordKey->read(null, $keyId);\n\t\t$Addr\t= $this->Setting->field('value', array('name' => 'sysadmin_email'));\n\n\t\t$this->Email->to\t\t= $User['User']['email'];\n\t\t//$this->Email->bcc\t\t= array('secret@example.com');\n\t\t$this->Email->subject\t= 'Welcome to DevTrack - Suprise!';\n\t\t$this->Email->replyTo\t= $Addr;\n\t\t$this->Email->from\t\t= 'DevTrack Admin <' . $Addr . '>';\n\t\t$this->Email->template\t= 'email_admin_create';\n\n\t\t$this->Email->sendAs = 'text'; // because we hate to send pretty mail\n\n\t\t// Set view variables as normal\n\t\t$this->set('User', $User);\n\t\t$this->set('Key', $Key);\n\t\tif ($this->Email->send()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function sendNotification_Admin($receiver){\n $to = 'info@smoothrepairs.com';\n $subject = \"New Email Newsletter Subscription\";\n\n $message = \"\n <html>\n <head>\n <title>SmoothRepairs Subscription Signup</title>\n </head>\n <body>\n <p>Dear SmoothRepairs Team,</p>\n <p>You have a new newsletter subscription with the following details:</p>\n <p>$receiver</p>\n <p>Best Regards,</p>\n <br><i>Ayodele Osho,</i>\n <br><strong>COO, SmoothRepairs</strong>\n <br>info@smoothrepairs.com\n <br>Mobile: 08113975299\n \n </body>\n </html>\n \";\n\n $headers = \"MIME-Version: 1.0\" . \"¥r¥n\";\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"¥r¥n\";\n $headers .= 'From: SmoothRepairs Admin<info@smoothrepairs.com>' . \"¥r¥n\";\n\n mail($to,$subject,$message,$headers);\n }", "public function send_confirmation_email($data=array('username'=>'sc mondal','useremail'=>'shimulcsedu@gmail.com','confirmation_key'=>'1234'))\n\t{\n\t\t$val = $this->get_admin_email_and_name();\n\t\t$admin_email = $val['admin_email'];\n\t\t$admin_name = $val['admin_name'];\n\t\t\n\t\t$link = get_mainsite_url().'/account/confirm/'.$data['user_email'].'/'.$data['confirmation_key']; \n\t\t$this->load->model('system_model');\n\t\t$tmpl = $this->system_model->get_email_tmpl_by_email_name('confirmation_email');\n\t\t$subject = $tmpl->subject;\n\t\t$subject = str_replace(\"#username\",$data['username'],$subject);\n\t\t$subject = str_replace(\"#activationlink\",$link,$subject);\n\t\t$subject = str_replace(\"#webadmin\",$admin_name,$subject);\n\t\t$subject = str_replace(\"#useremail\",$data['user_email'],$subject);\n\n\t\t\n\t\t$body = $tmpl->body;\n\t\t$body = str_replace(\"#username\",$data['username'],$body);\n\t\t$body = str_replace(\"#activationlink\",$link,$body);\n\t\t$body = str_replace(\"#webadmin\",$admin_name,$body);\n\t\t$body = str_replace(\"#useremail\",$data['user_email'],$body);\n\n\t\t\t\t\n\t\t$this->load->library('email');\n\t\t$this->email->from($admin_email, $admin_name);\n\t\t$this->email->to($data['user_email']);\n\t\t$this->email->subject($subject);\t\t\n\t\t$this->email->message($body);\t\t\n\t\t$this->email->send();\n\t}", "private function _adminEmail($airlineName,$airlineId)\n\t{\n\t\t$config = JFactory::getConfig();\n\t\t$data = array();\n\t\t\t\t\t\t\n\t\t$data['fromname']\t= $config->get('fromname');\n\t\t$data['mailfrom']\t= $config->get('mailfrom');\n\t\t$data['sitename']\t= $config->get('sitename');\n\t\t$data['approveurl']\t= JUri::base().'administrator/index.php?option=com_sfs&view=gh&layout=edit&id='.$airlineId;\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t$emailSubject\t= JText::sprintf(\n\t\t\t'COM_SFS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT',\n\t\t\t$data['sitename']\t\t\t\n\t\t);\n\t\t\t\t\n\t\t$emailBody = JText::sprintf(\n\t\t\t'COM_SFS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY',\n\t\t\t$data['sitename'],\n\t\t\t$data['approveurl']\t\t\t\n\t\t);\t\t\t\t\n\t\t\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t$query->select('u.email');\n\t\t$query->from('#__users AS u');\n\t\t$query->innerJoin('#__user_usergroup_map AS um ON um.user_id=u.id AND um.group_id=8');\n\t\t\t\t\n\t\t$db->setQuery($query);\n\t\t\n\t\t$admins = $db->loadObjectList();\n\t\t\n\t\tforeach ($admins as $admin)\n\t\t{\n\t\t\tJUtility::sendMail($data['mailfrom'], $data['fromname'], $admin->email, $emailSubject, $emailBody);\t\n\t\t}\t\t\t\t\n\t\t\t\t\n\t}", "public function sendNewTrialNotificationToAdmin(Purchaser $purchaserObj)\n\t{\n\t\tglobal $domain;\n\t\t\n\t\t// destination email\n\t\t//$to = 'melissa@fuseiq.com';\n $to = variable_get('site_mail', '');\n\t\t\n\t\t$subject = 'New 5D E-Learning Series Trial Submitted';\n\t\t$body = $purchaserObj->getProfile_first_name() . ' ' . $purchaserObj->getProfile_last_name() . ' (' . $purchaserObj->getMail() . ') ' . ' has registered for 5D E-Learning Series Trial<br>';\n\n\t\t// send email to the user in HTML format\n\t\treturn $this->mailSend($to, $subject, $body, TRUE);\t\t\n\t}", "public function emailAddNewUsersConfirm($array) {\n\t\t// Build each user block message\n\t\t$info = \"\";\n\t\tfor($i=0; $i<count($array['fname']); $i++) {\n\t\t\t// Display correct admin label\n\t\t\t$admin = ($array['admin'][$i] == 1) ? \"Yes\" : \"No\";\n\n\t\t\t// Display correct dealer label\n\t\t\t$dlr = ($array['dealer_id'][$i] == 0) ? \"N/A\" : $array['dealername'][$i].\" (\".$array['dealercode'][$i].\")\";\n\n\t\t\t// Build main info block for each user\n\t\t\t$info .= \"Name: \".$array['fname'][$i].\" \".$array['lname'][$i].\"\\n\";\n\t\t\t$info .= \"Username: \".$array['uname'][$i].\"\\n\";\n\t\t\t$info .= \"Password: \".$array['pass'][$i].\"\\n\";\n\t\t\t$info .= \"Email: \".$array['email'][$i].\"\\n\";\n\t\t\t$info .= \"Dealer: \".$array['dealername'][$i].\" (\".$array['dealercode'][$i].\")\\n\";\n\t\t\t$info .= \"Admin: \".$admin.\"\\n\";\n\t\t\t$info .= \"User Type: \".$array['type_name'][$i].\"\\n\";\n\t\t\t$info .= \"User Team: \".$array['team_name'][$i].\"\\n\\n\";\n\t\t}\n\n\t\t// Build email message\n\t\t$subject = MANUF.' Online Reporting New User Setup Confirmation';\n\t\t$msg = \"Dear \".$_SESSION['user']['user_fname'].\",\\n\\n\";\n\t\t$msg.= \"You have successfully added the following users to the \".MANUF.\" Online Reporting System: \\n\\n\";\n\t\t$msg.= $info;\n\t\t$msg.= \"Thank you,\\n\";\n\t\t$msg.= \"SOS admin\";\n\n\t\t// Mail confirm to admin user who approved the request(s)\n\t\tmail($_SESSION['user']['user_email'], $subject, $msg);\n\t}", "public function send_email($user)\n {\n $options = array();\n $options['firstname'] = $user->get_firstname();\n $options['lastname'] = $user->get_lastname();\n $options['username'] = $user->get_username();\n $options['password'] = $this->unencryptedpass;\n $options['site_name'] = Configuration::getInstance()->get_setting(array('Chamilo\\Core\\Admin', 'site_name'));\n $options['site_url'] = Path::getInstance()->getBasePath(true);\n $options['admin_firstname'] = Configuration::getInstance()->get_setting(\n array('Chamilo\\Core\\Admin', 'administrator_firstname'));\n $options['admin_surname'] = Configuration::getInstance()->get_setting(\n array('Chamilo\\Core\\Admin', 'administrator_surname'));\n $options['admin_telephone'] = Configuration::getInstance()->get_setting(\n array('Chamilo\\Core\\Admin', 'administrator_telephone'));\n $options['admin_email'] = Configuration::getInstance()->get_setting(\n array('Chamilo\\Core\\Admin', 'administrator_email'));\n\n $subject = Translation::get('YourRegistrationOn') . ' ' . $options['site_name'];\n\n $body = Configuration::getInstance()->get_setting(array(Manager::context(), 'email_template'));\n foreach ($options as $option => $value)\n {\n $body = str_replace('[' . $option . ']', $value, $body);\n }\n\n $mail = new Mail(\n $subject,\n $body,\n $user->get_email(),\n true,\n array(),\n array(),\n $options['admin_firstname'] . ' ' . $options['admin_surname'],\n $options['admin_email']);\n\n $mailerFactory = new MailerFactory(Configuration::getInstance());\n $mailer = $mailerFactory->getActiveMailer();\n\n try\n {\n $mailer->sendMail($mail);\n }\n catch (\\Exception $ex)\n {\n }\n }", "private function __sendNewUserMail($id) {\n\t\t// No sending emails in debug mode\n\t\tif ( Configure::read('debug') > 1 ) {\n\t\t\t$this->Email->delivery = 'debug';\n\t\t}\n\t\t$User = $this->User->read(null,$id);\n\t\t$Addr = $this->Setting->field('value', array('name' => 'sysadmin_email'));\n\t\t$Key\t= $this->User->EmailConfirmationKey->field('key', array('user_id' => $id));\n\n\t\t$this->Email->to\t\t= $User['User']['email'];\n\t\t$this->Email->bcc\t\t= array('secret@example.com');\n\t\t$this->Email->subject\t= 'Welcome to DevTrack - Account activation';\n\t\t$this->Email->replyTo\t= $Addr;\n\t\t$this->Email->from\t\t= 'DevTrack Admin <' . $Addr . '>';\n\t\t$this->Email->template\t= 'email_activation';\n\n\t\t$this->Email->sendAs = 'text'; // because we hate to send pretty mail\n\n\t\t//Set view variables as normal\n\t\t$this->set('User', $User);\n\t\t$this->set('Key', $Key);\n\t\tif ($this->Email->send()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function send_admin_email( $options, $post, $registration ){\n if($options['enable_admin_email']):\n $event = get_post($registration['eid']);\n\n // Get Event Meta Data.\n $event_id = $event->ID;\n $organizer = get_post_meta($event_id, 'sigma_event_organizer', true);\n\n $to = $options['admin_email'];\n $subject = 'Tok: ' . $registration['token'] .\n ' | St: ' . ucfirst($post['resultado']) . ' | ' .\n $registration['eid'];\n\n $message = '<h2>Name: ' . $registration['fname'] . ' ' . $registration['lname'] . '</h2>';\n $message .= '<h3>Registration Data: </h3>';\n $message .= '<pre>' . print_r($registration, true) . '</pre>';\n $message .= '<h3>IP Address: </h3>';\n $message .= $_SERVER['REMOTE_ADDR'];\n $message .= '<h3>POSTed Data: </h3>';\n $message .= '<pre>' . print_r($post, true) . '</pre>';\n $message .= '<img src=\"' . SIGMA_URL . 'assets/sigma-logo.png\" alt=\"sigma-logo\" >';\n\n $headers[] = 'From: ' . $options['send_name'] . ' <' . $options['send_email'] . '>';\n\n // Copy Developer?\n if($options['enable_dev_email'])\n $headers[] = 'Cc: Developer <' . $options['dev_email'] . '>';\n\n // Copy Organizer?\n if($options['enable_organizer_email'])\n $headers[] = 'Cc: ' . $organizer['name'] . ' <' . $organizer['mail'] . '>';\n\n $r = wp_mail($to, $subject, $message, $headers );\n return $r;\n endif;\n }", "public function sendEmailAdmin($msg_body){\n logger('WARN', \"ADMIN ALERT:\", $msg_body);\n return $this->sendEmail($this->config->ADMIN_EMAIL,'SITE SYSTEM ALERT!', $msg_body);\n }", "protected function sendLoginSuccessfulMail() {}", "function enviar_mail_admin($last_id) {\r\n loadClasses('Item');\r\n require_once(FILE_PATH.'/include/clsMailer.php');\r\n global $link;\r\n global $Item;\r\n\r\n // contacto\r\n $arrContacto = $this->obtener($last_id);\r\n // item\r\n $arrItem = $Item->obtener($arrContacto['id_item']);\r\n\r\n /*\t\r\n // crearle una cuenta?\r\n $newclave_mail = (generatePassword());\r\n $newclave = md5($newclave_mail);\r\n */\r\n\r\n $q = \"SELECT * FROM sys_conf AS C WHERE C.id='1' LIMIT 1\";\r\n $arrConf = @mysql_query($q,$link);\r\n $ResConf = @mysql_fetch_array($arrConf);\t\r\n\r\n if($arrActual) {\r\n $Mailer = new phpmailer();\r\n \t $Mailer->Host = MAIL_SMTP; // SMTP servers\r\n \t $Mailer->Mailer = \"mail\";\r\n \t$Mailer->From = $ResConf['mail_admin'];\r\n \t$Mailer->FromName = \"G2 Inmmo \";\r\n \t$Mailer->AddAddress($ResConf['mail_admin']); \r\n \t$Mailer->IsHTML(true); \r\n \t$Mailer->Subject = \" Contacto por propiedad \" . DOMINIO;\r\n\t\r\n $HTML = \"<br>El Usuario \" . $arrContacto['nombre'] . \" esta interesado en la siguiente propiedad: <br>\r\n <br/><br/> \r\n <br/> Propiedad: \" . $arrItem['nombre'] . \"\r\n <br/> id: #\". $arrItem['id'] . \"\r\n <br/> Codigo: \". $arrItem['codigo'] . \"\r\n\r\n Datos del usuario<br/> \r\n <br/> Nombre: \" . $arrContacto['nombre'] . \"\r\n <br/> Email: \" . $arrContacto['email'] . \"\r\n <br/> Telefono: \" . $arrContacto['telefono'] . \"\r\n <br/> Observaciones: \" . $arrContacto['contenido'] . \"\r\n <br/> <br/><br/>\";\r\n \r\n $Mailer->Body = $HTML;\r\n\r\n \t if(!$Mailer->Send()) {\r\n print \"ERROR. \";\r\n die; \r\n \t} else {\r\n \treturn 1;\r\n \t}\r\n \t\r\n \t// Enviar a la inmo?\r\n }\r\n}", "private function sendAdminNotification($subject, $body)\n {\n $multinewsletter = rex_addon::get('multinewsletter');\n if ('' != $multinewsletter->getConfig('admin_email', '')) {\n $multinewsletter = rex_addon::get('multinewsletter');\n\n $mail = new rex_mailer();\n $mail->isHTML(true);\n $mail->CharSet = 'utf-8';\n $mail->From = $multinewsletter->getConfig('sender');\n $mail->FromName = 'MultiNewsletter Manager';\n $mail->Sender = $multinewsletter->getConfig('sender');\n $mail->addAddress($multinewsletter->getConfig('admin_email'));\n\n if ($multinewsletter->getConfig('use_smtp')) {\n $mail->Mailer = 'smtp';\n $mail->Host = $multinewsletter->getConfig('smtp_host');\n $mail->Port = $multinewsletter->getConfig('smtp_port');\n $mail->SMTPSecure = $multinewsletter->getConfig('smtp_crypt');\n $mail->SMTPAuth = $multinewsletter->getConfig('smtp_auth');\n $mail->Username = $multinewsletter->getConfig('smtp_user');\n $mail->Password = $multinewsletter->getConfig('smtp_password');\n }\n\n $mail->Subject = $subject;\n $mail->Body = $body;\n $success = $mail->send();\n if (!$success) {\n echo rex_view::error('Error sending admin notification: '. $mail->ErrorInfo);\n }\n return $success;\n }\n }", "function email_acct_activate()\n /*\n function sends email for user to activate their accounts\n */\n {\n $to = $email; // Send email to our user\n $subject = 'Signup | Verification'; // Give the email a subject\n $mail_content = '\n Thanks for creating an account on CATALICO\n Your account has been created, you can login with the following credentials after\n you have activated your account by clicking the url or link below.\n ------------------------\n email: '.$email.'\n Password: **********\n ------------------------\n Please click this link to activate your account:\n http://www.catalico.com/verify.php?email='.$email.'&hash='.$hash.'';\n mail($to, $subject, $mail_content);\n \n }", "function _send_admin_notification_email($order_data)\n\t{\n\t\t$order_id = $order_data['order_id'] = $order_data['entry_id'];\n\n\t\tunset($order_data['entry_id']);\n\n\t\t$admin_name = addslashes($this->settings['email_admin_notification_from_name']); \n\t\t$admin_email = addslashes($this->settings['admin_email']);\n\t\t$subject = addslashes($this->settings['email_admin_notification_subject']); \n\t\t$from = addslashes($this->settings['email_admin_notification_from']); \n\t\t\n\t\t$this->_send_email(\n\t\t\t$this->_parse_template_simple($from, $order_data),\n\t\t\t$this->_parse_template_simple($admin_name, $order_data),\n\t\t\t$admin_email,\n\t\t\t$this->_parse_template_simple($subject, $order_data, array('ORDER_ID'=>$order_id)),\n\t\t\t$this->_parse_template_full($this->_parse_template_simple($this->settings['email_admin_notification'], $order_data, array('ORDER_ID'=>$order_id))),\n\t\t\t$this->settings['email_admin_notification_plaintext']\n\t\t);\n\t}", "public function sendNewAccountEmail($context) {\n $serializedEmailData = $context->getInput();\n Mage::getModel('customer/customer')->sendNewAccountEmailFromData($serializedEmailData);\n }", "private function createAdmin()\n\t{\n\t\t$_record = Record::createRecord(Record::ADMIN_CREATED);\n\t\t\n\t\tif(!\\Library\\User::hasPrivilege(\"EDIT_ADMINS\"))\n\t\t{\n\t\t\t$_record->setResult(Record::UNAUTHORIZED)\n\t\t\t\t\t->save();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(empty($_POST['adminName']) || empty($_POST['adminEmail']) || empty($_POST['adminPassword']))\n\t\t{\n\t\t\t$_record->setResult(Record::REFUSED)\n\t\t\t\t\t->setMessage(\"Missing fields\")\n\t\t\t\t\t->save();\n\t\t\t\n\t\t\thttp_response_code(400);\n\t\t\techo \"missingField\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$name = \\Library\\Sanitize::string($_POST['adminName']); \n\t\t$email = \\Library\\Sanitize::email($_POST['adminEmail']);\n\t\t$password = \\Library\\Sanitize::string($_POST['adminPassword']); \n\t\t$timezone = \\Library\\Sanitize::string($_POST['adminTimezone']);\n\t\t\n\t\tif(!$email)\n\t\t{\n\t\t\t$_record->setResult(Record::REFUSED)\n\t\t\t\t\t->setMessage(\"Bad email\")\n\t\t\t\t\t->save();\n\t\t\t\n\t\t\thttp_response_code(400);\n\t\t\techo \"badEmail\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$userModel = new \\Models\\userModel();\n\t\t\n\t\tif($userModel->isEmailUsed($email))\n\t\t{\n\t\t\t$_record->setResult(Record::REFUSED)\n\t\t\t\t\t->setMessage(\"Email already use by another account\")\n\t\t\t\t\t->save();\n\t\t\t\n\t\t\thttp_response_code(400);\n\t\t\techo \"emailAlreadyUsed\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!\\Library\\Localization::timezoneExists($timezone))\n\t\t{\n\t\t\t$_record->setResult(Record::REFUSED)\n\t\t\t\t->setMessage(\"Specified timezone is not currently supported (\".$timezone.\")\")\n\t\t\t\t->save();\n\t\t\t\n\t\t\thttp_response_code(400);\n\t\t\techo \"fatal_error\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$adminID = $userModel->addAdmin($name, $email, $password, \\Library\\User::id(), $timezone);\n\t\t\n\t\t$_record->setResult(Record::OK)\n\t\t\t\t->save();\n\t\tif(empty($_POST['privileges']))\n\t\t{\n\t\t\t$this->admins();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$user = User::getInstance($adminID);\n\t\t\n\t\tforeach($_POST['privileges'] as $privilege)\n\t\t{\n\t\t\t$privilege = \\Library\\Sanitize::string($privilege);\n\t\t\t$user->addPrivilege($privilege, null);\n\t\t}\n\t\t\n\t\t//TODO: EMAIL\n\t\t\n\t\t$this->admins();\n\t}", "protected function sendRegistrationEmail()\n {\n $data = ['user' => $this->user];\n\n $this->mailer()\n ->send('email.auth.registration.user', $data, function (Message $message) {\n $message->to($this->user->email);\n $message->subject('Welcome to QuikService');\n });\n }", "public function sendNewCustomerEmail(Varien_Event_Observer $observer){\r\n\t\t\r\n\t}", "public function sendToAccount()\n {\n // TODO: Sending will be here here\n }", "public function sendActivationMail()\n\t{\n\t\t$link = Yii::app()->getBaseUrl(true) . \"/index.php?r=user/newActivation&key=\".md5($this->email);\n\t\t\n\t\t$msg = \"Dear \".$this->first_name.\", <br> You've successfully registered. Please click This link to activate your account <b> \n\t\t\t<a target='_blank' href='\".$link.\"'> Activate Account click me..!</a></b><br>\n\t\t\tThanks,<br>\n\t\t\tRegistration Team\";\n\n\t\t// return yii::app()->createUrl(\"user/activate\", array('key'=>'vijay'));\n\t\t$this->setPasswordHashKey(0);\n\t\tif(Yii::app()->params['sendEmail']){\n\t\t\t$successMsg = \"Activation mail has been send to your mail id. Please follow this link to activate your account\";\n\t\t\t$this->sendMail($this->email, \"Account Activation\", $msg, $successMsg);\n\t\t\treturn Yii::app()->getController()->redirect(array('site/login'));\n\t\t} else {\n\t\t\treturn Yii::app()->getController()->redirect(array('site/notification','msg'=>$msg));\n\t\t}\n\t}", "public function mail_form() {\n\n\t\t\tglobal $wpdb, $h3_mgmt_races;\n\n\t\t\t$url = 'admin.php?page=h3-mgmt-emails';\n\t\t\t$form_action = $url . '&amp;todo=send';\n\t\t\t$sent = false;\n\t\t\t$id = 0;\n\n\t\t\tif ( isset( $_GET['todo'] ) && $_GET['todo'] == 'send' ) {\n\t\t\t\t\t$sent = $this->mail_send();\n\t\t\t}\n\n\t\t\t$messages = array();\n\n\t\t\tif ( $sent ) {\n\t\t\t\t\t$messages[] = array(\n\t\t\t\t\t\t'type' => 'message',\n\t\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t\t_x( 'The Email titled &quot;%s&quot; has been successfully sent.', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t\t$_POST['subject']\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['email'] ) ) {\n\t\t\t\t\t$receipient_field = array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => _x( 'Receipient', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t'id' => 'receipient',\n\t\t\t\t\t\t'disabled' => true,\n\t\t\t\t\t\t'value' => $_GET['email'],\n\t\t\t\t\t\t'desc' => _x( 'You are writing to a single user.', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t);\n\t\t\t} else {\n\n\t\t\t\t$receipients = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => _x( 'Testmail to yourself', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t'value' => 'self',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => _x( 'All HHH Users who participated at Tramprennen', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t'value' => 'all',\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\t$races = $h3_mgmt_races->get_races(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'orderby' => 'id',\n\t\t\t\t\t\t'race' => 'all',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tforeach ( $races as $race ) {\n\t\t\t\t\t$receipients[] = array(\n\t\t\t\t\t\t'label' => _x( 'All participants of \"' . $race['name'] . '\"', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t'value' => ( 'race-' . $race['id'] ),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$receipient_field = array(\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'label' => _x( 'Receipient', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t'id' => 'receipient',\n\t\t\t\t\t'value' => 'race-' . $h3_mgmt_races->get_active_race(),\n\t\t\t\t\t'options' => $receipients,\n\t\t\t\t\t'desc' => _x( 'Select who receives the email. Choose the &quot;Testmail to yourself&quot; option, to see how it will look in your own inbox.', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$metaboxes = array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => _x( 'E-Mail Metadata', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t$receipient_field,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'label' => _x( 'Sender', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t\t'id' => 'sender',\n\t\t\t\t\t\t\t'value' => 'nr',\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'label' => _x( 'My own email address', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t\t\t\t'value' => 'own',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'label' => 'no-reply@tramprennen.org',\n\t\t\t\t\t\t\t\t\t'value' => 'nr',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'desc' => _x( 'Send the email either from your personal email address or select the generic &quot;no-reply&quot;.', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => _x( 'E-Mail Metadata', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => _x( 'Subject', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t\t'id' => 'subject',\n\t\t\t\t\t\t\t'desc' => _x( 'The email&apos;s subject line', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'label' => _x( 'Message', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t\t'id' => 'message',\n\t\t\t\t\t\t\t'desc' => _x( 'Message Body', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$page_args = array(\n\t\t\t\t'echo' => true,\n\t\t\t\t'icon' => 'icon-mails',\n\t\t\t\t'title' => _x( 'Send an email', 'Admin Email Interface', 'h3-mgmt' ),\n\t\t\t\t'url' => $url,\n\t\t\t\t'messages' => $messages,\n\t\t\t);\n\t\t\t$the_page = new H3_MGMT_Admin_Page( $page_args );\n\n\t\t\t$form_args = array(\n\t\t\t\t'echo' => true,\n\t\t\t\t'form' => true,\n\t\t\t\t'method' => 'post',\n\t\t\t\t'metaboxes' => true,\n\t\t\t\t'js' => false,\n\t\t\t\t'url' => $url,\n\t\t\t\t'action' => $form_action,\n\t\t\t\t'id' => $id,\n\t\t\t\t'button' => __( 'Send E-Mail!', 'h3-mgmt' ),\n\t\t\t\t'top_button' => true,\n\t\t\t\t'back' => true,\n\t\t\t\t'back_url' => $url,\n\t\t\t\t'fields' => $metaboxes,\n\t\t\t);\n\t\t\t$the_form = new H3_MGMT_Admin_Form( $form_args );\n\n\t\t\t$the_page->top();\n\t\t\t$the_form->output();\n\t\t\t$the_page->bottom();\n\t\t}", "public function sendMailAdminApproval(\n array $admins,\n Approval $approval,\n int $stage = 1,\n bool$isReminder = false\n ): void {\n\n // get settings\n $settings = $this->getSettings(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n if ($settings['view']['templateRootPaths']) {\n\n /** @var \\Madj2k\\Postmaster\\Mail\\MailMessage $mailService */\n $mailService = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(MailMessage::class);\n\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\BackendUser $admin */\n foreach ($admins as $admin) {\n\n if (\n ($admin instanceof BackendUser)\n && ($admin->getEmail())\n ) {\n\n // send new user an email with token\n $mailService->setTo($admin, array(\n 'marker' => array(\n 'approval' => $approval,\n 'backendUser' => $admin,\n 'stage' => $stage,\n 'isReminder' => $isReminder,\n ),\n 'subject' => FrontendLocalizationUtility::translate(\n ($isReminder ? 'rkwMailService.subject.adminApprovalReminder' : 'rkwMailService.subject.adminApproval'),\n 'rkw_newsletter',\n null,\n $admin->getLang()\n ),\n ));\n }\n }\n\n $mailService->getQueueMail()->setSubject(\n FrontendLocalizationUtility::translate(\n ($isReminder ? 'rkwMailService.subject.adminApprovalReminder' : 'rkwMailService.subject.adminApproval'),\n 'rkw_newsletter',\n null,\n 'de'\n )\n );\n\n $mailService->getQueueMail()->addTemplatePaths($settings['view']['templateRootPaths']);\n $mailService->getQueueMail()->addPartialPaths($settings['view']['partialRootPaths']);\n\n $mailService->getQueueMail()->setPlaintextTemplate('Email/AdminApproval');\n $mailService->getQueueMail()->setHtmlTemplate('Email/AdminApproval');\n\n $mailService->send();\n }\n }", "function _sendNewUserMail($id) {\n\t\tApp::uses('CakeEmail', 'Network/Email');\n\t\t$user=$this->User->read(null,$id);//debug($id);debug($user);\n\t\tif ($user) {\n\t\t\t//found ok\n\t\t\t$mail=new CakeEmail('smtp');\n\t\t\t$mail->to($user['User']['email']);\n\t\t\t$mail->subject('Welcome to Internet Model Railroad Database');\n\t\t\t$mail->replyTo('kurtlakin@topdsoft.com');\n\t\t\t$mail->from(array('kurtlakin@topdsoft.com'=>'Top Drawer Software LLC'));\n//\t\t\t$mail->from(array('kurtlakin@gmail.com'=>'My Site'));\n\t\t\t$mail->template('confirm_message');\n\t\t\t$mail->emailFormat('text');\n\t\t\t$mail->viewVars(array('user'=>$user));\n\t\t\t//mail options\n/*\t\t\t$mail->smtpOptions(array(\n\t\t\t 'port'=>'25',\n\t\t\t 'timeout'=>'30',\n\t\t\t 'host'=>'smtp.emailsrvr.com'\n\t\t\t));//*/\n\t\t\t$x=$mail->send();\n//debug($x);exit;\n\t\t}\n\t}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //-------------send out email-------------------------------\n if ($email == 'admin_notification_new_quotation') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['email_message'] = $this->data['lang']['lang_a_new_quotation_has_been_submitted'];\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_new_quotation_request'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($this->data['lang']['lang_new_quotation_request']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "public function sendEmail()\n {\n $body = Yii::t('app', 'Phone {phone}, name {name}', ['phone' => $this->phone, 'name' => $this->name]);\n $subject = Yii::t('app', 'Request for a call back from {site}', ['site' => Yii::$app->name]);\n\n return Yii::$app->mailer->compose()\n ->setTo(Yii::$app->params['adminEmail'])\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::t('app', '{appname} robot', ['appname' => Yii::$app->name])])\n ->setSubject($subject)\n ->setTextBody($body)\n ->send();\n }", "public function welcome_email($user)\n {\n $emailSettings = Settings::where('type','email')->get()->toArray();\n $emailConfig = $this->helper->key_value('name','value',$emailSettings);\n $adminDetails = Admin::where('status','active')->first();\n $emailConfig['email_address']= $adminDetails->email;\n $emailConfig['username'] = $adminDetails->username;\n //New Code Ends here\n $token = $this->helper->randomCode(100);\n $password_resets = new PasswordResets;\n $password_resets->email = $user->email;\n $password_resets->token = $token;\n $password_resets->created_at = date('Y-m-d H:i:s');\n $password_resets->save();\n\n $data['first_name'] = $user->first_name;\n $data['email'] = $user->email;\n $data['token'] = $token;\n $data['type'] = 'register';\n $data['url'] = url('/').'/';\n\n $data['subject'] = \"Please confirm your e-mail address\";\n $data['view'] = resource_path('views/sendmail/email_confirm.blade.php');\n $data['link'] = $data['url'].'users/confirm_email?code='.$data['token'];\n $data['message_body'] = '';\n $data['user_name'] = '';\n if(env('APP_MODE', '') != 'test'){\n if($emailConfig['driver']=='smtp' && $emailConfig['email_status']==1){\n @Mail::send('emails.email_confirm', $data, function($message) use($data) {\n $message->to($data['email'], $data['first_name'])->subject('Please confirm your e-mail address');\n });\n }else if($emailConfig['driver']=='sendmail'){\n $this->sendPhpEmail($data,$emailConfig);\n }\n }\n return true;\n }", "public function sendMailAdminApprovalAutomatic(\n array $admins,\n Approval $approval,\n int $stage = 1\n ): void {\n\n // get settings\n $settings = $this->getSettings(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n if ($settings['view']['templateRootPaths']) {\n\n /** @var \\Madj2k\\Postmaster\\Mail\\MailMessage $mailService */\n $mailService = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(MailMessage::class);\n\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\BackendUser $admin */\n foreach ($admins as $admin) {\n\n if (\n ($admin instanceof BackendUser)\n && ($admin->getEmail())\n ) {\n\n // send new user an email with token\n $mailService->setTo($admin, array(\n 'marker' => array(\n 'approval' => $approval,\n 'backendUser' => $admin,\n 'stage' => $stage,\n ),\n 'subject' => FrontendLocalizationUtility::translate(\n 'rkwMailService.subject.adminApprovalAutomatic',\n 'rkw_newsletter',\n null,\n $admin->getLang()\n ),\n ));\n }\n }\n\n $mailService->getQueueMail()->setSubject(\n FrontendLocalizationUtility::translate(\n 'rkwMailService.subject.adminApprovalAutomatic',\n 'rkw_newsletter',\n null,\n 'de'\n )\n );\n\n $mailService->getQueueMail()->addTemplatePaths($settings['view']['templateRootPaths']);\n $mailService->getQueueMail()->addPartialPaths($settings['view']['partialRootPaths']);\n\n $mailService->getQueueMail()->setPlaintextTemplate('Email/AdminApprovalAutomatic');\n $mailService->getQueueMail()->setHtmlTemplate('Email/AdminApprovalAutomatic');\n\n $mailService->send();\n }\n }", "private function admin_register()\n { \n $result = array();\n $username=$this->_request['username'];\n $password=$this->_request['password'];\n $company_name =$this->_request['company_name'];\n $email=$this->_request['email'];\n $user_type=1;\n $mobile=$this->_request['mobile'];\n $new_email_key = md5(rand().microtime()); \n \n \n if(empty($username) || empty($email) || empty($company_name))\n {\n $result['status'] = '0';\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n $sql=mysql_query(\"select * from users where email='\".$email.\"' \",$this->db)or die(mysql_error());\n if(mysql_num_rows($sql) > 0){\n $result['status'] = '0';\n $result['message']=\"email already exist !\";\n $this->response($this->json($result), 200);\n }\n else\n {\n\n\n $UserPassword=rand(100000, 999999);\n \n //$result['UserID']=$Userinfo->UserID;\n \n $subject = \"Welcome to Work Today!\";\n $htmlContent = '\n <html>\n <head>\n <title>Welcome to Work Today!.</title>\n <p>Thanks for joining Work Today. We listed your sign in details below, make sure you keep them safe.\nTo verify your email address, please user OTP:</p>\n </head>\n <body>\n \n <table >\n <tr>\n <th>Please user verification OTP </th><td>'.$UserPassword.'</td>\n </tr>\n </table>\n </body>\n </html>';\n\n // Set content-type header for sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n // Additional headers\n $headers .= 'From: WorkToday Prime<support@worktoday.in>' . \"\\r\\n\";\n //$headers .= 'Cc: welcome@example.com' . \"\\r\\n\";\n //$headers .= 'Bcc: welcome2@example.com' . \"\\r\\n\";\n\n mail($email,$subject,$htmlContent,$headers);\n\n // $UserPassword =$this->HashPassword($UserPassword);\n\n $sql = mysql_query(\"INSERT INTO tbl_companies (CompanyFullname, CompanyEmail,CompanyPhone,Start_day,End_day,Start_time,End_time) VALUES ('\".$company_name.\"','\".$email.\"','\".$mobile.\"','Monday','Saturday','10:00:00 AM','19:00:00 PM')\", $this->db);\n $last_id=mysql_insert_id();\n\n $sql = mysql_query(\"INSERT INTO `users`(`username`, `password`, `email`,`mobile`,`activated`,`UserType`,`UserCompanyID`,`created`) VALUES ('\".$username.\"','\".$UserPassword.\"','\".$email.\"','\".$mobile.\"','1','\".$user_type.\"','\".$last_id.\"','\".date('Y-m-d H:i:s').\"')\", $this->db);\n $id=mysql_insert_id();\n\n\n /* drop plates qury*/\n\n $depart1=mysql_query(\"INSERT INTO tbl_department (department_name,company_id)VALUES('HR Department','$last_id')\",$this->db);\n $depart=mysql_insert_id();\n $user=mysql_query(\"INSERT INTO tbl_departmentemploy(DepartmentID,EmployID)Values('$depart','$id')\",$this->db);\n $depart2=mysql_query(\"INSERT INTO tbl_department (department_name,company_id)VALUES('Accounts Department','$last_id')\",$this->db);\n $head1=mysql_query(\"INSERT INTO tbl_heads (HeadCompanyID,HeadName)VALUES('$last_id','Office Work')\",$this->db);\n $hd1=mysql_insert_id();\n $activity1=mysql_query(\"INSERT INTO tbl_activities ( ActivityHeadID, ActivityName)VALUES('$hd1','Client Meeting')\",$this->db);\n $activity2=mysql_query(\"INSERT INTO tbl_activities ( ActivityHeadID, ActivityName)VALUES('$hd1','Internal Meeting')\",$this->db);\n $head2=mysql_query(\"INSERT INTO tbl_heads (HeadCompanyID,HeadName)VALUES('$last_id','Client A')\",$this->db);\n $hd2=mysql_insert_id();\n $activity3=mysql_query(\"INSERT INTO tbl_activities ( ActivityHeadID, ActivityName)VALUES('$hd2',' Documentation')\",$this->db);\n $activity4=mysql_query(\"INSERT INTO tbl_activities ( ActivityHeadID, ActivityName)VALUES('$hd2','Phone Cell')\",$this->db);\n $users_tbl=mysql_query(\"UPDATE users SET Define_Role='1' where UserCompanyID='$last_id'\",$this->db);\n /* $rolecompany=mysql_query(\"INSERT INTO tbl_roles (UserID,RoleName,RoleManageActivitiesAdd,RoleManageActivitiesEdit,RoleManageActivitiesDelete,RoleManageHeadAdd,RoleManageHeadEdit,RoleManageHeadDelete,RoleManageUserAdd,RoleManageUserEdit,RoleManageUserDelete,RoleManageLeavesAdd,RoleManageLeavesEdit,RoleManageLeavesDelete,RoleManageDepartmentAdd,RoleManageDepartmenEdit,RoleManageDepartmentRemove,RoleManageCoffeeAdd,RoleManageCoffeeEdit,RoleManageCoffeeRemove,RoleManageBulletinAdd,RoleManageBulletinEdit,RoleManageBulletinDelete,RoleManageTaskAdd,RoleManageTaskEdit,RoleManageTaskDelete,created_at) VALUES('\".$id.\"','Admin','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','\".date('Y-m-d H:i:s').\"')\",$this->db);*/\n\n $role=mysql_query(\"INSERT INTO tbl_user_role (UserID,RoleName,RoleManageActivitiesAdd,RoleManageActivitiesEdit,RoleManageActivitiesDelete,RoleManageHeadAdd,RoleManageHeadEdit,RoleManageHeadDelete,RoleManageUserAdd,RoleManageUserEdit,RoleManageUserDelete,RoleManageLeavesAdd,RoleManageLeavesEdit,RoleManageLeavesDelete,RoleManageDepartmentAdd,RoleManageDepartmenEdit,RoleManageDepartmentRemove,RoleManageCoffeeAdd,RoleManageCoffeeEdit,RoleManageCoffeeRemove,RoleManageBulletinAdd,RoleManageBulletinEdit,RoleManageBulletinDelete,RoleManageTaskAdd,RoleManageTaskEdit,RoleManageTaskDelete,created_at) VALUES('\".$id.\"','Admin','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','\".date('Y-m-d H:i:s').\"')\",$this->db);\n $usertyperole1=mysql_insert_id();\n $updateusertype=mysql_query(\"update users SET UserType='\".$usertyperole1.\"' where id='\".$id.\"'\",$this->db);\n \n\n $result['user_id']= $id;\n $result['status'] = \"1\";\n $result['message']=\"Your registered\";\n $this->response($this->json($result), 200);\n }\n }", "private function sendEmail() {\n\t$ow_email = $this->getOwnerEmail();\n\n\tif (Debug::getDebug()) {\n\t FB::info(\"CallBackForm: Email to be sent to : $ow_email using gfEmailPostmark class with follwoing information: \");\n\t $message = \"Name: \" . $this->_user->getName() . \"<br /> Email: \" . $this->_user->getEmail() . \"<br /> Telephone: \" . $this->_user->getTel() . \"<br /> Enquiry: \" . $this->_enquiry . \"<br />\";\n\t FB::info($message);\n\t}\n\t/* $message = \"Did you receive my message\";\n\t $email = new gfEmailPostmark();\n\t $email->to($ow_email)->subject($subject)->messagePlain($message)->send(); */\n }", "public function MandaEmailAdmin($parametros) {\n //Instancia o Helper Mail \n $MailHelper = HelperFactory::getInstance('mail');\n\n //Configura o Helper Mail\n $MailHelper = $this->ConfiguraEmail($MailHelper);\n\n //Corpo do e-mail para o cliente\n $mail_body = \"<font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#1A1A1A'>Novo formulário de contato recebido pelo website:<br /><br />\";\n $mail_body .= \"<b>Nome:</b> \" . $parametros['txt_nome'] . \"<br />\";\n $mail_body .= \"<b>E-mail:</b> \" . $parametros['txt_email'] . \"<br />\";\n $mail_body .= \"<b>Telefone:</b> \" . $parametros['txt_telefone'] . \"<br />\";\n $mail_body .= \"<b>Assunto:</b> \" . $parametros['txt_assunto'] . \"<br />\";\n $mail_body .= \"<b>Mensagem:</b> \" . $parametros['txt_mensagem'] . \"<br /><br />\";\n\n //Seta o corpo do E-mail\n $MailHelper->setBody($mail_body);\n\n //Dados da tabela contatos\n $dados_tabela_EmailsFormularios = TableFactory::getInstance('EmailsFormularios')->BuscaDados('3');\n //Seta o Email\n \n $MailHelper->setAddress($dados_tabela_EmailsFormularios['txt_email']);\n\n return $MailHelper->sendEmail();\n }", "private static function default_admin_email_subject() {\n\t\treturn sprintf( __( '[%s] New User Registration' ), '[sitename]' );\n\t}", "public function debugLeadsExternalAutoEmail()\n { \n $this->AllocationUsers = TableRegistry::get('AllocationUsers');\n\n $allocation_id = 2;\n $allocation_users = $this->AllocationUsers->find('all')\n ->contain(['Users'])\n ->where(['AllocationUsers.allocation_id' => $allocation_id])\n ;\n\n $users_email = array();\n \n foreach($allocation_users as $users){ \n $users_email[$users->user->email] = $users->user->email; \n } \n\n $new_lead = [\n 'name' => 'Test New Lead',\n 'email' => 'test@test.com',\n 'phone' => '3435-3453',\n 'city_state' => 'City / State' \n ];\n\n $email_customer = new Email('default');\n $email_customer->from(['websystem@holisticwebpresencecrm.com' => 'Holistic'])\n ->template('external_leads_registration')\n ->emailFormat('html') \n ->bcc($users_email) \n ->subject('New Leads')\n ->viewVars(['new_lead' => $new_lead])\n ->send();\n\n exit;\n }", "function reg_admin_send_mail($name, $surname, $mail, $password, $to, $id){\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t$server_name = str_replace(\"www.\", \"\", $_SERVER['SERVER_NAME']);\n\t// Additional headers\n\t$headers .= 'To: '.$name.' <'.$mail.'>' . \"\\r\\n\";\n\t\n\t$headers .= 'From: '.get_info('title').' <admin@'.$server_name.'>';\n\t$to = $name.' '.$surname.' <'.$mail.'>';\n\t$subject = get_info('title').\": \"._('data access for').\" \" . $name . \" \" .$surname;\n\t$message = \"\n\t<html>\n\t\t<head>\n\t\t\t<title>\".$subject.\"</title>\n\t\t</head>\n\t\t<body>\n\t\t\t<p>\"._('Hi').\", \" . ucfirst($name) . \"!<br />\n\t\t\t\"._('These are the access data').\":<br />\n\t\t\t\"._('Username').\": \" . $mail . \"<br />\n\t\t\t\"._('Password').\": \" . $password . \"<br />\n\t\t\t\"._('Do not forget to change password from your panel profile').\"!</p>\n\t\t</body>\n\t</html>\";\n\n\t// Mail it\n\tif(@mail($to, $subject, $message, $headers)){\n\t \treturn REG_SUCCESS;\n\t}else{\n\t\treturn REG_FAILED;\n\t}\n\treturn $password;\n}", "public function sendInfoMail()\n\t{\n\n }", "public function notify_user(){\n $sql = \"SELECT email FROM users WHERE id=\" .$this->id. \";\";\n\n if($result = mysqli_query($this->con, $sql)){\n $row = mysqli_fetch_assoc($result);\n $msg = \"Your workout plan has been added! Thanks for using the site.\\n -Virtuagym\";\n mail($row[\"email\"], \"New Workout Plan\", $msg);\n echo \"An email has been sent to \" . $row[\"email\"];\n }else{\n echo \"Error occurred.\"; \n }\n\n mysqli_close($this->con);\n }", "public function admin_add() {\n\t\tparent::admin_add();\n\n\t\tif (empty($this->request->data)) {\n\t\t\t$this->request->data['EmailAccount'] = array(\n\t\t\t\t'name' => __d('emails', '%s\\'s mail', $this->Auth->user('username')),\n\t\t\t\t'server' => sprintf('mail.%s', env('HTTP_HOST')),\n\t\t\t\t'username' => sprintf('%s@%s', $this->Auth->user('username'), env('HTTP_HOST')),\n\t\t\t\t'email' => $this->Auth->user('email'),\n\t\t\t\t'type' => 'imap',\n\t\t\t\t'port' => 143,\n\t\t\t\t'readonly' => 0,\n\t\t\t\t'user_id' => $this->Auth->user('id')\n\t\t\t);\n\t\t}\n\n\t\t$this->set('users', $this->EmailAccount->User->find('adminList'));\n\t\t$this->set('types', $this->EmailAccount->types);\n\t}", "public function getAdminEmail()\n {\n return $this->adminEmail;\n }", "public function actionEmail()\r\n\t{\r\n\t\t$model = new EmailSettings;\r\n\t\t\r\n\t\t$this->submitPost($model);\r\n\r\n\t\t$this->render('form', array('model' => $model, 'header' => array(\r\n\t\t\t'h3' => Yii::t('Dashboard.main', 'Email Settings'), \r\n\t\t\t'p' => Yii::t('Dashboard.main', 'Configure and verify how CiiMS sends emails.'),\r\n\t\t\t'save-text' => Yii::t('Dashboard.main', 'Save Changes')\r\n\t\t)));\r\n\t}", "public function send_test_email()\n {\n // if not in admin dashboard, bail\n if ( ! is_admin()) {\n return;\n }\n\n check_ajax_referer('mailoptin-send-test-email-nonce', 'security');\n\n if ( ! current_user_has_privilege()) {\n return;\n }\n\n $admin_email = mo_test_admin_email();\n $email_campaign_id = absint($_REQUEST['email_campaign_id']);\n $campaign_subject = Misc::parse_email_subject(EmailCampaignRepository::get_customizer_value($email_campaign_id, 'email_campaign_subject'));\n\n if (EmailCampaignRepository::is_newsletter($email_campaign_id)) {\n $campaign_subject = Misc::parse_email_subject(EmailCampaignRepository::get_customizer_value($email_campaign_id, 'email_campaign_title'));\n }\n\n $campaign_type = EmailCampaignRepository::get_email_campaign_type($email_campaign_id);\n\n $plugin_settings = new Settings();\n $from_name = $plugin_settings->from_name();\n $from_email = $plugin_settings->from_email();\n $headers = [\"Content-Type: text/html\", \"From: $from_name <$from_email>\"];\n\n /** call appropriate method to get template preview. Eg @see self::new_publish_post_preview() */\n $data = $this->{\"{$campaign_type}_preview\"}($email_campaign_id, $campaign_subject);\n\n $content_html = $data[0];\n $formatted_email_subject = $data[1];\n\n $response = wp_mail($admin_email, $formatted_email_subject, $content_html, $headers);\n\n if ( ! $response) {\n $headers = [\"Content-Type: text/html\"];\n $response = wp_mail($admin_email, $formatted_email_subject, $content_html, $headers);\n }\n\n wp_send_json(array('success' => (bool)$response));\n }", "public function sendMailToHRD()\n {\n Mail::to(\"ajifatur14@students.unnes.ac.id\")->send(new ApplicantMail(33));\n \n return \"Email telah dikirim\";\n }" ]
[ "0.7557865", "0.7546118", "0.7322523", "0.7020387", "0.7016858", "0.700265", "0.69841415", "0.69438016", "0.6940948", "0.6778141", "0.6762244", "0.67078865", "0.6700539", "0.6697917", "0.6688139", "0.6632562", "0.6597209", "0.6595621", "0.6576486", "0.6546904", "0.6529377", "0.65255946", "0.65070873", "0.6506281", "0.64929897", "0.6486961", "0.646521", "0.6458026", "0.64554304", "0.6443487", "0.64387876", "0.64381564", "0.6427791", "0.64232177", "0.64104533", "0.6402052", "0.6372668", "0.63647854", "0.63601595", "0.63493603", "0.6348482", "0.63480484", "0.63212943", "0.63170725", "0.630992", "0.6306977", "0.6303984", "0.62847155", "0.62832165", "0.62724644", "0.62681943", "0.6255094", "0.62431693", "0.6239385", "0.62338626", "0.62175655", "0.6214213", "0.62052506", "0.6198477", "0.6192495", "0.61864495", "0.6179922", "0.617338", "0.6168349", "0.6156045", "0.6148703", "0.6143013", "0.6134506", "0.6125679", "0.6118114", "0.61174375", "0.6114485", "0.61126876", "0.61060345", "0.60975", "0.6096192", "0.609376", "0.6087541", "0.6079892", "0.6078088", "0.6062689", "0.6060257", "0.60593814", "0.6056783", "0.6044999", "0.60410136", "0.6034736", "0.60344684", "0.60325724", "0.6015198", "0.60129046", "0.6008748", "0.6005781", "0.59784144", "0.5974157", "0.59732056", "0.5969514", "0.596693", "0.5965693", "0.5964594" ]
0.7831153
0
return current user name
вернуть имя текущего пользователя
public static function CurrentUserName() { return User::getUserName(Authentication::CurrentUserID()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetCurrentUserName()\n {\n global $SITE_USER;\n\n if (isset($SITE_USER))\n // for backward compatibility only\n $user = $SITE_USER;\n else\n $user = TUser::GetCurrentUser();\n\n if (!empty($user))\n return $user->getUserName();\n\n if (isset($_SERVER['REMOTE_USER']) )\n return $_SERVER['REMOTE_USER'];\n\n if ( isset($_SERVER['PHP_AUTH_USER']))\n return $_SERVER['PHP_AUTH_USER'];\n\n return \"guest\";\n }", "protected static function getCurrentUser()\n {\n $user_info = posix_getpwuid(posix_getuid());\n return $user_info['name'];\n }", "protected function username() {\n $username = '';\n if ($current_user = $this->user_datas()) {\n $username = $current_user->get_name(); // username is used by default\n \n // if there's a last name, great !\n if ($last_name = $current_user->get_last_name()) {\n $username = $last_name;\n }\n \n // ok there's a first name, go for it !\n if ($first_name = $current_user->get_first_name()) {\n $username .= ' '.$first_name;\n }\n }\n return $username;\n }", "public static function getCurrentUserName()\n\t{\n\t\t$user = self::getCurrentUser();\n\t\tif ($user === null)\n\t\t\tself::throwAuthenticationRequired();\n\t\treturn $user->getUserName();\n\t}", "public function getUserName()\n {\n return $this->getUser()->getName();\n }", "public static function get_user_name() {\n\t\t// Get username.\n\t\t$current_user = wp_get_current_user();\n\t\t$name = ! empty( $current_user->first_name ) ? $current_user->first_name : $current_user->display_name;\n\n\t\treturn $name;\n\t}", "public function getUserName(): string\n {\n return $this->userInfo->getUsername();\n }", "public function get_user_name()\n {\n if (is_object($this->user)) {\n return $this->user->get_username();\n }\n else if (isset($_SESSION['username'])) {\n return $_SESSION['username'];\n }\n }", "public function getUserName()\n {\n return $this->user_name;\n }", "public function getUserName() {\n return $this->user->getDisplayName();\n }", "public static function getCurrentUsername() {\n\t\treturn $_SESSION[\"TRANS2LATE_USERNAME\"];\n\t}", "public function getUsername()\n {\n return $this->getNameUser().' '.$this->getLastnameUser();\n }", "public function getUserName()\n {\n return $this->user->name;\n }", "public function getUserName()\n {\n return $this->user;\n }", "public function getCurrentUsername()\n {\n return $this->currentUsername;\n }", "public function getUserName() : string {\n\t\treturn $this->userName;\n\t}", "public function getUserName()\r\n\t{\r\n\t\treturn cSession::getUserName();\r\n\t}", "function UserName()\n\t{\n\t\tif ($this->__fullUserName !== '') {\n\t\t\treturn $this->__fullUserName;\n\t\t}\n\t\treturn $this->__userName;\n\t}", "public function getName_user()\n {\n return $this->name_user;\n }", "public function getuserName() : string{\n\t\treturn($this->userName);\n\t}", "public function getUserName()\n {\n return $this->getProperty('user_name');\n }", "private function getUsername() {\n return $this->name;\n }", "public function userName()\n\t{\n\t\treturn $this->userName;\n\t}", "public function getUserName() {\n\t\treturn ($this->userName);\n\t}", "public function get_username() {\r\n\r\n\t\techo \"Username: \".$this->user_name.\"\\n\";\r\n\t}", "public function get_username() {\n if (method_exists($this, 'is_anonymous') && $this->is_anonymous()) {\n return 'Anonymous';\n }\n\n $user = $this->get_user();\n return fullname($user);\n }", "final public function get_user_name()\n {\n try\n {\n return $this->user_name;\n }\n catch (Exception $e)\n {\n throw $e;\n }\n }", "public function getName()\n\t{\n\t\treturn $this->user->name;\n\t}", "public function actionUsername()\n {\n $activeUser = $this->getActiveUser();\n Yii::info(\"The current user is \" . $activeUser->username, self::CATEGORY);\n return $activeUser->username;\n }", "public function userName()\n {\n return $this->userName;\n }", "public function getUserName()\n {\n return $this->userName;\n }", "public function getUserName()\n {\n return $this->userName;\n }", "public function getUserName()\n {\n return $this->userName;\n }", "public function getUserName()\n {\n return $this->userName;\n }", "public function getUsername()\n {\n return $this->getName();\n }", "public function getUserName() : string\n {\n return empty($this->userName) ? \"\" : $this->userName;\n }", "public function getUsername()\n {\n return $this->getUname();\n }", "public function getUserName(){\n\t\treturn $this->_name;\n\t}", "public function getUserName() {\n return $this->userName;\n }", "public function getUserName() {\n return $this->userName;\n }", "public function getUserName() {\n return $this->userName;\n }", "public function getUsername()\n {\n return $this->name;\n }", "public function name(): string {\n\t\treturn $this->user->display_name ?? '';\n\t}", "function get_user_fname()\n{\n global $current_user;\n get_currentuserinfo();\n return $current_user->user_firstname;\n}", "public function get_name() {\n\t\treturn __('User', CCTM_TXTDOMAIN);\n\t}", "function getUsername(){\n\t\t$UserName = '<username>';\n\t\treturn $UserName;\n\t}", "protected function getUserName()\n {\n return $this->getToken()->getUser()->getUsername();\n }", "public function getUserName()\n {\n $value = $this->get(self::USERNAME);\n return $value === null ? (string)$value : $value;\n }", "public function username(): string {\n\t\treturn $this->user->user_login ?? '';\n\t}", "public function getUsername(): string\n {\n return $this->first_name . ' ' . strtoupper($this->last_name);\n }", "public function getUsername()\n {\n return ($this->user_id) ? $this->user->username : $this->guest_name;\n }", "public function getUserName()\n {\n return $this->_userName;\n }", "function get_user_name() {\n return isset($_SESSION['user_name']) ? $_SESSION['user_name'] : 'Guest';\n }", "public function getUsername() {\r\n\t\treturn $this->userName;\r\n\t}", "public function getUsername()\n {\n return $this->getUserId();\n }", "public function username() : string{\n\t\treturn $this->username;\n\t}", "public function getUsername()\n {\n return $this->auth->getUsername();\n }", "public function getUserName() {\n\t\treturn $this->user->email;\n\t}", "public function getLoggedInUserName() {\n if (!Kahoutility::isStringParamValid($this->loggedInUserName)) {\n $this->loggedInUserName = $this->ciLibrary->session->userdata(\"Name\");\n }\n return $this->loggedInUserName;\n }", "function getUserName() {\n\t\t$userInfo = @preg_split(\"/\\:/\", $_COOKIE['userId']);\n\t\tif ($userInfo[0]) {\n\t\t\t$filename = getUserDir().\"cache/\".$userInfo[0];\n\t\t\t$userInfo = new SettingsFile($filename);\n\t\t\treturn $userInfo->get(\"username\");\n\t\t}\n\t}", "function getUserName ()\n\t{\n\t\treturn $_SESSION['brimUsername'];\n\t}", "function user_getUsername()\n\t{\n\t\t$u = cookie_get('txtUserName');\n\t\tif( strlen($u)==0 )\n\t\t{\n\t\t\treturn \"YourName\";\n\t\t}\n\t\treturn $u;\n\t}", "public static function getDisplayName()\r\n\t{\r\n\t\treturn storageGet( \"UserName\" );\r\n\t}", "public function getUsername()\n {\n return $this->getLogin();\n }", "function getUsername()\n {\n require_once('User.php');\n # Get the user object\n $user = new User($this->UserId);\n # Return his/hers username\n return $user->getUsername();\n }", "public static function getUserName()\r\n\t{\r\n\t\treturn storageGet( \"UserID\" );\r\n\t}", "final public function getUsername()\n {\n return $this->getUserIdentifier();\n }", "protected function getUserName()\n {\n return $this->_username;\n }", "public function getUserName()\n {\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\n return '';\n }\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n return trim($customer->getName());\n }", "public function getInfoUserName() {\n\t\treturn $this->user->email;\n\t}", "public function GetName()\r\n {\r\n return isset($_SESSION['user']) ? $_SESSION['user']->name : null;\r\n }", "function get_current_user_name(){\n global $user,$role;\n if($role === STUDENT)\n return $user[\"student_firstname\"] . \" \" . $user[\"student_lastname\"];\n return $user[\"faculty_firstname\"] . \" \" . $user[\"faculty_lastname\"];\n}", "public function authenticatedUsername()\n {\n $authenticated = $this->gitHubAPI->api('current_user')->show();\n return $authenticated['login'];\n }", "public function getProfileUserName(): string {\n\t\treturn ($this->profileUserName);\n\t}", "public function getUsername()\n {\n $username = $this->user->nickname;\n\n if ($username && User::usernameAvailable($username)) {\n return $username;\n } elseif ($username && !User::usernameAvailable($username)) {\n return $username.$this->getId();\n } else {\n return 'user'.$this->getId();\n }\n }", "public function getUserName();", "public function getUserName();", "public function getUsername() {\n return $this->getLogin();\n }", "public function get_current_username()\n {\n return $this->session->userdata('username');\n }", "public function getUsername() {\n return $this->uaHandler->getUsername();\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "public function getUsername()\n {\n return $this->adaptor->getUsername();\n }", "public function username()\n\t{\n\n\t\treturn 'username';\n\t}", "public function getUsername(): string\n {\n return (string) $this->loginname;\n }", "public function getUsername(): string\n {\n return strtolower(str_replace(\" \",\"_\", $this->fullName));\n }", "public function getUsername() {\n\t return $this->getValue(self::FIELD_USERNAME);\n\t}", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username ?: '';\n }" ]
[ "0.8447747", "0.833001", "0.8287854", "0.8286094", "0.81864136", "0.8171809", "0.8139579", "0.8123715", "0.8107863", "0.8090547", "0.80890787", "0.8086811", "0.8070301", "0.8062298", "0.80553705", "0.8052429", "0.80216026", "0.79936165", "0.79835707", "0.7963124", "0.7963058", "0.79625225", "0.79456764", "0.7939332", "0.793854", "0.7920955", "0.78974557", "0.78809154", "0.78805", "0.7874958", "0.78674626", "0.78674626", "0.78674626", "0.78674626", "0.7864404", "0.7854423", "0.78429365", "0.78177524", "0.78073716", "0.78073716", "0.78073716", "0.7803551", "0.7802622", "0.779709", "0.7792107", "0.7784951", "0.7771356", "0.7746281", "0.77380043", "0.77031094", "0.7701766", "0.77000517", "0.7695362", "0.7686611", "0.7651241", "0.7640702", "0.7634971", "0.76342237", "0.76297826", "0.76237035", "0.76152104", "0.7599673", "0.7598736", "0.75926626", "0.7584504", "0.7577626", "0.75769264", "0.7570147", "0.7564953", "0.75625557", "0.75613225", "0.7557398", "0.7556817", "0.7554156", "0.75272816", "0.75179774", "0.75179774", "0.7514838", "0.7514419", "0.7507091", "0.7505808", "0.7505808", "0.7505808", "0.7505808", "0.7505808", "0.7505808", "0.7505808", "0.7505808", "0.7502892", "0.7502497", "0.7490923", "0.7488877", "0.748451", "0.74839896", "0.74839896", "0.74839896", "0.74839896", "0.74839896", "0.74839896", "0.74832344" ]
0.89185476
0
sendResetPasswordLink : Create a UUID for password reset with 15 min validity and send the email with reset link
sendResetPasswordLink : Создать UUID для сброса пароля с действительностью в течение 15 минут и отправить электронное письмо с ссылкой на сброс пароля
public static function sendResetPasswordLink(string $email): bool { $email = strtolower($email); $user = User::where([ ['email', 'like', $email] ])->first(); if (!is_null($user)) { $v4uuid = UUID::v4(); //current timestamp +15 minutes $timestamp = Carbon::createFromTimestamp(time() + 15 * 60); $user->resetpasswordlink = $v4uuid; $user->resetpasswordlinktimeout = $timestamp; $user->save(); $mail = new PHPMailer(true); try { //Server settings // $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output $mail->isSMTP(); // Send using SMTP $mail->Host = $_ENV['SMTP_SERVER']; // Set the SMTP server to send through if (strcmp($_ENV['SMTP_USEAUTH'], "true") == 0) { $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $_ENV['SMTP_USERNAME']; // SMTP username $mail->Password = $_ENV['SMTP_PASSSWORD']; // SMTP password } if (strcmp($_ENV['SMTP_USESSL'], "true") == 0) { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged } $mail->Port = $_ENV['SMTP_PORT']; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above //Recipients $mail->setFrom($_ENV['SMTP_MAILFROM'], 'Blindtest mailer daemon'); $mail->addAddress($email); // Add a recipient $mail->addReplyTo($_ENV['SMTP_MAILFROM'], 'Blindtest mailer daemon'); // Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'Password reset for Blindtest'; $mail->Body = "<p>Hello,</p>" . "\r\n" . "<p>Please find below an URL to reset your password." . "</p>\r\n" . "<p>This link is valid for 15 minutes." . "</p>\r\n" . '<p><a href="' . $_ENV['PUBLIC_HOST'] . '/auth/resetpassword/' . $v4uuid . '" >Validate my email address</a>' . "</p>\r\n" . "<br>" . "\r\n" . "<p>Note : If you're not at the origin of this password reset, simply ignore this email</p>" . "\r\n"; $mail->AltBody = "Hello," . "\r\n" . "Please find below an URL to reset your password." . "\r\n" . "This link is valid for 15 minutes." . "\r\n" . $_ENV['PUBLIC_HOST'] . "/auth/resetpassword/" . $v4uuid . "\r\n" . "\r\n" . "Note : If you're not at the origin of this password reset, simply ignore this email" . "\r\n";; $mail->send(); } catch (Exception $e) { die("Message could not be sent. Mailer Error: {$mail->ErrorInfo}"); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendResetLinkEmail()\n {\n request()->validate(['email' => 'required|email']);\n\n $user = User::where('email', request('email'))->first();\n\n if (!$user) {\n return ['error' => trans('passwords.user')];\n }\n\n $user->update([\n 'reset_token' => Str::random(90),\n 'reset_token_at' => now()\n ]);\n\n Mail::to($user->email)->send(new SendResetLink($user));\n\n return ['success' => trans('passwords.sent')];\n }", "public function actionSendPasswordResetLink()\n {\n $request = Yii::$app->request;\n $email = $request->post('email');\n\n $user = User::find()\n ->byEmail($email)\n ->one();\n\n if (!$user) {\n return $this->validationError(Yii::t('app', 'Unable to find user with this email'));\n }\n\n if ($user->isInactive()) {\n return $this->validationError(Yii::t('app', 'User is disabled'));\n }\n\n $passwordResetToken = Yii::$app->security->generateRandomString(16);\n $user->password_reset_token = $passwordResetToken;\n $user->expire_date = time();\n\n if (!$user->save()) {\n return $this->validationError(Yii::t('app', 'Unable to save user'));\n }\n\n if (!MailHelper::resetPassword($user)) {\n return $this->validationError(Yii::t('app', 'Unable to send email'));\n };\n }", "function send_passwordReset($email, $username){\n\n require_once('utils/PHPMailer/Exception.php');\n require_once('utils/PHPMailer/PHPMailer.php');\n require_once('utils/PHPMailer/SMTP.php');\n\n $token = rand();\n\n //PHPMailer Object\n $mail = new PHPMailer\\PHPMailer\\PHPMailer(); //Argument true in constructor enables exceptions\n $mail ->IsSMTP();\n $mail->SMTPAuth = true;\n $mail ->SMTPSecure = 'ssl';\n $mail ->Host = 'smtp.gmail.com';\n $mail ->Port = '465';\n $mail ->Username = 'websiteunibo@gmail.com';\n $mail ->Password = 'WebsiteUnibo00';\n\n\n //From email address and name\n $mail->From = \"UniboWebsite@email.com\";\n $mail->FromName = \"STAFF UniboWebsite\";\n\n //To address and name\n $mail->addAddress($email, $username);\n\n //Address to which recipient will reply\n //$mail->addReplyTo(\"reply@yourdomain.com\", \"Reply\");\n\n\n $mail->Subject = \"Recovery password TECHLIEN\";\n $mail->Body = '\n <html>\n <body>\n <p>Link for setup your password to TECHLIEN: </p>\n <a href=\"localhost/unibowebsite/password_recovery.php?email='.$email.'&recovery=true\" >Click here to setup a new password.</a>\n </body>\n </html>';\n $mail->AltBody = \"Recovery password to TECHLIEN\";\n //Send HTML or Plain Text email\n $mail->isHTML(true);\n\n try {\n $mail->send();\n\n } catch (Exception $e) {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n}", "public function sendResetMail()\n\t{\n\t\t$link = Yii::app()->getBaseUrl(true) . \"/index.php?r=user/activate&key=\".md5($this->email);\n\t\t$msg = \"Dear \".$this->first_name.\", <br> Please click This link to reset the password <b> \n\t\t\t<a target='_blank' href='\".$link.\"'> Reset Password</a></b><br>\n\t\t\tThanks,<br>\n\t\t\tRegistration Team\";\n\n\t\t// return yii::app()->createUrl(\"user/activate\", array('key'=>'vijay'));\n\t\t$this->setPasswordHashKey(1);\n\t\tif(Yii::app()->params['sendEmail']){\n\t\t\t$successMsg = \"Reset mail has been send to your mail id. Please follow this link to reset the password\";\n\t\t\t$this->sendMail($this->email, \"Reset Password\", $msg, $successMsg);\n\t\t\t// return Yii::app()->getController()->redirect(array('site/notification','msg'=>$msg));\n\t\t} else {\n\t\t\treturn Yii::app()->getController()->redirect(array('site/notification','msg'=>$msg));\n\t\t}\n\t}", "protected function sendPasswordResetEmail(): void {\n $prefix = Utilities::isSSL() ? 'https://' : 'http://';\n $url = $prefix . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n $text = View::getTemplate('Password/reset-email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset-email.twig', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }", "public function sendResetLinkEmail(Request $request){\n $data = $request->all();\n $validator = Validator::make($data, [\n 'email' => ['required', 'string', 'email', 'max:255', 'exists:users'],\n ]);\n\n if ($validator->fails()) {\n return Redirect::back()\n ->withErrors($validator)\n ->withInput();\n }\n\n $user = User::where('email', $data['email'])->firstOrFail();\n\n $token = $data['_token'].Str::random(8).time();\n DB::table('password_resets')->insert(\n ['email' => $request->email, 'token' => $token, 'created_at' => Carbon::now() ]\n );\n\n $user->notify(new ResetPassword($token . '?email=' . $request->email ));\n\n $errors['email'] = 'Password reset link is sent to your email. Check your spam inbox if you don\\'t see it';\n $request->session()->flash('status', 'A password reset link was sent to your email. Check your spam inbox if you did not see the email.');\n \n return redirect(route('forgot-password'));\n }", "public function sendResetLink(): bool\n\t{\n\t\t$user = $this->getUser();\n\t\tif($user)\n\t\t{\n\t\t\t$code = '';\n\t\t\t$digits = range(0, 9);\n\t\t\tfor($i=0; $i<8; $i++)\n\t\t\t{\n\t\t\t\t$code .= array_rand($digits);\n\t\t\t}\n\n\t\t\t$user->password_reset_code = $code;\n\t\t\t$user->save();\n\n\t\t\t//Email to user\n\t\t\t$server = Settings::get('app', 'server');\n\t\t\t$user->sendEmail(\"Password Reset Request\",\n\"\nDear {$user->name},\n\nWe have received your request to reset your password.\n\nYou can use the following link to reset your password:\nhttp://{$server}/user/reset?code={$code}\n\nIf you did not initiate this request, you can disregard this email.\n\nSincerely,\nThe Celial Team\n\"\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}", "public function send_link_for_reset_password() {\n /* setup mail details */\n ini_set('SMTP', 'relay-hosting.secureserver.net');\n $subject = '';\n $headers = \"From: Freshers Campus <job@xxx.co.in>\\r\\n\";\n $headers .= \"Reply-To: job@xxx.co.in\\r\\n\";\n $headers .= 'X-Mailer: PHP/' . phpversion();\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n $message = '<html><body>';\n $message .= $data;\n $message .= '</body></html>';\n\n /* Fatch email ids from db from starting point to end point */\n $this->db->where('email_id >=', $_POST['start']);\n $this->db->where('email_id <', $_POST['end']);\n $this->db->where('fresher', 'active');\n $email_result = $this->db->get('meonlinejobhub_email');\n if ($email_result && $email_result->num_rows() > 0) {\n foreach ($email_result->result() as $datam) {\n $to = $datam->emails;\n mail($to, $datam->emails, $message, $headers);\n }\n return TRUE;\n }\n }", "public function sendPasswordResetNotification($token){ EmailProvider::sendMail('user-resetpassword-mail',\n [ \n 'email' => $this->getEmailForPasswordReset(),\n 'url' => \n [\n 'reset_link' => 'password/reset/' . $token . '?em=' . encrypt($this->getEmailForPasswordReset()) \n ] \n ] \n ); \n}", "public function sendResetLinkEmail(Request $request)\n {\n $user = User::where('email', $request->get('email'))->first();\n if (!empty($user)) {\n if (!$user->hasRole(['type1', 'type2'])) {\n Session::flash('error', 'type1 and type2 email required!');\n return redirect()->back(); \n }\n }\n $this->validateEmail($request);\n\n $token = hash_hmac('sha256', Str::random(40), Hash::make('password'));\n $user->reset_password_token = $token;\n $user->save();\n \n $user->sendPasswordResetNotification($token);\n\n Session::flash('message', 'Reset password link send to your mail!');\n return redirect()->route('login');\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = md5($this->id . '_' . time());\n// $this->trigger(self::RESET_PASSWORD_EVENT);\n }", "public function sendResetLinkEmail(Request $request)\n {\n $this->validate($request, ['email' => 'required|email']);\n\n $email = $request->input('email');\n $user = User::where('email','=',$email)->first();\n\n if(!is_null($user) && $user->status!='active'){\n return $this->getSendResetLinkEmailFailureResponse('passwords.inactive_user');\n }\n\n $broker = $this->getBroker();\n $response = Password::broker($broker)->sendResetLink(\n $request->only('email'), $this->resetEmailBuilder()\n );\n switch ($response) {\n case Password::RESET_LINK_SENT:\n return $this->getSendResetLinkEmailSuccessResponse($response);\n case Password::INVALID_USER:\n default:\n return $this->getSendResetLinkEmailFailureResponse($response);\n }\n }", "private function sendTokenEmail()\n {\n $this->logger->notice('Reset Password', ['Method' => 'sendTokenEmail']);\n try {\n // Read the email template\n $template = file_get_contents(APP_ROOT . '/templates/email/' . $this->container->getLanguage() . '/reset_password_link.html');\n\n // Replace the % with the actual information\n $template = str_replace('%name%', $this->userDetails[\"mem_name\"], $template);\n $template = str_replace('%email%', $this->userDetails[\"mem_email_work\"], $template);\n $template = str_replace('%username%', $this->userDetails[\"mem_login\"], $template);\n $template = str_replace('%site_name%', $GLOBALS[\"setTitle\"], $template);\n $template = str_replace('%link%', $GLOBALS[\"root\"] . '/general/resetpassword.php?token=' . $this->token,\n $template);\n\n $subject = $GLOBALS[\"setTitle\"] . \" \" . $this->strings[\"email_forgot_pwd_subject\"];\n\n $this->sendNotification($template, $subject);\n } catch (Exception $exception) {\n error_log('Error sending password email: ' . $exception->getMessage());\n $this->logger->error('Forgotten Password Link Notification',\n ['userDetails' => $this->userDetails, 'Exception' => $exception->getMessage()]);\n }\n }", "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }", "public function sendResetLinkEmail(Request $request)\n {\n if(filter_var($request->post('email'), FILTER_VALIDATE_EMAIL)) {\n $this->validateEmail($request);\n\n $response = $this->broker()->sendResetLink(\n $this->credentials($request)\n );\n\n return $response == Password::RESET_LINK_SENT\n ? $this->sendResetLinkResponse($request, $response)\n : $this->sendResetLinkFailedResponse($request, $response);\n }\n\n $validator = Validator::make($request->only('email'), [\n 'email' => ['required', 'regex:/^(?:\\+88|01)?(?:\\d{11}|\\d{13})$/i']\n ], [\n 'email.required' => 'Email or Mobile number is Required!',\n 'email.regex' => 'Enter valid BD format, eg: +8801234567890 or 01234567890'\n ]);\n\n if($validator->fails()) {\n return redirect()->back()->withInput()->withErrors($validator->messages());\n }\n\n $mobile = mobileNumberForStore($request->post('email'));\n\n $client = Client::whereMobile($mobile)\n ->first();\n\n if(!$client) {\n return back()\n ->withInput($request->only('email'))\n ->withErrors(['email' => 'We can\\'t find a user with that Mobile Number.']);\n }\n\n $token = mt_rand(100000, 999999);\n $password = DB::table('client_password_resets')\n ->updateOrInsert(\n [\n 'mobile' => $mobile\n ],\n [\n 'token' => Hash::make($token),\n 'created_at' => Carbon::now()->toDateTimeString()\n ]\n );\n\n $client->sendMobileVerificationNotification($token);\n\n return redirect()->route('password.reset', ['token' => 'mobile', 'mobile' => $request->post('email')])\n ->with('status', 'We have sent your password reset verification code to your Mobile!');\n }", "public function generatePasswordResetToken(): void\n {\n $this->passwordResetToken = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function sendResetLinkEmail(Request $request)\n {\n $email = $request->get('email');\n $user = User::emailConfirmed()->where('email', $email)->first();\n if ($user) {\n $token = str_random();\n DB::table('password_resets')->where('email', $email)->delete();\n $count = PasswordReset::insert(['email' => $email, 'token' => $token, 'created_at' => Carbon::now()]);\n if ($count) {\n // 发送邮件\n event(new SendResetLinkEmailEvent($user, $token));\n\n $message = ['status' => 1, 'message' => '重置密码链接已经发送到该邮箱,请前往查看邮件'];\n } else {\n $message = ['status' => 0, 'message' => '服务器出现异常,请稍候重试'];\n }\n } else {\n $message = ['status' => 0, 'message' => '未找到合法的用户'];\n }\n\n return response()->json($message);\n }", "public function sendResetUserPasswordMail($email, $user_id)\r\n {\r\n $site_name = \"Paladins Challenge\";\r\n $subject = \"Reset your {$site_name} account password\";\r\n\r\n // Generate an user reset code\r\n $reset_code = $this->generateUserResetCode($user_id);\r\n\r\n // Url for reset link\r\n $href = \"https://{$_SERVER['SERVER_NAME']}/account-recovery/{$reset_code}\";\r\n\r\n ob_start();\r\n ?>\r\n <a href=\"<?php echo $href; ?>\">link</a>.\r\n <?php\r\n $link = ob_get_contents();\r\n\r\n // Email message\r\n $message = \"\r\n <html><head></head><body>\r\n\r\n You have requested the reset of your password. To reset it, click on the following {$link} <br> <br>\r\n\r\n If the link does not work copy it into your browser. <br>\r\n {$href} <br> <br>\r\n\r\n The link is valid for 1 hour. <br> <br>\r\n\r\n Regards, <br>\r\n Support {$site_name} <br><br>\r\n This is an automatic message, thank you for not answering it.<br>\r\n\r\n </body></html>\r\n \";\r\n\r\n // To send HTML mail, the Content-type header must be set\r\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\r\n\r\n // Additional headers\r\n $headers .= \"From: {$site_name} <no-reply@{$site_name}.com>\" . \"\\r\\n\";\r\n\r\n // Mail it\r\n mail($email, $subject, $message, $headers);\r\n }", "public function sendResetLinkEmail(Request $request)\n {\n $user = User::where('username', '=', $request->username)->first();\n\n if ($user == null)\n {\n flash()->error('These credentials do not match our records')->important();\n return redirect()->back()\n ->withInput($request->only('username', 'email'));\n //->withErrors(['email' => trans('These credentials do not match our records')]);\n }\n\n $credentialsVerified = false;\n // loop through all contacts for this user and look for supplied email address\n foreach ($user->contacts as $contact)\n {\n if (trim($contact->email) == trim($request->email))\n {\n $credentialsVerified = true;\n break;\n }\n }\n\n if (!$credentialsVerified)\n {\n flash()->error('These credentials do not match our records')->important();\n return redirect()->back()\n ->withInput($request->only('username', 'email'));\n //->withErrors(['email' => trans('These credentials do not match our records')]);\n }\n\n //Save the reset password email address in the user table\n $user->email = $request->email;\n $user->save();\n\n $broker = $this->getBroker();\n\n $response = Password::broker($broker)->sendResetLink(\n $this->getSendResetLinkEmailCredentials($request), $this->resetEmailBuilder()\n );\n\n switch ($response) {\n case Password::RESET_LINK_SENT:\n flash()->success('Password reset email has been sent.')->important();\n return $this->getSendResetLinkEmailSuccessResponse($response);\n case Password::INVALID_USER:\n default:\n flash()->error(\"Password reset cannot be completed.\")->important();\n return $this->getSendResetLinkEmailFailureResponse($response);\n }\n }", "public function generatePasswordResetToken(): void\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function sendResetLinkEmail(SendResetLinkEmailRequest $request)\n {\n $email = $request->input('email');\n $credentials = [\n 'login' => $email,\n ];\n $user = Sentinel::findByCredentials($credentials);\n\n Reminder::removeExpired(); // Clean up expired reminders\n if ($user)\n {\n $reminder = Reminder::exists($user);\n if (!$reminder)\n $reminder = Reminder::create($user);\n Mail::to($user->email)->send(new ForgotPassword($user, $reminder));\n }\n\n return redirect()->route('forgot_password.email_sent', ['email' => $email]);\n }", "public function generatePasswordResetToken() {\n\t\t$this->activation_key = Yii::$app->security->generateRandomString () . '_' . time ();\n\n\t}", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Api::$security->generateRandomString() . '_' . time();\n }", "function mailresetlink($to,$token){\n //Subject line\n $subject = \"Forgot Password on zeus.co.uk\";\n //The website that you have requested this for\n $uri = 'http://'. $_SERVER['HTTP_HOST'] ;\n $message = '\n <html>\n <head>\n <title>Forgot Password For zeus.co.uk</title>\n </head>\n <body>\n <p>Click on the given link to reset your password <a href=\"'.$uri.'/login_system/reset.php?token='.$token.'\">Reset Password</a></p>\n </body>\n </html>';\n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n //The email address that it was sent from\n $headers .= 'From: Admin<group@wearezeus.co.uk>' . \"\\r\\n\";\n \n if(mail($to,$subject,$message,$headers)){\n echo \"If you're registered we will send you an email with instructions on how to reset your password. <b>\".$to.\"</b>\"; \n }\n }", "public function sendResetLinkEmail(Request $request) {\n $this->validate($request, ['email' => 'required|email|exists:users,email'], [\n 'email.exists' => \\Lang::get('validation.password.email.exists'),\n ]);\n\n // We will send the password reset link to this user. Once we have attempted\n // to send the link, we will examine the response then see the message we\n // need to show to the user. Finally, we'll send out a proper response.\n $response = $this->broker()->sendResetLink(\n $request->only('email')\n );\n\n if ($response === Password::RESET_LINK_SENT) {\n return response()->json(true);\n }\n\n // If an error was returned by the password broker, we will get this message\n // translated so we can notify a user of the problem. We'll redirect back\n // to where the users came from so they can attempt this process again.\n return response()->json(false, 500);\n }", "public function generatePasswordResetToken()\n\t{\n\t\t$this->u_password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = \\Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function sendResetLinkEmail(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email'\n ]);\n\n if( ! $validator->fails() )\n {\n if( $user = Admin::where('email', $request->input('email') )->first() )\n {\n $token = Str::random(64);\n\n DB::table(config('auth.passwords.admins.table'))->insert([\n 'email' => $user->email,\n 'token' => $token\n ]);\n $user->sendPasswordResetNotification($token);\n return redirect()->back()->with('status', trans(Password::RESET_LINK_SENT));\n }\n }\n return redirect()->back()->withErrors(['email' => trans(Password::INVALID_USER)]);\n }", "public function sendResetPassword(){\n\n $email = Input::get('email');\n\n $user = Admin::where('email', '=', $email)->first();\n $count = Admin::where('email', '=', $email)->count();\n\n if($count > 0){ #Existing User\n\n #Generate a random access code for password reset\n $accesscode = Str::random(5);\n $user->accesscode = $accesscode;\n $user->save();\n\n #Send the user an email with accesscode\n $email_data = [\n 'recipient' => $email,\n 'subject' => 'PSAP Database: Reset Password'\n ];\n\n $view_data = [\n 'accesscode' => $accesscode,\n 'user' => $user\n ];\n\n #Send Email\n Mail::send('emails.reset', $view_data, function($message) use ($email_data){\n $message->to($email_data['recipient'])\n ->subject($email_data['subject']);\n });\n\n return View::make('success', ['message' => 'Please check your email for access code and password link']);\n\n }else{ # This user does not exist, ask them to register first\n\n $message = \"Your email is not registered! Please email our admin to receive an access code.\";\n return View::make('error', ['message' => $message]);\n }\n\n }", "private function send_reset_link( $toEmail ) {\n $notification = $this->email_notification( 'password_reset_link' );\n $message = $notification['message'];\n $from = ( ! empty( $notification['from_name'] ) ) ? $notification['from_name'] : $this->appName;\n $fromEmail = $notification['email'];\n $subject = $notification['subject'];\n $fullname = $this->userData['firstname'] . ' ' . $this->userData['lastname'];\n $authCode = $this->db->generate_code( 20, array( 'number', 'caps', 'small' ) );\n $encryptedAuthCode = $this->db->encrypt( $authCode, $this->encryptionType );\n $emailKeys = array(\n '{firstname}' => $this->userData['firstname'],\n '{fullname}' => $fullname,\n '{url}' => $this->appURL,\n '{school-uname}' => $this->uniqueName,\n '{auth-code}' => $authCode,\n '{app-name}' => $this->appName\n );\n\n $message = string_keys_replace( $message, $emailKeys );\n $this->branchID = $this->userData['branch_id'];\n\n $updateData = array(\n $this->fieldPrefix . 'auth_code' => $encryptedAuthCode\n );\n\n if ( $this->superUser ) {\n $tableName = $this->superUserTable;\n $whereClause = \"WHERE `\" . $this->fieldPrefix . \"id` = '\" . $this->db->escape( $this->userID ) . \"' LIMIT 1\";\n } else {\n $tableName = $this->userTableName;\n $whereClause = \"WHERE `\" . $this->fieldPrefix . \"branch_id` = '\" . $this->db->escape( $this->branchID ) . \"' AND `\" . $this->fieldPrefix . \"id` = '\" . $this->db->escape( $this->userID ) . \"' LIMIT 1\";\n }\n\n $updated = $this->db->update(\n $tableName,\n $updateData,\n $whereClause\n );\n\n if ( ! $updated ) {\n $this->errorMsg[] = 'unable_to_reset';\n return FALSE;\n }\n\n $mailData = array (\n 'to' => $fullname,\n 'to_email' => $toEmail,\n 'from' => $from,\n 'from_email' => $fromEmail,\n 'subject' => $subject,\n 'message' => $message\n );\n\n if ( send_email( $mailData ) ) {\n $this->access = TRUE;\n $this->confirmMsg = 'reset_link_sent';\n } else {\n $this->access = FALSE;\n $this->errorMsg[] = 'email_not_sent';\n }\n return $this->access;\n }", "public function generatePasswordResetToken() {\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();\n\t}", "public function actionSendResetPasswordEmail()\n {\n $email = $this->getParams('email');\n $email = mb_strtolower($email);\n\n if (empty($email)) {\n throw new InvalidParameterException(['reset-email' => Yii::t('common', 'email_is_required')]);\n }\n if (!StringUtil::isEmail($email)) {\n throw new InvalidParameterException(['reset-email' => Yii::t('member', 'email_format_error')]);\n }\n\n //validate the email\n $user = User::getByEmail($email);\n\n if (empty($user)) {\n throw new InvalidParameterException(['reset-email' => Yii::t('common', 'incorrect_userid')]);\n }\n\n if (!empty($user) && !$user->isActivated) {\n throw new InvalidParameterException(['reset-email' => Yii::t('common', 'user_not_activate')]);\n }\n\n //generate the validation\n $validation = new Validation;\n $validation->userId = $user->_id;\n $validation->expire = new \\MongoDate(strtotime('+7 day'));\n\n if (!$validation->save()) {\n throw new ServerErrorHttpException(\"Failed to save validation\");\n }\n\n $host = Yii::$app->request->hostInfo;\n $link = $host . '/site/resetpassword?code=' . $validation->code;\n $mail = Yii::$app->mail;\n $vars = [\n 'name' => $user->name,\n 'link' => $link,\n 'host' => $host\n ];\n $mail->setView('//mail/resetPassword', $vars, '//layouts/email');\n $mail->sendMail($user->email, '群脉重置密码');\n return ['status' => 'ok'];\n }", "public function generatePasswordResetToken()\n {\n $this->passwordResetToken = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\r\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\r\n }", "function notify_reset($user) {\n \n if(!$user->email)\n return false;\n\n $app = \\Slim\\Slim::getInstance();\n \n $message = \"Hello, <br>\";\n \n $message .= \"<br> You have requested a link to reset your password. <br>\";\n \n $message .= \"To reset your password please click the following link: <br>\";\n \n $reset_link = app_url() . \"/reset/\" . $user->reset_token;\n \n $message .= '<a href=\"'.$reset_link.'\">'.$reset_link.'</a> <br>';\n \n $message .= \"<br> The reset link will expire after 5 days. <br>Thanks\";\n \n $subject = get_config('appname') . \": Account password reset\";\n \n mail($user->email, $subject, $message, get_notifier_headers(get_config('admin_email')));\n \n}", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n \t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n\t{\n\t\t$this->passwordResetToken = Yii::$app->security->generateRandomString() . '_' . time();\n\t}", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }", "public function generatePasswordResetToken() {\n\t\t$this -> password_reset_token = Security::generateRandomKey() . '_' . time();\n\t}", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString()\n . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n\t{\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n }", "public function send_reset_mail(){\n $config['mailtype'] = 'html';\n\n //$this->email->initialize($config);\n\n $this->load->library('email',$config);\n\n $this->email->to($email);\n $this->email->from('noreply@paradigmfinance.com');\n $this->email->subject('Welcome '.$user_name.'');\n $this->email->message('<div style=\"padding:10px;max-width:600px;\"><p>Hi '.$user_name. '</p>' . '&nbsp <p>we sorry you forgot your password kindly follow the link below to reset .</p><a href=\"'. base_url() .'/verify/'. md5($email).'\" >Reset Password<\\a> <p style=\"font-size:8pt;text-align:center;\" >if you didnt request a password reset, kindly ignore this mail and report to the IT unit immediately</p></div>');\n $r = $this->email->send();\n \n /****** end mail user reset password link ***********/ \n\n if (!$r){\n\n $this->email->print_debugger();\n\n }\n else {\n\n echo 'email sent' ;\n\n\n }\n \n \n \n }" ]
[ "0.7540284", "0.7414844", "0.730037", "0.7293489", "0.7269715", "0.7263968", "0.7263667", "0.72308004", "0.72262776", "0.71998495", "0.71242577", "0.7121844", "0.710017", "0.7075733", "0.7071662", "0.70571595", "0.7048359", "0.70341873", "0.702477", "0.70202327", "0.7018484", "0.7005995", "0.7000348", "0.69984406", "0.69942623", "0.6988445", "0.69838864", "0.69689834", "0.6967013", "0.69592565", "0.6947897", "0.6946591", "0.6945722", "0.694176", "0.6941286", "0.69354457", "0.69354457", "0.69354457", "0.69354457", "0.69354457", "0.69354457", "0.6926251", "0.69258803", "0.6924891", "0.6924891", "0.6924891", "0.6923932", "0.69173527", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.69144195", "0.6913004", "0.6910812", "0.69096094" ]
0.7743636
0
Locks this object using the provided key. The object can only be unlocked by providing the same key.
Заблокирует этот объект с использованием предоставленного ключа. Объект может быть разблокирован только с использованием того же ключа.
public function lock($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lockKey($key);", "protected function lock($key)\n {\n $this->locked[] = $key;\n }", "public function lock($key) {\n $lockKey = $this->getLockKey($key);\n $this->io->set($lockKey, 1);\n }", "function lock($Key) {\n $this->cache_value('lock_' . $Key, 'true', 3600);\n }", "public function lock($key) {\n\t\treturn $this->memcached->add('lock:'.$key, 1);\n\t}", "public function lockIdentityKey($key) {\n $key=SQRLPublicKey::get()->filter('Public_Key', Convert::raw2sql($key))->first();\n if(!empty($key) && $key!==false && $key->ID>0) {\n $key->Disabled=true;\n $key->write();\n }\n }", "function lock($key)\n {\n return false;\n }", "function semLock( $inKey ) {\n return semaphoreOp( $inKey, \"lock\" );\n }", "public function lock_key($column, $key, $mode);", "private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add($key . '.lock', '', 5);\n }", "private function lock($itemKey)\n {\n $lockKey = $itemKey . $this->lockItemPrefix;\n\n $result = parent::add($lockKey, 1, $this->lockLifetime);\n\n return $result;\n }", "public function acquire($key);", "public function unlock($key);", "public function lock();", "public function lock();", "public function lock();", "public function lock();", "public function lock($id);", "public function storeIdentityLock($key, $suk, $vuk);", "public function lock_key($key, &$auto_unlocker_variable)\n\t{\n\t\t$r = $this->memcache->add($this->lock_key_prefix.$key, 1, null, $this->key_lock_time);\n\t\tif (!$r) return false;\n\t\t$auto_unlocker_variable = new KeyAutoUnlocker(array($this, 'unlock_key'));\n\t\t$auto_unlocker_variable->setKey($key);\n\t\treturn true;\n\t}", "public function lock_key($key, &$auto_unlocker_variable) {\n\t\t$r = $this->redis->SetNX ( $this->lock_key_prefix . $key, 1 );\n\t\tif (! $r)\n\t\t\treturn false;\n\t\t$this->redis->Expire ( $this->lock_key_prefix . $key, self::key_lock_time );\n\t\t$auto_unlocker_variable = new KeyAutoUnlocker ( array ($this, 'unlock_key' ) );\n\t\t$auto_unlocker_variable->key = $key;\n\t\treturn true;\n\t}", "public function lock(): void\n {\n $this->locked = true;\n }", "public function lock()\n {\n $this->locked = true;\n }", "public function unlock($key) {\n $lockKey = $this->getLockKey($key);\n $this->io->set($lockKey);\n }", "public function lock() {}", "public function lock() {\n if ($this->lock_count++) {\n return;\n }\n if (!sem_acquire($this->semaphore)) {\n throw new Exception(\"Unable to get lock on shared memory for : \" . $this->bin . ' : ' . $this->file);\n }\n }", "public function lock()\n {\n $this->is_locked = true;\n \n // transaction do\n self::connection()->executeSql(\"UPDATE wiki_pages SET is_locked = TRUE WHERE id = ?\", $this->id);\n self::connection()->executeSql(\"UPDATE wiki_page_versions SET is_locked = TRUE WHERE wiki_page_id = ?\", $this->id);\n // end\n }", "public function lock($namespace, $key) {\n\t\tif (isset($this->locks[$this->prefix][$namespace][$key])) return false;\n\t\t$this->locks[$this->prefix][$namespace][$key] = 1;\n\n\t\treturn true;\n\t}", "public function setKey($key)\n {\n if($this->isWritable())\n {\n $this->key = $key;\n }\n }", "public function owns_lock( $lock_key ) {\n\t\t\tif ( empty( $this->lock ) ) {\n\t\t\t\t$this->lock = get_transient( 'dfm_lt_' . $this->key );\n\t\t\t}\n\t\t\tif ( $this->lock === $lock_key ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function lock(object $entity, LockMode|int $lockMode, DateTimeInterface|int|null $lockVersion = null): void;", "final public static function lock($mutex) {}", "public function lock() : void {\n $this->lock = true;\n }", "public function lock_update() {\n\t\t\tset_transient( 'dfm_lt_' . $this->key , $this->lock_key, 400 );\n\t\t}", "public function lock()\n\t{\n\t\t$this->immutable = true;\n\t}", "public function getLockKey();", "protected function getLockKey($key) {\n return $key . self::LOCK_SUFFIX;\n }", "public function releaseLock( $key )\n {\n apc_delete( $key );\n }", "private function lock(): void\n {\n $lock_result = flock($this->file_handle, $this->getLockType());\n // if there is an error acquiring the lock, throw an exception\n if ($lock_result === false) {\n throw new Exception(\"Failed to acquire a lock of type \" . $this->getLockType() . \" on file $this->file_name\");\n }\n }", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setCommuterId($key);\n\t}", "protected function generateLockKey ($key)\n {\n return \"{$key}_lock\";\n }", "public function lockClient($client_id);", "abstract public function unlocksWithKey(Key $key): bool;", "public function lock($key, $ttl = null){\r\n\t\r\n\t\t$item = $this->cache->getItem($this->namespace . $key);\r\n\t\treturn $item->lock($ttl);\r\n\t\r\n\t}", "public function acquire(): Lock;", "public function lock() {\n\t\tif ($this->isLocked()) {\n\t\t\tthrow new LockException(\"cannot lock already locked node: $this->workspace=>$this->path\");\n\t\t}\n\t\t\t\t\n\t\t$this->pm->setProperty($this->path, 'pcr:isLocked', true);\n\t\t$this->pm->setProperty($this->path, 'pcr:lastModified', Utility::getTimeStamp());\n\t}", "public function lockForm($key = '')\n\t{\n\t\tif(Session::exists(\"lockForm_{$this->name}\"))\n\t\t\tSession::remove(\"lockForm_{$this->name}\");\n\n\t\t$hash = md5($key . Date::timestamp());\n\t\tSession::set(\"lockForm_{$this->name}\", $hash);\n\t\treturn $hash;\n\t}", "public function lock( )\n {\n $this->locked = true;\n return $this;\n }", "protected abstract function lock() : bool;", "function lock() ;", "public function setLockId($var)\n {\n GPBUtil::checkInt64($var);\n $this->lock_id = $var;\n\n return $this;\n }", "public function setLockId($var)\n {\n GPBUtil::checkInt64($var);\n $this->lock_id = $var;\n\n return $this;\n }", "public function setKey($key)\n {\n $this->_key = $key;\n }", "public function setKey($key)\n {\n $this->_key = $key;\n }", "public function lock ()\n\t{\n\t\twarning('Static entity '. $this->id .' of type '. get_class($this) .' attempted to request lock', 1);\n\t\treturn FALSE;\n\t}", "public function forLock($lock = TRUE);", "public function setKey($key)\n\t{\n\t\t$this->_key = $key;\n\t}", "abstract public function lock(int $expiryTime, string $id);", "public function setKey($key)\n\t{\n \t\t$this->_k = $key;\n\t}", "public function setKey($key) {\n if (!isset($this->key)) {\n $this->key = $key;\n }\n }", "public function setPrimaryKey($key)\n {\n $this->setOid($key);\n }", "public function key($key) {\n $this->_key = $key;\n }", "public function lockAndBlock();", "public function lock()\n {\n $this->_isLocked = true;\n flock($this->_getLockFile(), LOCK_EX | LOCK_NB);\n return $this;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey( $key )\n {\n $this->key = $key;\n }", "public function setKey($key);", "public function setKey($key);", "abstract protected function acquireLock($sessionId = null);", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "private function removeLock($key) {\n @apc_delete($key . '.lock');\n }", "public function lock()\n\t{\n\t\t// attempts to place a 10 second lock the game row in the database via the `atomicLock` column\n\t\t// reloads the game object after becoming locked\n\t\t// times out after 30 seconds\n\n\t\tglobal $maindb;\n\t\tglobal $mysqli;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = null;\n $t_failTime = new DateTime('now');\n $t_failTime->add(new DateInterval(\"PT30S\"));\n\n while (!is_array($a_games) || count($a_games) == 0) {\n $t_currTime = new DateTime('now');\n $t_lockTime = new DateTime('now');\n $t_lockTime->add(new DateInterval(\"PT30S\"));\n $s_currTime = getStringFromDateTime($t_currTime);\n $s_lockTime = getStringFromDateTime($t_lockTime);\n\n if ($t_currTime >= $t_failTime) {\n return FALSE;\n }\n\n $b_success = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='{$s_lockTime}' where `roomCode`='[roomCode]' and `atomicLock` <= '{$s_currTime}'\", $a_params);\n if ($b_success && $mysqli->affected_rows > 0) {\n \tbreak;\n }\n\n // don't hit the mysql server too hard\n sleep(1);\n }\n\n self::loadByRoomCode($this->getRoomCode(), TRUE, $this);\n return TRUE;\n\t}", "public function setKey($key)\r\n {\r\n if (is_string($key)) {\r\n self::$key = $key;\r\n\r\n if (self::$id !== null) {\r\n $this->setToken(self::$id . ':' . self::$key);\r\n }\r\n }\r\n }", "public function lock()\n {\n $this->loadLockData();\n if ($this->getId()) {\n $this->delete();\n }\n\n $this->setData(array(\n 'user_id' => $this->_getSession()->getUser()->getId(),\n 'user_name' => $this->_getSession()->getUser()->getName(),\n 'session_id' => $this->_getSession()->getSessionId(),\n 'started_at' => time()\n ));\n $this->save();\n\n return $this;\n }", "public function lockToNormal() {}", "public static function lock( $key, $wait = null, \n\t\t&$val = null, $threshold = null, $limit = null )\n\t{\n\t\tif (self::$cache) {\n\t\t\treturn self::$cache->lock( $key, $wait, $val, $threshold, $limit );\n\t\t}\n\t\treturn false;\n\t}", "public function lock(){\n\n\t\t\t\t$this->lock\t=\tTRUE;\n\t\t\t\treturn $this;\n\n\t\t\t}", "private function waitForLock($key) {\n $tries = 20;\n $cnt = 0;\n do {\n // 250 ms is a long time to sleep\n usleep(250);\n $cnt ++;\n } while ($cnt <= $tries && $this->isLocked($key));\n if ($this->isLocked($key)) {\n // 5 seconds passed\n $this->removeLock($key);\n }\n }", "function semInitLock( $inKey ) {\n return semaphoreOp( $inKey, \"initLock\" );\n }", "public function key($key) {\n\n\t\t$this->setKey($key);\n\n\t\treturn $this;\n\t}", "function lock($id)\n {\n // Replace lock\n if ( $id > 0 && !$this->is_locked($id) )\n {\n\n if(!isset($this->session['PAGE_ACTIVE_TIMER']))\n $this->session['PAGE_ACTIVE_TIMER'] = array();\n\n $this->session['PAGE_ACTIVE_TIMER'][$id] = time();\n\n $sql = 'REPLACE INTO webpage_locks';\n $sql .= '(webpage_id, locker_id, last_active_timestamp)';\n $sql .= \" VALUES($id, {$this->user->getId()}, \" . $this->kernel->db->escape(gmdate('Y-m-d H:i:s', time())) . \")\";\n $statement = $this->kernel->db->query( $sql );\n if ( !$statement )\n {\n $error_msg = array_pop($this->kernel->db->errorInfo());\n $this->kernel->db->rollback();\n $this->kernel->quit( 'DB Error: ' . $error_msg, $sql, __FILE__, __LINE__ );\n }\n }\n }", "protected function lockAction()\n {\n $this->changeStatusAction\n ->setAccess($this, Access::CAN_LOCK)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__,[], [],\n ['status' => 'lock'])\n ->endAfterExecution();\n }", "public function setPrimaryKey($key)\n {\n $this->setID($key);\n }", "public function setKey($key)\n {\n $result = $this->pressKey($key);\n if (!$result) return $result;\n $result = $this->releaseKey($key);\n return $result;\n }", "public function setKey($key)\n {\n $this->_key = $key;\n return $this;\n }", "function lock() {\n if (($this->statefh = fopen($this->statefile, \"c+\")) === false)\n die(\"$this->statefile: cannot LOCK (open r/w)\");\n if (flock($this->statefh, LOCK_EX) === false)\n die(\"$this->statefile: cannot LOCK (flock())\");\n }", "public function lock($onChanged=null)\n {\n $lock = new Locking\\PessimisticLock($this);\n $locked = $lock->acquire();\n\n if (is_callable($onChanged) && !$locked->equals($this)) {\n call_user_func($onChanged, $this, $locked);\n }\n\n // reload data from locked\n $this->_data = $locked->_data;\n\n return $this;\n }", "public function setKey($key)\n {\n $this->entity->setKey($key);\n\n return $this;\n }", "public function unlockIdentityKey($key) {\n $key=SQRLPublicKey::get()->filter('Public_Key', Convert::raw2sql($key))->first();\n if(!empty($key) && $key!==false && $key->ID>0) {\n $key->Disabled=false;\n $key->write();\n }\n }", "public function lock($name) {\n\t\t$this->locked[$name] = true;\n\t}", "public function unlock($key) {\n\t\treturn $this->memcached->delete('lock:'.$key);\n\t}", "protected function _setKey($key)\n {\n $this->key = $key;\n\n return $this;\n }", "public function updateLocks() {}", "public static function unlock( $key )\n\t{\n\t\tif (self::$cache) {\n\t\t\treturn self::$cache->unlock( $key );\n\t\t}\n\t\treturn false;\n\t}", "private function requestLock() { // {{{\n\t\t$msg = $pid = $name = $value = null;\n\n\t\tif (!$this->send(self::$LOCKSYN, $name, $value)) return false;\n\n\t\tif (!$this->receive($msg, $pid, $name, $value)) return false;\n\n\t\tif ($msg != self::$LOCKACK)\n\t\t\treturn false;\n\n\t\t$this->ownerPid = $this->myPid;\n\t\treturn true;\n\t}", "public function setPrimaryKey($key)\n {\n $this->setResourceId($key);\n }", "public function lock($key, $ttl, $blocking = true)\n {\n $token = strtoupper(uniqid('LOCK'));\n $script = <<<EOS\n local lock = redis.call('setnx', KEYS[1], KEYS[3])\n if lock == 1 then\n redis.call('pexpire', KEYS[1], KEYS[2])\n end\n return lock\nEOS;\n if (false !== $hash = $this->script('load', $script)) {\n $ret = (bool) $this->evalSha($hash, array($key, $ttl, $token), 3);\n while ($blocking && false === $ret) {\n $ret = (bool) $this->evalSha($hash, array($key, $ttl, $token), 3);\n }\n } else {\n throw new \\RedisException('Could not load lock script');\n }\n\n return ($ret) ? [$key, $token] : $ret;\n }" ]
[ "0.8398035", "0.7954898", "0.76400304", "0.72995216", "0.7176977", "0.7123412", "0.67309165", "0.6676038", "0.65074676", "0.6383881", "0.63827646", "0.6363575", "0.63618994", "0.6270305", "0.6270305", "0.6270305", "0.6270305", "0.62681353", "0.61241525", "0.61065626", "0.60830796", "0.60339105", "0.6021066", "0.6018749", "0.5965555", "0.5964729", "0.59616524", "0.59406585", "0.58798075", "0.5858668", "0.58498377", "0.583749", "0.5813055", "0.5802291", "0.5801939", "0.5800785", "0.57874495", "0.5781817", "0.57689023", "0.5740536", "0.57331735", "0.57270896", "0.5702536", "0.5700939", "0.56713486", "0.56554246", "0.56544286", "0.5652986", "0.5630718", "0.56294006", "0.562726", "0.562726", "0.56221926", "0.56221926", "0.5575458", "0.55678385", "0.55677074", "0.556122", "0.55528784", "0.55380845", "0.5525464", "0.55107313", "0.55054367", "0.54940677", "0.54926056", "0.54926056", "0.54926056", "0.54926056", "0.5486419", "0.54841864", "0.54841864", "0.5473203", "0.54718876", "0.5467715", "0.5465238", "0.54503596", "0.5423833", "0.5422548", "0.541446", "0.5410538", "0.54016703", "0.53894573", "0.53821963", "0.53779846", "0.5376827", "0.53751844", "0.53685194", "0.5366338", "0.53471076", "0.5342286", "0.5338489", "0.5338139", "0.5331393", "0.5328999", "0.5323262", "0.5321588", "0.5306216", "0.53026044", "0.53020567", "0.5300539" ]
0.8375013
1
Attempts to unlock the collector with the provided key. Key comparison is done using the identity operator (===).
Попытка разблокировать сборщик с помощью предоставленного ключа. Сравнение ключа производится с использованием оператора идентичности (===).
public function unlock($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function unlocksWithKey(Key $key): bool;", "public static function unlock( $key )\n\t{\n\t\tif (self::$cache) {\n\t\t\treturn self::$cache->unlock( $key );\n\t\t}\n\t\treturn false;\n\t}", "public function unlock($key) {\n\t\treturn $this->memcached->delete('lock:'.$key);\n\t}", "public function unlockIdentityKey($key) {\n $key=SQRLPublicKey::get()->filter('Public_Key', Convert::raw2sql($key))->first();\n if(!empty($key) && $key!==false && $key->ID>0) {\n $key->Disabled=false;\n $key->write();\n }\n }", "public function unlock($key) {\n $lockKey = $this->getLockKey($key);\n $this->io->set($lockKey);\n }", "public function releaseLock( $key )\n {\n apc_delete( $key );\n }", "function semUnlock( $inKey ) {\n return semaphoreOp( $inKey, \"unlock\" );\n }", "public function lockKey($key);", "public static function unlock($key='_captcha') {\n\t\t/* set the key */\n\t\t$_SESSION[$key] = uniqid();\n\t\t\n\t\t/* done */\n\t\treturn self::encode(array($key=>$_SESSION[$key]));\n\t}", "public function unlock($key)\n {\n Redis::connection($this->connection)->del($this->getKey($key));\n\n return true;\n }", "public function lock($key);", "private function removeLock($key) {\n @apc_delete($key . '.lock');\n }", "public function release($key);", "function releaseforfill ($key) {\n return $this->_cache->delete($this->prefix . $key . '_forfill');\n }", "protected abstract function unlock() : bool;", "function lock($key)\n {\n return false;\n }", "public function acquire($key);", "public function invalidate(string $key): void;", "public function unlock_key(KeyAutoUnlocker $auto_unlocker)\n\t{\n\t\t$key = $auto_unlocker->getKey();\n\t\tif (empty($key))\n\t\t{\n\t\t\t$this->ReportError('Empty key in the AutoUnlocker', __LINE__);\n\t\t\treturn false;\n\t\t}\n\t\t$auto_unlocker->revoke();\n\t\treturn $this->memcache->delete($this->lock_key_prefix.$key);\n\t}", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key) {}", "private function unlock($itemKey)\n {\n $lockKey = $itemKey . $this->lockItemPrefix;\n\n return parent::delete($lockKey, 1, $this->lockLifetime);\n }", "public function unlock();", "private function waitForLock($key) {\n $tries = 20;\n $cnt = 0;\n do {\n // 250 ms is a long time to sleep\n usleep(250);\n $cnt ++;\n } while ($cnt <= $tries && $this->isLocked($key));\n if ($this->isLocked($key)) {\n // 5 seconds passed\n $this->removeLock($key);\n }\n }", "abstract protected function releaseLock();", "public function unlock() {}", "public function lockIdentityKey($key) {\n $key=SQRLPublicKey::get()->filter('Public_Key', Convert::raw2sql($key))->first();\n if(!empty($key) && $key!==false && $key->ID>0) {\n $key->Disabled=true;\n $key->write();\n }\n }", "public function unlock_key(KeyAutoUnlocker $auto_unlocker) {\n\t\tif (empty ( $auto_unlocker->key )) {\n\t\t\t$this->ReportError ( 'autoUnlocker should be passed', __LINE__ );\n\t\t\treturn false;\n\t\t}\n\t\t$auto_unlocker->revoke ();\n\t\treturn $this->redis->Del ( $this->lock_key_prefix . $auto_unlocker->key );\n\t}", "public function forget(string $key): bool;", "public function forget(string $key): bool;", "function drop($key)\n\t{\n\t\treturn $this->peer->drop($this->mangleKey($key));\n\t}", "function __unset($key) {\n\t\t$this->clear($key);\n\t}", "function IsKeyReleased(int $key): bool { return false; }", "public function testFailAcquireLock(Mutex $mutex, callable $blockKey)\n {\n $blockKey();\n $mutex->synchronized(function () {\n $this->fail(\"execution is not expected\");\n });\n }", "public function maybe_deactivate_key() {\n\n if ( ! $this->is_deactivating_key() ) {\n return;\n }\n\n if ( ! $this->deactivate_key_action() ) {\n return;\n }\n\n $this->deactivate_key();\n\n }", "public static function process_unlock_request( $unlock_key ) {\n\t\tif ( ! isset( $_GET['auth_key'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if URL contains unlock key in query param then process the request.\n\t\t$unlock_key = strip_tags( $_GET['auth_key'] );\n\n\t\tglobal $wpdb;\n\t\t$lockdowns_table_name = Login_Limit::get_setting( 'db_lockdowns' );\n\t\t$ip = Login_Limit::get_user_ip();\n\n\t\t// current locked user by unlock key.\n\t\t$ip_range = Login_Limit::get_ip_range( $ip );\n\t\t$now = current_time( 'mysql' );\n\t\t$locked_user = $wpdb->get_row(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"SELECT * FROM $lockdowns_table_name WHERE release_date > %s AND lockdown_ip LIKE %s AND unlock_key = %s\", array( $now, $ip_range . '%', $unlock_key )\n\t\t\t)\n\t\t);\n\n\t\tif ( ! $locked_user ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$whitelists_ip = ( isset( $locked_user->whitelists_ip ) ) ? (array) @unserialize( $locked_user->whitelists_ip ) : array();\n\t\tif ( ! in_array( $ip, $whitelists_ip ) ) {\n\t\t\t$whitelists_ip[] = $ip;\n\t\t}\n\n\t\t$result = $wpdb->update(\n\t\t\t$lockdowns_table_name,\n\t\t\tarray(\n\t\t\t\t'whitelists_ip' => serialize( $whitelists_ip ),\n\t\t\t),\n\t\t\tarray( 'lockdown_id' => $locked_user->lockdown_id ),\n\t\t\tarray(\n\t\t\t\t'%s',\n\t\t\t\t'%d',\n\t\t\t)\n\t\t);\n\n\t\tif ( $result ) {\n\t\t\tself::redirect_to_url( wp_login_url() );\n\t\t}\n\t}", "public function unlock($namespace, $key) {\n\t\tif (!isset($this->locks[$this->prefix][$namespace][$key])) return false;\n\t\tunset($this->locks[$this->prefix][$namespace][$key]);\n\n\t\treturn true;\n\t}", "public function detach($key)\r\n\t{\r\n\t\tunset($this->listeners[$key]);\r\n\t}", "public function unlock(): bool;", "public function __unset($key)\n {\n }", "public static function drop($key)\n\t{\n\t\treturn static::provider()->drop($key);\n\t}", "public function __unset($key)\n {\n }", "public function __unset($key)\n {\n }", "public function testUnlock()\n {\n $this->assertNotLocked('1234567890.abcdefghijabcdefghij');\n $this->store->unlock(1234567890, 'abcdefghijabcdefghij');\n $this->assertNotLocked('1234567890.abcdefghijabcdefghij');\n $this->assertHandleNotExists('1234567890.abcdefghijabcdefghij');\n\n // lock and then unlock again\n $this->store->lock(1357913579, 'abcdefghijabcdefghij');\n $this->assertLocked('1357913579.abcdefghijabcdefghij');\n $this->store->unlock(1357913579, 'abcdefghijabcdefghij');\n $this->assertNotLocked('1357913579.abcdefghijabcdefghij');\n\n // non-existing file: *not* supposed to throw an Exception\n $this->store->unlock(1234567890, 'someotherid');\n }", "public function testFailReleasingLock()\n {\n $mutex = new MemcachedMutex(\"testFailReleasingLock\", $this->memcached, 1);\n $mutex->synchronized(function () {\n $this->memcached->delete(MemcachedMutex::PREFIX.\"testFailReleasingLock\");\n });\n }", "public function deactivate_key() {\n\n // Perform a request to deactivate the key.\n $deactivate = $this->perform_remote_request( 'deactivate-key', array( 'tgm-updater-key' => $_POST['monsterinsights-license-key'] ) );\n\n // If it returns false, send back a generic error message and return.\n if ( ! $deactivate ) {\n $this->errors[] = esc_html__( 'There was an error connecting to the remote key API. Please try again later.', 'google-analytics-for-wordpress' );\n return;\n }\n\n // If an error is returned, set the error and return.\n if ( ! empty( $deactivate->error ) ) {\n $this->errors[] = $deactivate->error;\n return;\n }\n\n // Otherwise, our request has been done successfully. Reset the option and set the success message.\n $this->success[] = isset( $deactivate->success ) ? $deactivate->success : esc_html__( 'Congratulations! You have deactivated the key from this site successfully.', 'google-analytics-for-wordpress' );\n update_option( 'monsterinsights_license', array() );\n if ( is_multisite() && is_network_admin() ) {\n update_site_option( 'monsterinsights_license', array() );\n } else {\n update_option( 'monsterinsights_license', array() );\n }\n\n }", "public function unregister($key)\n {\n return $this->storage->unsetData($key);\n }", "function unlock() ;", "public function __unset($key){\n \n unset($this->v[$key]);\n \n }", "public function __unset($key)\n {\n return $this->adapter->delete($key);\n }", "public function __unset($key)\n {\n $this->remove($key);\n }", "abstract public function drop($key);", "abstract public function drop($key);", "public function shouldInvalidate(string $key): bool;", "public function __unset($key) {\n $this->remove($key);\n }", "public function __unset($key)\n {\n $this->delete($key);\n }", "public function __unset($key)\n {\n $this->delete($key);\n }", "public function removeLock() {}", "public function forget(string $key): static;", "private function memcached_unset($key)\n {\n // Return memcached variable\n return $this->data->delete($key);\n }", "public function denyActivation(string $key): bool\n {\n\n // Get tokendate from db\n $tokenhandler = new ActivationToken($this->db);\n $tokenhandler->setSelectorTokenString($key);\n $tokenhandler->loadTokenData();\n\n // Get tokendate from db\n $id_user = $tokenhandler->getUserId();\n\n // Nothings to do when already removed\n if (empty($id_user)) {\n return false;\n }\n\n // Remove the user and the token\n $this->deleteUser(new User($id_user));\n $tokenhandler->deleteActivationToken();\n\n return true;\n }", "abstract public function unlock(int $expiryTime, string $id);", "public function unlock() {\n\t\tif (!$this->beforeUnlock()) {\n\t\t\treturn false;\n\t\t}\n\t\t$redis = $this->getConnection()->getClient();\n\t\t$value = $redis->get($this->name);\n\t\t$decimalPlaces = max(strlen(substr($value,strpos($value,\".\"))),strlen(substr($this->_expiresAt,strpos($this->_expiresAt,\".\")))) - 1;\n\t\tif (bccomp($value,$this->_expiresAt,$decimalPlaces) == -1 && bccomp($value,microtime(true),$decimalPlaces) == 1) {\n\t\t\treturn false;\n\t\t}\n\n\n\t\t$redis->delete($this->name);\n\t\t$this->afterUnlock();\n\t\treturn true;\n\t}", "public function remove( $key );", "protected function _checkSetKey( &$key ) {\n\n\t}", "protected function lock($key)\n {\n $this->locked[] = $key;\n }", "public function forget($key)\n\t{\n\t\tif (file_exists($this->options['cache_dir'] . $key)) {\n\t\t\tunlink($this->options['cache_dir'] . $key);\n\t\t}\n\t}", "public function unset($key)\n {\n $this->bridge->unset($key);\n }", "public function expire($key)\r\n {\r\n \tunset($this->items[$key]);\r\n \t$this->store->delete($key);\r\n \t\r\n }", "public function removeFromLibmemcached($key)\n {\n if (!$this->memcached) {\n $this->connect();\n }\n\n $actual = $this->memcached->get($key);\n\n $this->debugSection('Value', $actual);\n\n if ($this->memcached->getResultCode() === Memcached::RES_SUCCESS) {\n $actual = $this->memcached->delete($key);\n\n $this->assertTrue(\n $actual,\n \"Cannot delete key '$key' from Memcached\"\n );\n }\n }", "function cacheClearByKey($key)\n {\n if (Cache::has(md5($key))) Cache::forget(md5($key));\n }", "public function destroy($_key);", "public function unlock()\n\t{\n\n\t\tglobal $maindb;\n\t\t$a_params = array('roomCode' => $this->getRoomCode());\n $a_games = db_query(\"UPDATE `{$maindb}`.`games` SET `atomicLock`='0000-00-00 00:00:00' where `roomCode`='[roomCode]'\", $a_params);\n\t}", "public function withScheduleLocked(string $key, callable $callback);", "protected function _checkGetKey( &$key ) {\n\n\t}", "public function forget($key)\n {\n $this->store()->forget($key);\n }", "public function __get($key) {\n\t\treturn $this->disclose($key);\n\t}", "public function remove($key) {}", "public function consumeKey(string $key) : bool;", "private function unlock() {\n\t\tif(!file_exists(FILE_UNLOCKED)) {\n\t\t\tif(file_exists(FILE_LOCKED)) {\n\t\t\t\tunlink(FILE_LOCKED);\n\t\t\t}\n\t\t\t$file = fopen(FILE_UNLOCKED, 'w');\n\t\t\tfclose($file);\n\t\t}\n\t}", "protected function checkKey($key) {\n\t\ttry {\n\t\t\t$this->seek($key);\n\t\t\t$this->rewind();\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function pull($key);", "public function pull($key);", "public function lock_key($key, &$auto_unlocker_variable) {\n\t\t$r = $this->redis->SetNX ( $this->lock_key_prefix . $key, 1 );\n\t\tif (! $r)\n\t\t\treturn false;\n\t\t$this->redis->Expire ( $this->lock_key_prefix . $key, self::key_lock_time );\n\t\t$auto_unlocker_variable = new KeyAutoUnlocker ( array ($this, 'unlock_key' ) );\n\t\t$auto_unlocker_variable->key = $key;\n\t\treturn true;\n\t}", "public function unlock($name)\n {\n // Determine the name of the key\n $key_name = $name.self::SUFFIX_LOCK;\n\n // Attempt to remove the key\n $this->remove($key_name);\n\n // Return the instance of this class\n return $this;\n }", "function lockr_delete_key($key_name) {\n \\Lockr\\Lockr::key()->delete($key_name);\n}", "public function lock($key) {\n\t\treturn $this->memcached->add('lock:'.$key, 1);\n\t}", "public function unlock_update() {\n\t\t\tdelete_transient( 'dfm_lt_' . $this->key );\n\t\t}", "public function releaseKey($key)\n {\n $request = new SetKeyRequest();\n $request->setKey( $key )->setState( SetKeyRequest::RELEASE );\n $result = $this->client->request( $request );\n return $result;\n }", "public function purge($key = null);", "protected function _checkUnsKey( &$key ) {\n\t\t$k = strtolower( $key );\n\t\tif( ! in_array( $k , $this->_resource->getFields() ) || in_array( $k , $this->_canBeUnsetFields ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthrow new InvalidArgument( sprintF( 'Unset value (\"%s\") is forbidden for model \"%s\"' , $key , get_class( $this ) ) );\n\t}", "public function unlock() {\n\t\tif (!$this->isLocked()) {\n\t\t\tthrow new LockException(\"cannot unlock already unlocked node: $this->workspace=>$this->path\");\n\t\t}\n\t\t\t\t\n\t\t$this->pm->setProperty($this->path, 'pcr:isLocked', false);\n\t\t$this->pm->setProperty($this->path, 'pcr:lastModified', Utility::getTimeStamp());\n\t}", "public function lock_key($column, $key, $mode);", "public function collectionCacheMiss($regionName, CollectionCacheKey $key);", "public function testUnlockAfterCode()\n {\n $this->mutex->expects($this->once())\n ->method('unlock');\n\n $this->mutex->synchronized(function (): void {\n });\n }" ]
[ "0.72385216", "0.6721788", "0.6584058", "0.65193576", "0.63754916", "0.6241304", "0.6115957", "0.5956629", "0.5911679", "0.58567625", "0.58468115", "0.5802508", "0.5754505", "0.57025766", "0.5634674", "0.55990195", "0.5572452", "0.5558441", "0.55154556", "0.5475177", "0.5475177", "0.5475177", "0.5475177", "0.5475177", "0.5475177", "0.5452119", "0.54415715", "0.54282445", "0.541776", "0.54146975", "0.54092664", "0.5393488", "0.53743935", "0.5365852", "0.5365852", "0.5365118", "0.5346085", "0.53398556", "0.5334642", "0.53231007", "0.53172874", "0.53036684", "0.52709067", "0.5261537", "0.5250472", "0.5228718", "0.5216856", "0.5216856", "0.5215018", "0.52135164", "0.51952493", "0.5180484", "0.51801", "0.515787", "0.5155503", "0.5153101", "0.515206", "0.515206", "0.5141517", "0.5137205", "0.51261306", "0.51261306", "0.5095589", "0.5091036", "0.5088237", "0.5083886", "0.50718004", "0.5065937", "0.5062322", "0.5052633", "0.50375986", "0.5034853", "0.50317234", "0.5024575", "0.5022929", "0.501248", "0.50102586", "0.5006022", "0.5002832", "0.49978963", "0.4990912", "0.49773818", "0.49743453", "0.49687448", "0.49647936", "0.49627316", "0.49563834", "0.49563834", "0.49562705", "0.4955587", "0.49539986", "0.49462345", "0.49365482", "0.49343318", "0.49194586", "0.49178493", "0.491533", "0.4914455", "0.49101266", "0.49078742" ]
0.7388385
0
Pads a string to a given length with another string. If length is less than or equal to the length of $str, then no padding takes places. The default string used for padding is a space, and the default type (one of 'left', 'right', 'both') is 'right'.
Дополняет строку до заданной длины другой строкой. Если длина меньше или равна длине $str, то дополнения не происходит. По умолчанию в качестве строки заполнения используется пробел, а тип (один из 'left', 'right', 'both') по умолчанию — 'right'.
public static function pad($str, $length, $padStr = ' ', $padType = 'right', $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); if (!in_array($padType, array('left', 'right', 'both'))) { throw new InvalidArgumentException('Pad expects the fourth ' . "argument to be one of 'left', 'right' or 'both'"); } $strLength = mb_strlen($str, $encoding); $padStrLength = mb_strlen($padStr, $encoding); if ($length <= $strLength || $padStrLength <= 0) return $str; // Number of times to repeat the padStr if left or right $times = ceil(($length - $strLength) / $padStrLength); $paddedStr = ''; if ($padType == 'left') { // Repeat the pad, cut it, and prepend $leftPad = str_repeat($padStr, $times); $leftPad = mb_substr($leftPad, 0, $length - $strLength, $encoding); $paddedStr = $leftPad . $str; } elseif ($padType == 'right') { // Append the repeated pad and get a substring of the given length $paddedStr = $str . str_repeat($padStr, $times); $paddedStr = mb_substr($paddedStr, 0, $length, $encoding); } else { // Number of times to repeat the padStr on both sides $paddingSize = ($length - $strLength) / 2; $times = ceil($paddingSize / $padStrLength); // Favour right padding over left, as with str_pad() $rightPad = str_repeat($padStr, $times); $rightPad = mb_substr($rightPad, 0, ceil($paddingSize), $encoding); $leftPad = str_repeat($padStr, $times); $leftPad = mb_substr($leftPad, 0, floor($paddingSize), $encoding); $paddedStr = $leftPad . $str . $rightPad; } return $paddedStr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n{\n if(Unicode::is_ascii($str) and Unicode::is_ascii($pad_str))\n {\n return str_pad($str, $final_str_length, $pad_str, $pad_type);\n }\n\n $str_length = Unicode::strlen($str);\n\n if($final_str_length <= 0 or $final_str_length <= $str_length)\n {\n return $str;\n }\n\n $pad_str_length = Unicode::strlen($pad_str);\n $pad_length = $final_str_length - $str_length;\n\n if($pad_type == STR_PAD_RIGHT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);\n }\n\n if($pad_type == STR_PAD_LEFT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;\n }\n\n if($pad_type == STR_PAD_BOTH)\n {\n $pad_length /= 2;\n $pad_length_left = floor($pad_length);\n $pad_length_right = ceil($pad_length);\n $repeat_left = ceil($pad_length_left / $pad_str_length);\n $repeat_right = ceil($pad_length_right / $pad_str_length);\n $pad_left = Unicode::substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n $pad_right = Unicode::substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n return $pad_left . $str . $pad_right;\n }\n\n trigger_error('Unicode::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n}", "public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n\t{\n\t\tif (str::is_ascii($str) AND str::is_ascii($pad_str))\n\t\t{\n\t\t\treturn str_pad($str, $final_str_length, $pad_str, $pad_type);\n\t\t}\n\n\t\t$str_length = mb_strlen($str);\n\n\t\tif ($final_str_length <= 0 OR $final_str_length <= $str_length)\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t$pad_str_length = mb_strlen($pad_str);\n\t\t$pad_length = $final_str_length - $str_length;\n\n\t\tif ($pad_type == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr($str.str_repeat($pad_str, $repeat), 0, $final_str_length);\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_LEFT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)).$str;\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_BOTH)\n\t\t{\n\t\t\t$pad_length /= 2;\n\t\t\t$pad_length_left = floor($pad_length);\n\t\t\t$pad_length_right = ceil($pad_length);\n\t\t\t$repeat_left = ceil($pad_length_left / $pad_str_length);\n\t\t\t$repeat_right = ceil($pad_length_right / $pad_str_length);\n\n\t\t\t$pad_left = mb_substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n\t\t\t$pad_right = mb_substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n\t\t\treturn $pad_left.$str.$pad_right;\n\t\t}\n\n\t\ttrigger_error('utf8::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n\t}", "static function padString($string,$length,$padchar=' ',$padtype=STR_PAD_RIGHT) {\n\t\t\treturn str_pad($string,$length,$padchar,$padtype);\n\t\t}", "protected function strpad($input, $pad_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n {\n $input_len = $this->strlen($input);\n if ($pad_length <= $input_len) {\n return $input;\n }\n $pad_str_len = $this->strlen($pad_str);\n $pad_len = $pad_length - $input_len;\n if ($pad_type == STR_PAD_LEFT) {\n $repeat_times = ceil($pad_len / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times);\n return $this->substr($prefix, 0, floor($pad_len)) . $input;\n }\n if ($pad_type == STR_PAD_BOTH) {\n $pad_len /= 2;\n $pad_amount_left = floor($pad_len);\n $pad_amount_right = ceil($pad_len);\n $repeat_times_left = ceil($pad_amount_left / $pad_str_len);\n $repeat_times_right = ceil($pad_amount_right / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times_left);\n $padding_left = $this->substr($prefix, 0, $pad_amount_left);\n $suffix = str_repeat($pad_str, $repeat_times_right);\n $padding_right = $this->substr($suffix, 0, $pad_amount_right);\n return $padding_left . $input . $padding_right;\n }\n // STR_PAD_RIGHT\n $repeat_times = ceil($pad_len / $pad_str_len);\n $input .= str_repeat($pad_str, $repeat_times);\n return $this->substr($input, 0, $pad_length);\n }", "function rightpad($str, $len, $pad = \" \") {\n while (strlen($str) < $len) {\n $str .= $pad;\n }\n return $str;\n}", "function str_pad($input,$pad_length,$pad_string=' ',$pad_type=STR_PAD_RIGHT)\n{\n\treturn '';\n}", "public static function pad($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_BOTH);\n }", "public function pad($length, $padStr = ' ', $padType = 'right')\n {\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new \\InvalidArgumentException('Pad expects $padType ' .\n \"to be one of 'left', 'right' or 'both'\");\n }\n\n switch ($padType) {\n case 'left':\n return $this->padLeft($length, $padStr);\n case 'right':\n return $this->padRight($length, $padStr);\n default:\n return $this->padBoth($length, $padStr);\n }\n }", "function str_pad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT)\n{\n return '';\n}", "public static function pad($string, $padLen, $padStr = ' ', $padType = STR_PAD_RIGHT)\n\t{\n\t\t$strLength = mb_strlen($string);\n\t\t$padStrLength = mb_strlen($padStr);\n\t\tif (!$strLength && ($padType == STR_PAD_RIGHT || $padType == STR_PAD_LEFT))\n\t\t{\n\t\t\t$strLength = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLength || $padLen <= $strLength)\n\t\t{\n\t\t\treturn $string;\n\t\t}\n\n\t\t$result = null;\n\t\t$repeat = ceil(($padLen - $strLength) / $padStrLength);\n\t\tif ($padType == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$result = $string . str_repeat($padStr, $repeat);\n\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_LEFT)\n\t\t{\n\t\t\t$result = str_repeat($padStr, $repeat) . $string;\n\t\t\t$result = mb_substr($result, -$padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_BOTH)\n\t\t{\n\t\t\t$length = ($padLen - $strLength) / 2;\n\t\t\t$repeat = ceil($length / $padStrLength);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length))\n\t\t\t\t.$string\n\t\t\t\t.mb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t}\n\n\t\treturn $result;\n\t}", "function mb_str_pad($str, $padLen, $padStr = ' ', $dir = STR_PAD_RIGHT) {\n\t\t// @codingStandardsIgnoreEnd\n\t\t$strLen = mb_strlen($str);\n\t\t$padStrLen = mb_strlen($padStr);\n\t\tif (!$strLen && ($dir == STR_PAD_RIGHT || $dir == STR_PAD_LEFT)) {\n\t\t\t$strLen = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLen || $padLen <= $strLen) {\n\t\t\treturn $str;\n\t\t}\n\n\t\t$result = null;\n\t\tif ($dir == STR_PAD_BOTH) {\n\t\t\t$length = ($padLen - $strLen) / 2;\n\t\t\t$repeat = ceil($length / $padStrLen);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) .\n\t\t\t\t$str .\n\t\t\t\tmb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t} else {\n\t\t\t$repeat = ceil($strLen - $padStrLen + $padLen);\n\t\t\tif ($dir == STR_PAD_RIGHT) {\n\t\t\t\t$result = $str . str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t\t} elseif ($dir == STR_PAD_LEFT) {\n\t\t\t\t$result = str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr(\n\t\t\t\t\t$result,\n\t\t\t\t\t0,\n\t\t\t\t\t$padLen - (($strLen - $padStrLen) + $padStrLen)\n\t\t\t\t) .\n\t\t\t\t\t$str;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function padBoth($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'both', $encoding);\n }", "public static function padRight($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'right', $encoding);\n }", "static public function PackStringWithLength($str){\n $len = strlen($str);\n return pack('n', $len) . $str;\n }", "public static function padRight($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn $s . str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen);\n\t}", "public static function mbStrPad($str, $len, $padStr = \" \", $padStyle = STR_PAD_RIGHT, $encoding = \"UTF-8\") {\n\t\treturn str_pad($str, strlen($str) - mb_strlen($str, $encoding) + $len, $padStr, $padStyle);\n\t}", "public static function padStart($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_LEFT);\n }", "protected function _pad($string = '', $len = 14) {\n\t\treturn str_pad($string, $len);\n\t}", "public static function padLeft($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'left', $encoding);\n }", "public static function padEnd($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_RIGHT);\n }", "function padString($number, $pad_len){\n\t$result=null;\n\tfor($i=0; $i < $pad_len - strlen($number); $i++){\n\t\t$result .= \"0\";\n\t}\n\t$result .= $number;\n\treturn $result;\n}", "private function pad($string)\n {\n return $string . $string;\n }", "private function applyPadding($left = 0, $right = 0, $padStr = ' ')\n {\n $stringy = static::create($this->str, $this->encoding);\n $length = mb_strlen($padStr, $stringy->encoding);\n\n $strLength = $stringy->length();\n $paddedLength = $strLength + $left + $right;\n\n if (!$length || $paddedLength <= $strLength) {\n return $stringy;\n }\n\n $leftPadding = mb_substr(str_repeat($padStr, ceil($left / $length)), 0,\n $left, $stringy->encoding);\n $rightPadding = mb_substr(str_repeat($padStr, ceil($right / $length)),\n 0, $right, $stringy->encoding);\n\n $stringy->str = $leftPadding . $stringy->str . $rightPadding;\n\n return $stringy;\n }", "function mb_str_pad(string $string, int $pad_length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, string $encoding = null): string\n{\n return Strings::pad($string, $pad_length, $pad_string, $pad_type, $encoding);\n}", "public function padBoth($length, $padStr = ' ')\n {\n $padding = $length - $this->length();\n\n return $this->applyPadding(floor($padding / 2), ceil($padding / 2),\n $padStr);\n }", "public static function padLeft($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen) . $s;\n\t}", "public static function pad($number, $length, $pad = '0'){\n return str_pad((intval($number) + 1), $length, $pad, STR_PAD_LEFT);;\n }", "function char_pad ( $str )\n\t{\n\t\t$tmpStr = $str;\n\n\t\t$l = strlen( $tmpStr ) * 8; // # of bits from input string\n\n\n\t\t$tmpStr .= \"\\x80\"; // append the \"1\" bit followed by 7 0's\n\n\n\t\t$k = (512 - (($l + 8 + 64) % 512)) / 8; // # of 0 bytes to append\n\t\t$k += 4; // PHP String's will never exceed (2^31)-1, so 1st 32bits of\n\t\t// the 64-bit value representing $l can be all 0's\n\n\n\t\tfor ( $x = 0; $x < $k; $x ++ )\n\t\t\t$tmpStr .= \"\\0\";\n\n\t\t// append the last 32-bits representing the # of bits from input string ($l)\n\t\t$tmpStr .= chr( (($l >> 24) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 16) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 8) & 0xFF) );\n\t\t$tmpStr .= chr( ($l & 0xFF) );\n\n\t\treturn $tmpStr;\n\t}", "public static function padBoth(string $value, int $length, string $pad = ' '): string\n {\n $short = max(0, $length - mb_strlen($value));\n $shortLeft = floor($short / 2);\n $shortRight = ceil($short / 2);\n\n return mb_substr(str_repeat($pad, $shortLeft), 0, $shortLeft) .\n $value .\n mb_substr(str_repeat($pad, $shortRight), 0, $shortRight);\n }", "public function padRight($length, $padStr = ' ')\n {\n return $this->applyPadding(0, $length - $this->length(), $padStr);\n }", "private static function pad($text, $length, $char = ' ') {\n\t\tassert(TRUE === is_string(base64_encode($text)));\n\t\tassert(TRUE === is_int($length));\n\t\tassert(TRUE === is_string($char));\n\t\t$return = $text;\n\t\tif (mb_strlen($text) < $length) {\n\t\t\t$return = mb_str_pad($text, $length, $char);\n\t\t}\n\t\tif (mb_strlen($text) > $length) {\n\t\t\t$return = mb_substr($text, 0, $length);\n\t\t}\n\t\treturn $return;\n\t}", "function padl_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s = str_repeat($c, $m) . $s;\r\n return $s;\r\n }", "public function testPadRightDefaultFiller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "private static function strpad($value, $length)\n {\n $buf = \"\";\n $padLength = $length - mb_strlen($value);\n\n // Sanity check: $padLength can be sub-zero when incorrect\n // mb_internal_encoding is used.\n if ($padLength > 0) {\n return str_repeat(\" \", $padLength) . $value;\n } else {\n return $value;\n }\n }", "function pad(int $length, string $padContent = ' ', int $type = STR_PAD_RIGHT): Closure\n{\n /**\n * @param string $string The string to pad out.\n * @return string\n */\n return function (string $string) use ($length, $padContent, $type): string {\n return \\str_pad($string, $length, $padContent, $type);\n };\n}", "function padr_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s.= str_repeat($c, $m);\r\n return $s;\r\n }", "private function mbStrPad($input, $padLength, $padString, $padStyle, $encoding = \"UTF-8\") {\n \t\treturn str_pad($input, strlen($input) - mb_strlen($input, $encoding) + $padLength, $padString, $padStyle);\n \t}", "public function testPadRightSpecifiedFIller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "public static function padLeft($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return mb_substr(str_repeat($pad, $short), 0, $short) . $value;\n }", "public static function padRight($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return $value . mb_substr(str_repeat($pad, $short), 0, $short);\n }", "protected function stringWithLength($str){\n $str = strlen(StripSlashes($str)).$str;\n return $str;\n }", "public function padLeft($length, $padStr = ' ')\n {\n return $this->applyPadding($length - $this->length(), 0, $padStr);\n }", "public function padding($length = 1)\n {\n $padding = \"\";\n \n for ($i = 0; $i < $length; $i++) {\n $padding .= \"&nbsp;\";\n }\n \n return $padding;\n }", "public function padRight($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padRight($this->_s, $finalWidth, $with), $this->_encoding);\n }", "function zpad($text,$length=2,$c='0')\n{\n\twhile(strlen($text)<$length) $text=$c.$text;\n\treturn $text;\n}", "public function testPadLeftDefaultFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4);\n $this->assertSame(' ' . $this->stringLeft, $paddedString);\n }", "public static function hex_lpad($str, $length) {\n while (strlen($str) < $length) {\n $str = \"0\" . $str;\n }\n return $str;\n }", "protected function range_pad($str): string\n {\n if (!str_contains($str, '(')) {\n return $str;\n }\n\n if (str_contains($str, '-')) {\n preg_match('/(.+ )?\\((.+)\\-(.+)\\)/', $str, $tmp);\n return str_pad($tmp[1], 5) . '(' . str_pad($tmp[2], 6, ' ', STR_PAD_BOTH) . ' - ' . str_pad($tmp[3], 6, ' ', STR_PAD_BOTH) . ')';\n } else {\n preg_match('/(.+ )?\\((.+)?\\)/', $str, $tmp);\n return str_pad($tmp[1], 5) . '(' . str_pad($tmp[2], 14, ' ', STR_PAD_BOTH) . ' )';\n }\n }", "protected function addpadding($string, $blocksize = 32) {\n $len = strlen($string);\n $pad = $blocksize - ($len % $blocksize);\n $string .= \\str_repeat(chr($pad), $pad);\n return $string;\n }", "function padLeft($targetNo, $padLength)\n{\n $res = str_pad($targetNo, $padLength, '0', STR_PAD_LEFT);\n return $res;\n}", "public function padBoth($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padBoth($this->_s, $finalWidth, $with), $this->_encoding);\n }", "public function pad($size, $value);", "public static function str_pad($b) {\n $padding = 16 - ((strlen($b) - 1) & 15);\n return $b . str_repeat(\"\\0\", $padding - 1);\n }", "public function padLeft($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padLeft($this->_s, $finalWidth, $with), $this->_encoding);\n }", "function fit($str, $len, $separator){\n //\n //Get teh length of teh string\n $strlen = strlen($str);\n //\n //Decide whether to truncate teh string or padd id\n if ($strlen>$len){\n //\n //Trim the string by $x characters\n return substr($str, 0, $len);\n }\n //\n else{\n //\n return str_pad($str, $len, $separator, STR_PAD_RIGHT);\n \n }\n }", "function trimSize($str, $size)\n{\n if ($size - strlen($str) > 0) {\n return str_pad($str, $size);\n } else {\n return substr($str, 0, $size);\n }\n}", "public static function padRight($pInput, $pPadLength, $pPadChar) {\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_RIGHT);\n\t}", "public function align(string $message, int $length = null, int $alignment = self::ALIGN_LEFT): string\n {\n $plainLength = Helper::strlenWithoutDecoration($this->getFormatter(), $message);\n $length = $length + (strlen($message) - $plainLength);\n \n switch ($alignment) {\n case self::ALIGN_CENTER:\n return str_pad($message, $length, ' ', STR_PAD_BOTH);\n \n case self::ALIGN_RIGHT:\n return str_pad($message, $length, ' ', STR_PAD_LEFT);\n \n default:\n case self::ALIGN_LEFT:\n return str_pad($message, $length, ' ', STR_PAD_RIGHT);\n }\n }", "public static function lpad()\n\t{\n\t}", "public function __populate( $string, $max, $config = [\r\n 'align' => 'left',\r\n 'fill' => ' '\r\n ]) {\r\n extract( $config );\r\n $strLen = strlen( $string );\r\n $toPopulate = $max - $strLen;\r\n return $string . $this->__fill( $fill, $toPopulate );\r\n }", "function\tlpad($subject, $char=\" \", $maxsize=4)\t{\r\n\twhile(strlen($subject)<$maxsize) {\r\n\t\t$subject = $char.$subject;\r\n\t}\r\n\r\n\treturn $subject;\r\n}", "public function rightPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_RIGHT);\n }", "protected function padMessage(string $message, $length = 80): string\n {\n $currentLen = strlen($this->filterOutTags($message));\n if ($currentLen < $length) {\n $message .= str_repeat(' ', $length - $currentLen);\n }\n\n return $message;\n }", "function shorten_by_words($str, $length, $append = '...')\n {\n $result = Strings::trailing_words($str, $length, false);\n return ($str != $result) ? $result . $append : $str;\n }", "public function testPadLeftSpecifiedFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4, '0');\n $this->assertSame('0' . $this->stringLeft, $paddedString);\n }", "public function setLength($newLength, $padding = ' ')\n\t{\n\t\t$newLength = (int) $newLength;\n\t\t$currentLength = $this->length();\n\n\t\tif ($newLength != $currentLength) {\n\t\t\twhile ($newLength > $this->length()) {\n\t\t\t\t$this->string .= $padding;\n\t\t\t}\n\t\t\tif ($newLength < $this->length()) {\n\t\t\t\t$this->string = mb_substr($this->string, 0, $newLength, $this->encoding);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "function padding($id){\n return str_pad($id, 6, 0, STR_PAD_LEFT);\n }", "public function stdWrap_strPadDataProvider() {}", "function pad($data, $shouldbe, $put) {\n\tif (strlen($data) == $shouldbe) {\n\t\treturn $data;\n\t} else {\n\t\t$padding = \"\";\n\t\tfor ($i = strlen($data);$i < $shouldbe;$i++) {\n\t\t\t$padding .= $put;\n\t\t}\n\t\treturn $padding . $data;\n\t}\n}", "public static function padLeft($pInput, $pPadLength, $pPadChar)\t{\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_LEFT);\n\t}", "public function fill( $str );", "public static function textAlign($text, $align = self::TEXT_ALIGN_LEFT, $text_width = 76, $newline_str = \"\\n\",\r\n $cut_words = true, $paragraph_sep_lines = 1, $paragraph_indent = 0)\r\n {\r\n // remove redundant spaces\r\n $text = trim(preg_replace('/ +/', ' ', $text));\r\n\r\n switch ($align & 0x0F)\r\n {\r\n case self::TEXT_ALIGN_LEFT:\r\n {\r\n // add paragraph indents\r\n if ($paragraph_indent > 0)\r\n {\r\n $indent = str_repeat(\"\\0\", $paragraph_indent);\r\n $text = $indent . str_replace($newline_str, $newline_str . $indent, $text);\r\n }\r\n\r\n $text = str_replace($newline_str, str_repeat($newline_str, $paragraph_sep_lines + 1), $text);\r\n $text = wordwrap($text, $text_width, $newline_str, $cut_words);\r\n return str_replace(\"\\0\", ' ', $text);\r\n }\r\n\r\n case self::TEXT_ALIGN_CENTER:\r\n case self::TEXT_ALIGN_RIGHT:\r\n {\r\n $text = str_replace($newline_str, str_repeat($newline_str, $paragraph_sep_lines + 1), $text);\r\n $text = wordwrap($text, $text_width, $newline_str, $cut_words);\r\n $lines = explode($newline_str, $text);\r\n\r\n $pad_type = $align == self::TEXT_ALIGN_RIGHT ? STR_PAD_LEFT : STR_PAD_BOTH;\r\n\r\n for ($l = 0; $l < count($lines); $l++)\r\n {\r\n $line_len = strlen($lines[$l]);\r\n if ($line_len == 0) { continue; }\r\n $line_add = $text_width - $line_len;\r\n\r\n if ($line_add > 0)\r\n {\r\n $lines[$l] = str_pad($lines[$l], $text_width, ' ', $pad_type);\r\n }\r\n }\r\n\r\n return implode($newline_str, $lines);\r\n }\r\n\r\n case self::TEXT_ALIGN_JUSTIFY:\r\n {\r\n // split text into paragraphs\r\n $paragraphs = explode($newline_str, $text);\r\n\r\n for ($p = 0; $p < count($paragraphs); $p++)\r\n {\r\n // trim paragraph\r\n $paragraphs[$p] = trim($paragraphs[$p]);\r\n\r\n // add paragraph indents\r\n if ($paragraph_indent > 0)\r\n {\r\n $indent = str_repeat(\"\\0\", $paragraph_indent);\r\n $paragraphs[$p] = $indent . str_replace($newline_str, $newline_str . $indent, $paragraphs[$p]);\r\n $nulls_added = true;\r\n }\r\n\r\n // wrap paragraph words\r\n $paragraphs[$p] = wordwrap($paragraphs[$p], $text_width, $newline_str, $cut_words);\r\n\r\n // split paragraph into lines\r\n $paragraphs[$p] = explode($newline_str, $paragraphs[$p]);\r\n\r\n // last line index\r\n $pl_to = ($align & self::TEXT_ALIGN_FLAG_JUSTIFY_ALL_LINES) ? count($paragraphs[$p]) : count($paragraphs[$p]) - 1;\r\n\r\n for ($pl = 0; $pl < $pl_to; $pl++)\r\n {\r\n // spaces to be added\r\n $line_spaces_to_add = $text_width - strlen($paragraphs[$p][$pl]);\r\n // split line\r\n $paragraphs[$p][$pl] = explode(' ', $paragraphs[$p][$pl]);\r\n // number of words per line\r\n $line_word_count = count($paragraphs[$p][$pl]);\r\n\r\n if ($line_word_count > 1 && $line_spaces_to_add > 0)\r\n {\r\n // spaces per each word (float)\r\n $line_spaces_per_word = $line_spaces_to_add / ($line_word_count - 1);\r\n $word_spaces_to_add = 0;\r\n\r\n for ($w = 0; $w < $line_word_count - 1; $w++)\r\n {\r\n // (float) spaces to add\r\n $word_spaces_to_add += $line_spaces_per_word;\r\n // actual number of spaces to add (int)\r\n $word_spaces_to_add_int = (int) round($word_spaces_to_add);\r\n\r\n if ($word_spaces_to_add_int > 0)\r\n {\r\n $paragraphs[$p][$pl][$w] .= str_repeat(' ', $word_spaces_to_add_int);\r\n $word_spaces_to_add -= $word_spaces_to_add_int;\r\n }\r\n }\r\n }\r\n\r\n // restore line\r\n $paragraphs[$p][$pl] = implode(' ', $paragraphs[$p][$pl]);\r\n }\r\n\r\n // replace \"\\0\" with spaces\r\n if ($nulls_added)\r\n {\r\n $paragraphs[$p][0] = str_replace(\"\\0\", ' ', $paragraphs[$p][0]);\r\n }\r\n\r\n // restore paragraph\r\n $paragraphs[$p] = implode($newline_str, $paragraphs[$p]);\r\n }\r\n\r\n // restore text\r\n $paragraphs = implode(str_repeat($newline_str, $paragraph_sep_lines + 1), $paragraphs);\r\n\r\n return $paragraphs;\r\n }\r\n }\r\n }", "function str_chop($string, $length = 60, $center = false, $append = null)\n{\n\t// Set the default append string\n\tif ($append === null) {\n\t\t$append = ($center === true) ? ' ... ' : ' ...';\n\t}\n\n\t// Get some measurements\n\t$len_string = strlen($string);\n\t$len_append = strlen($append);\n\n\t// If the string is longer than the maximum length, we need to chop it\n\tif ($len_string > $length) {\n\t\t// Check if we want to chop it in half\n\t\tif ($center === true) {\n\t\t\t// Get the lengths of each segment\n\t\t\t$len_start = $length / 2;\n\t\t\t$len_end = $len_start - $len_append;\n\n\t\t\t// Get each segment\n\t\t\t$seg_start = substr($string, 0, $len_start);\n\t\t\t$seg_end = substr($string, $len_string - $len_end, $len_end);\n\n\t\t\t// Stick them together\n\t\t\t$string = $seg_start . $append . $seg_end;\n\t\t} else {\n // Otherwise, just chop the end off\n\t\t\t$string = substr($string, 0, $length - $len_append) . $append;\n\t\t}\n\t}\n\n\treturn $string;\n}", "public function leftPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_LEFT);\n }", "function str_trunc($string, $limit, $break=\" \", $pad=\"...\") {\n $limit -= strlen($pad);\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "private function padCounter($counter, $padding) :string\n {\n return str_pad($counter, $padding, '0', STR_PAD_LEFT);\n }", "public\n\n function addZero( $nr, $range = 2, $left = true, $char = \"0\" )\n {\n $nr = trim( $nr );\n if ($left) {\n $method = STR_PAD_LEFT;\n } else {\n $method = STR_PAD_RIGHT;\n }\n return str_pad( $nr, $range, $char, $method );\n }", "public function addPadding(string $base64String): string\n {\n if (strlen($base64String) % 4 !== 0) {\n return $this->addPadding($base64String . '=');\n }\n\n return $base64String;\n }", "function shortenString($str, $length)\r\n\t{\r\n\t\treturn substr($str, 0, $length) . (strlen($str) > $length ? \"....\" : \"\");\r\n\t}", "function str_chop($string, $length = 60, $center = false, $append = null)\n{\n // Set the default append string\n if ($append === null) {\n $append = ($center === true) ? ' ... ' : ' ...';\n }\n \n // Get some measurements\n $len_string = strlen($string);\n $len_append = strlen($append);\n \n // If the string is longer than the maximum length, we need to chop it\n if ($len_string > $length) {\n // Check if we want to chop it in half\n if ($center === true) {\n // Get the lengths of each segment\n $len_start = $length / 2;\n $len_end = $len_start - $len_append;\n \n // Get each segment\n $seg_start = substr($string, 0, $len_start);\n $seg_end = substr($string, $len_string - $len_end, $len_end);\n \n // Stick them together\n $string = $seg_start . $append . $seg_end;\n } else {\n // Otherwise, just chop the end off\n $string = substr($string, 0, $length - $len_append) . $append;\n }\n }\n \n return $string;\n}", "function cortar($str, $length = 25, $end = '...')\n{\n if (strlen($str)<$length)\n return $str;\n return substr($str,0,$length).$end;\n}", "public function setPadType(int $padType): static\n {\n if (!\\in_array($padType, [\\STR_PAD_LEFT, \\STR_PAD_RIGHT, \\STR_PAD_BOTH], true)) {\n throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');\n }\n\n $this->padType = $padType;\n\n return $this;\n }", "private static function padKey($key)\n {\n return strlen($key) < 16 ? str_repeat($key, ceil(16 / strlen($key))) : $key;\n }", "function writePadded($string, $pad, $fgColor = null, $bgColor = null) {\n\t\treturn $this->write($string . str_repeat(' ', max(0, $pad - strlen($string))), $fgColor, $bgColor);\n\t}", "public static function pad(&$text, $bytes, $type = PhpCrypt::ZERO)\n\t{\n\t\t// if the size of padding is not greater than 1\n\t\t// just return true, no padding will be done\n\t\tif(!($bytes > 0))\n\t\t\treturn true;\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase PhpCrypt::PAD_ZERO:\n\t\t\t\treturn self::zeroPad($text, $bytes);\n\t\t\t\tbreak;\n\t\t\tcase PhpCrypt::PAD_ANSI_X923:\n\t\t\t\treturn self::ansiX923Pad($text, $bytes);\n\t\t\t\tbreak;\n\t\t\tcase PhpCrypt::PAD_ISO_10126:\n\t\t\t\treturn self::iso10126Pad($text, $bytes);\n\t\t\t\tbreak;\n\t\t\tcase PhpCrypt::PAD_PKCS7:\n\t\t\t\treturn self::pkcs7Pad($text, $bytes);\n\t\t\t\tbreak;\n\t\t\tcase PhpCrypt::PAD_ISO_7816_4:\n\t\t\t\treturn self::iso7816Pad($text, $bytes);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttrigger_error(\"$type is not a valid padding type.\", E_USER_NOTICE);\n\t\t\t\treturn self::zeroPad($text, $bytes);\n\t\t}\n\n\t\treturn true;\n\t}", "public function padNext($padWidth)\n {\n return $this->padNext2($padWidth, ' ');\n }", "public static function oneTimePadCreate ($length=100) {\n self::mt_randomize();\n\n $pad = '';\n for ($i = 0; $i < $length; $i++) {\n $pad .= chr(mt_rand(0,255));\n }\n\n return base64_encode($pad);\n }", "function Truncate ($str, $length=21, $trailing='...') \n{\n $length-=strlen($trailing);\n if (strlen($str) > $length) \n {\n // string exceeded length, truncate and add trailing dots\n return substr($str,0,$length).$trailing;\n } \n else \n { \n // string was already short enough, return the string\n $res = $str; \n }\n \n return $res;\n}", "function partstr($str, $length) \n\t{\n\t\treturn (strlen($str)>$length) ? substr($str, 0, $length).\"...\" : $str;\n\t}", "function zen_trunc_string($str = \"\", $len = 150, $more = 'true') {\n if ($str == \"\") return $str;\n if (is_array($str)) return $str;\n $str = trim($str);\n // if it's les than the size given, then return it\n if (strlen($str) <= $len) return $str;\n // else get that size of text\n $str = substr($str, 0, $len);\n // backtrack to the end of a word\n if ($str != \"\") {\n // check to see if there are any spaces left\n if (!substr_count($str , \" \")) {\n if ($more == 'true') $str .= \"...\";\n return $str;\n }\n // backtrack\n while(strlen($str) && ($str[strlen($str)-1] != \" \")) {\n $str = substr($str, 0, -1);\n }\n $str = substr($str, 0, -1);\n if ($more == 'true') $str .= \"...\";\n if ($more != 'true' and $more != 'false') $str .= $more;\n }\n return $str;\n }", "function pad_zero($number, $length=6, $in_front=TRUE) {\n $number = (string)$number;\n // jumlah loop yang dilakukan adalah panjang digit - jumlah karakter\n // jadi jika ingin digit 6 dan angka yang disupply adalah 3\n // maka loop = 6 - 1 => 5 buah NOL\n $loop = $length - strlen($number);\n\n // variabel penampung hasil\n $result = '';\n for ($i=0; $i<$loop; $i++) {\n // tambahkan nol\n $result .= '0';\n }\n\n // gabungkan jumlah NOL dengan angka\n if ($in_front === TRUE) {\n $result = $result . $number;\n } else {\n // NOL dibelakang\n $result = $number . $result;\n }\n\n return $result;\n}", "private function addSpacesBetweenChars($str){\r\n\t\treturn implode(' ',str_split($str));\r\n\t}", "function align($var='') {\n return ($var==\"\" ? \"\" : ' align=\"'.$var.'\"');\n}", "public function padding(string $padding)\r\n {\r\n return $this->option('padding', $padding);\r\n }", "public function right(string $string, int $chars): string;", "function number_pad($number,$n) {\r\n\treturn str_pad((int) $number,$n,\"0\",STR_PAD_LEFT);\r\n}", "function leading_words($str, $length, $strict = false)\n {\n $l = strlen($str);\n if ($l <= $length) return $str;\n $result = substr($str, -1 * $length);\n\n if ($strict) {\n // only words that fit in specified bounds\n for ($i = 0, $l = strlen($result); $i < $l; $i++) {\n if (Strings::_is_devider($result[0])) break;\n // cut one byte from the beginning of string\n $result = substr($result, 1);\n }\n\n } else {\n // expand bounds if leftmost word cannot fit in it\n for ($i = $l - $length - 1; $i >= 0; $i--) {\n if (Strings::_is_devider($str[$i])) break;\n $result = $str[$i] . $result;\n }\n }\n\n return ltrim($result, implode('', Strings::_word_deviders()));\n }", "public function limit_string($string, $length, $replacer = '...') {\n\t if (strlen($string) > $length)\n\t $string = mb_substr($string, 0, $length-3) . $replacer;\n\t return $string;\n\t}", "function repeat($str, $amount)\n {\n return str_repeat($str, $amount);\n }", "function right($str, $len)\n\t{\n\t\treturn substr($str, (-1 * $len));\n\t}" ]
[ "0.7815194", "0.7588689", "0.75624627", "0.7531419", "0.73544717", "0.7316049", "0.7220198", "0.71983045", "0.7192597", "0.7173224", "0.7057346", "0.69692045", "0.6897919", "0.66775924", "0.6669223", "0.66682965", "0.66059166", "0.6583742", "0.6568758", "0.65513164", "0.6530453", "0.65161395", "0.65114206", "0.64697784", "0.64413863", "0.6428198", "0.62528783", "0.62339056", "0.6218584", "0.617524", "0.6174611", "0.61699533", "0.6120169", "0.6108621", "0.61010426", "0.60726595", "0.6067885", "0.6024979", "0.5970594", "0.5966405", "0.5951981", "0.59350073", "0.5864437", "0.58607066", "0.5828376", "0.5818218", "0.5814112", "0.5803798", "0.57653683", "0.57322294", "0.56596035", "0.56356895", "0.5573909", "0.5552515", "0.55437154", "0.55329055", "0.5507001", "0.5449954", "0.54358006", "0.5431435", "0.5425412", "0.5424646", "0.5421012", "0.5420907", "0.5419566", "0.536213", "0.5328954", "0.5328243", "0.5300337", "0.5289101", "0.52606046", "0.52522707", "0.52409446", "0.5193617", "0.5154555", "0.5115175", "0.50921166", "0.5081791", "0.5080119", "0.50499356", "0.5046952", "0.5044868", "0.49941292", "0.49922013", "0.49618033", "0.49081966", "0.49005857", "0.48842323", "0.48738912", "0.48527318", "0.48523644", "0.48472184", "0.48365548", "0.4831506", "0.4808842", "0.47985634", "0.47885793", "0.47872582", "0.4747712", "0.47457084" ]
0.7673377
1
Returns a new string of a given length such that the beginning of the string is padded. Alias for pad($str, $length, $padStr, 'left', $encoding)
Возвращает новый строку заданной длины, так что начало строки заполняется. Алиас для pad($str, $length, $padStr, 'left', $encoding)
public static function padLeft($str, $length, $padStr = ' ', $encoding = null) { return self::pad($str, $length, $padStr, 'left', $encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function padStart($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_LEFT);\n }", "public static function padLeft($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen) . $s;\n\t}", "public function padLeft($length, $padStr = ' ')\n {\n return $this->applyPadding($length - $this->length(), 0, $padStr);\n }", "public static function padLeft($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return mb_substr(str_repeat($pad, $short), 0, $short) . $value;\n }", "public static function pad($str, $length, $padStr = ' ', $padType = 'right',\n $encoding = null) {\n $encoding = $encoding ?: mb_internal_encoding();\n\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new InvalidArgumentException('Pad expects the fourth ' .\n \"argument to be one of 'left', 'right' or 'both'\");\n }\n\n $strLength = mb_strlen($str, $encoding);\n $padStrLength = mb_strlen($padStr, $encoding);\n\n if ($length <= $strLength || $padStrLength <= 0)\n return $str;\n\n // Number of times to repeat the padStr if left or right\n $times = ceil(($length - $strLength) / $padStrLength);\n $paddedStr = '';\n\n if ($padType == 'left') {\n // Repeat the pad, cut it, and prepend\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, $length - $strLength, $encoding);\n $paddedStr = $leftPad . $str;\n } elseif ($padType == 'right') {\n // Append the repeated pad and get a substring of the given length\n $paddedStr = $str . str_repeat($padStr, $times);\n $paddedStr = mb_substr($paddedStr, 0, $length, $encoding);\n } else {\n // Number of times to repeat the padStr on both sides\n $paddingSize = ($length - $strLength) / 2;\n $times = ceil($paddingSize / $padStrLength);\n\n // Favour right padding over left, as with str_pad()\n $rightPad = str_repeat($padStr, $times);\n $rightPad = mb_substr($rightPad, 0, ceil($paddingSize), $encoding);\n\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, floor($paddingSize), $encoding);\n\n $paddedStr = $leftPad . $str . $rightPad;\n }\n\n return $paddedStr;\n }", "public static function pad($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_BOTH);\n }", "static function padString($string,$length,$padchar=' ',$padtype=STR_PAD_RIGHT) {\n\t\t\treturn str_pad($string,$length,$padchar,$padtype);\n\t\t}", "public static function padBoth($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'both', $encoding);\n }", "function rightpad($str, $len, $pad = \" \") {\n while (strlen($str) < $len) {\n $str .= $pad;\n }\n return $str;\n}", "public static function padLeft($pInput, $pPadLength, $pPadChar)\t{\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_LEFT);\n\t}", "public function leftPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_LEFT);\n }", "function padLeft($targetNo, $padLength)\n{\n $res = str_pad($targetNo, $padLength, '0', STR_PAD_LEFT);\n return $res;\n}", "function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n{\n if(Unicode::is_ascii($str) and Unicode::is_ascii($pad_str))\n {\n return str_pad($str, $final_str_length, $pad_str, $pad_type);\n }\n\n $str_length = Unicode::strlen($str);\n\n if($final_str_length <= 0 or $final_str_length <= $str_length)\n {\n return $str;\n }\n\n $pad_str_length = Unicode::strlen($pad_str);\n $pad_length = $final_str_length - $str_length;\n\n if($pad_type == STR_PAD_RIGHT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);\n }\n\n if($pad_type == STR_PAD_LEFT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;\n }\n\n if($pad_type == STR_PAD_BOTH)\n {\n $pad_length /= 2;\n $pad_length_left = floor($pad_length);\n $pad_length_right = ceil($pad_length);\n $repeat_left = ceil($pad_length_left / $pad_str_length);\n $repeat_right = ceil($pad_length_right / $pad_str_length);\n $pad_left = Unicode::substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n $pad_right = Unicode::substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n return $pad_left . $str . $pad_right;\n }\n\n trigger_error('Unicode::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n}", "public static function pad($string, $padLen, $padStr = ' ', $padType = STR_PAD_RIGHT)\n\t{\n\t\t$strLength = mb_strlen($string);\n\t\t$padStrLength = mb_strlen($padStr);\n\t\tif (!$strLength && ($padType == STR_PAD_RIGHT || $padType == STR_PAD_LEFT))\n\t\t{\n\t\t\t$strLength = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLength || $padLen <= $strLength)\n\t\t{\n\t\t\treturn $string;\n\t\t}\n\n\t\t$result = null;\n\t\t$repeat = ceil(($padLen - $strLength) / $padStrLength);\n\t\tif ($padType == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$result = $string . str_repeat($padStr, $repeat);\n\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_LEFT)\n\t\t{\n\t\t\t$result = str_repeat($padStr, $repeat) . $string;\n\t\t\t$result = mb_substr($result, -$padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_BOTH)\n\t\t{\n\t\t\t$length = ($padLen - $strLength) / 2;\n\t\t\t$repeat = ceil($length / $padStrLength);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length))\n\t\t\t\t.$string\n\t\t\t\t.mb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function mbStrPad($str, $len, $padStr = \" \", $padStyle = STR_PAD_RIGHT, $encoding = \"UTF-8\") {\n\t\treturn str_pad($str, strlen($str) - mb_strlen($str, $encoding) + $len, $padStr, $padStyle);\n\t}", "function mb_str_pad($str, $padLen, $padStr = ' ', $dir = STR_PAD_RIGHT) {\n\t\t// @codingStandardsIgnoreEnd\n\t\t$strLen = mb_strlen($str);\n\t\t$padStrLen = mb_strlen($padStr);\n\t\tif (!$strLen && ($dir == STR_PAD_RIGHT || $dir == STR_PAD_LEFT)) {\n\t\t\t$strLen = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLen || $padLen <= $strLen) {\n\t\t\treturn $str;\n\t\t}\n\n\t\t$result = null;\n\t\tif ($dir == STR_PAD_BOTH) {\n\t\t\t$length = ($padLen - $strLen) / 2;\n\t\t\t$repeat = ceil($length / $padStrLen);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) .\n\t\t\t\t$str .\n\t\t\t\tmb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t} else {\n\t\t\t$repeat = ceil($strLen - $padStrLen + $padLen);\n\t\t\tif ($dir == STR_PAD_RIGHT) {\n\t\t\t\t$result = $str . str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t\t} elseif ($dir == STR_PAD_LEFT) {\n\t\t\t\t$result = str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr(\n\t\t\t\t\t$result,\n\t\t\t\t\t0,\n\t\t\t\t\t$padLen - (($strLen - $padStrLen) + $padStrLen)\n\t\t\t\t) .\n\t\t\t\t\t$str;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function pad($number, $length, $pad = '0'){\n return str_pad((intval($number) + 1), $length, $pad, STR_PAD_LEFT);;\n }", "function mb_str_pad(string $string, int $pad_length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, string $encoding = null): string\n{\n return Strings::pad($string, $pad_length, $pad_string, $pad_type, $encoding);\n}", "protected function _pad($string = '', $len = 14) {\n\t\treturn str_pad($string, $len);\n\t}", "function padString($number, $pad_len){\n\t$result=null;\n\tfor($i=0; $i < $pad_len - strlen($number); $i++){\n\t\t$result .= \"0\";\n\t}\n\t$result .= $number;\n\treturn $result;\n}", "function str_pad($input,$pad_length,$pad_string=' ',$pad_type=STR_PAD_RIGHT)\n{\n\treturn '';\n}", "private static function strpad($value, $length)\n {\n $buf = \"\";\n $padLength = $length - mb_strlen($value);\n\n // Sanity check: $padLength can be sub-zero when incorrect\n // mb_internal_encoding is used.\n if ($padLength > 0) {\n return str_repeat(\" \", $padLength) . $value;\n } else {\n return $value;\n }\n }", "function str_pad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT)\n{\n return '';\n}", "public function padLeft($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padLeft($this->_s, $finalWidth, $with), $this->_encoding);\n }", "private function mbStrPad($input, $padLength, $padString, $padStyle, $encoding = \"UTF-8\") {\n \t\treturn str_pad($input, strlen($input) - mb_strlen($input, $encoding) + $padLength, $padString, $padStyle);\n \t}", "public function testPadLeftSpecifiedFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4, '0');\n $this->assertSame('0' . $this->stringLeft, $paddedString);\n }", "public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n\t{\n\t\tif (str::is_ascii($str) AND str::is_ascii($pad_str))\n\t\t{\n\t\t\treturn str_pad($str, $final_str_length, $pad_str, $pad_type);\n\t\t}\n\n\t\t$str_length = mb_strlen($str);\n\n\t\tif ($final_str_length <= 0 OR $final_str_length <= $str_length)\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t$pad_str_length = mb_strlen($pad_str);\n\t\t$pad_length = $final_str_length - $str_length;\n\n\t\tif ($pad_type == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr($str.str_repeat($pad_str, $repeat), 0, $final_str_length);\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_LEFT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)).$str;\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_BOTH)\n\t\t{\n\t\t\t$pad_length /= 2;\n\t\t\t$pad_length_left = floor($pad_length);\n\t\t\t$pad_length_right = ceil($pad_length);\n\t\t\t$repeat_left = ceil($pad_length_left / $pad_str_length);\n\t\t\t$repeat_right = ceil($pad_length_right / $pad_str_length);\n\n\t\t\t$pad_left = mb_substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n\t\t\t$pad_right = mb_substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n\t\t\treturn $pad_left.$str.$pad_right;\n\t\t}\n\n\t\ttrigger_error('utf8::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n\t}", "protected function strpad($input, $pad_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n {\n $input_len = $this->strlen($input);\n if ($pad_length <= $input_len) {\n return $input;\n }\n $pad_str_len = $this->strlen($pad_str);\n $pad_len = $pad_length - $input_len;\n if ($pad_type == STR_PAD_LEFT) {\n $repeat_times = ceil($pad_len / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times);\n return $this->substr($prefix, 0, floor($pad_len)) . $input;\n }\n if ($pad_type == STR_PAD_BOTH) {\n $pad_len /= 2;\n $pad_amount_left = floor($pad_len);\n $pad_amount_right = ceil($pad_len);\n $repeat_times_left = ceil($pad_amount_left / $pad_str_len);\n $repeat_times_right = ceil($pad_amount_right / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times_left);\n $padding_left = $this->substr($prefix, 0, $pad_amount_left);\n $suffix = str_repeat($pad_str, $repeat_times_right);\n $padding_right = $this->substr($suffix, 0, $pad_amount_right);\n return $padding_left . $input . $padding_right;\n }\n // STR_PAD_RIGHT\n $repeat_times = ceil($pad_len / $pad_str_len);\n $input .= str_repeat($pad_str, $repeat_times);\n return $this->substr($input, 0, $pad_length);\n }", "public static function leading_zeros( $length ) {\n\t\t\t$s = '';\n\t\t\twhile ( strlen( $s ) < $length ){\n\t\t\t\t$s = '0' . $s;\n\t\t\t}\n\t\t\treturn $s;\n\t\t}", "public function pad($length, $padStr = ' ', $padType = 'right')\n {\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new \\InvalidArgumentException('Pad expects $padType ' .\n \"to be one of 'left', 'right' or 'both'\");\n }\n\n switch ($padType) {\n case 'left':\n return $this->padLeft($length, $padStr);\n case 'right':\n return $this->padRight($length, $padStr);\n default:\n return $this->padBoth($length, $padStr);\n }\n }", "private function applyPadding($left = 0, $right = 0, $padStr = ' ')\n {\n $stringy = static::create($this->str, $this->encoding);\n $length = mb_strlen($padStr, $stringy->encoding);\n\n $strLength = $stringy->length();\n $paddedLength = $strLength + $left + $right;\n\n if (!$length || $paddedLength <= $strLength) {\n return $stringy;\n }\n\n $leftPadding = mb_substr(str_repeat($padStr, ceil($left / $length)), 0,\n $left, $stringy->encoding);\n $rightPadding = mb_substr(str_repeat($padStr, ceil($right / $length)),\n 0, $right, $stringy->encoding);\n\n $stringy->str = $leftPadding . $stringy->str . $rightPadding;\n\n return $stringy;\n }", "public static function padRight($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'right', $encoding);\n }", "public static function hex_lpad($str, $length) {\n while (strlen($str) < $length) {\n $str = \"0\" . $str;\n }\n return $str;\n }", "public function padBoth($length, $padStr = ' ')\n {\n $padding = $length - $this->length();\n\n return $this->applyPadding(floor($padding / 2), ceil($padding / 2),\n $padStr);\n }", "public function padding($length = 1)\n {\n $padding = \"\";\n \n for ($i = 0; $i < $length; $i++) {\n $padding .= \"&nbsp;\";\n }\n \n return $padding;\n }", "function left($string, $length) {\n\treturn substr($string, 0, $length);\n}", "private static function pad($text, $length, $char = ' ') {\n\t\tassert(TRUE === is_string(base64_encode($text)));\n\t\tassert(TRUE === is_int($length));\n\t\tassert(TRUE === is_string($char));\n\t\t$return = $text;\n\t\tif (mb_strlen($text) < $length) {\n\t\t\t$return = mb_str_pad($text, $length, $char);\n\t\t}\n\t\tif (mb_strlen($text) > $length) {\n\t\t\t$return = mb_substr($text, 0, $length);\n\t\t}\n\t\treturn $return;\n\t}", "public function testPadLeftDefaultFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4);\n $this->assertSame(' ' . $this->stringLeft, $paddedString);\n }", "public static function padBoth(string $value, int $length, string $pad = ' '): string\n {\n $short = max(0, $length - mb_strlen($value));\n $shortLeft = floor($short / 2);\n $shortRight = ceil($short / 2);\n\n return mb_substr(str_repeat($pad, $shortLeft), 0, $shortLeft) .\n $value .\n mb_substr(str_repeat($pad, $shortRight), 0, $shortRight);\n }", "function left($text, $length){\n return substr($text, 0, $length);\n }", "private function pad($string)\n {\n return $string . $string;\n }", "function str_zero_leading($i, $length = 1)\n {\n return str_pad($i, $length, '0', STR_PAD_LEFT);\n }", "function zpad($text,$length=2,$c='0')\n{\n\twhile(strlen($text)<$length) $text=$c.$text;\n\treturn $text;\n}", "public static function padEnd($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_RIGHT);\n }", "public static function lpad()\n\t{\n\t}", "function padl_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s = str_repeat($c, $m) . $s;\r\n return $s;\r\n }", "public static function padRight($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn $s . str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen);\n\t}", "protected function padMessage(string $message, $length = 80): string\n {\n $currentLen = strlen($this->filterOutTags($message));\n if ($currentLen < $length) {\n $message .= str_repeat(' ', $length - $currentLen);\n }\n\n return $message;\n }", "public function setLength($newLength, $padding = ' ')\n\t{\n\t\t$newLength = (int) $newLength;\n\t\t$currentLength = $this->length();\n\n\t\tif ($newLength != $currentLength) {\n\t\t\twhile ($newLength > $this->length()) {\n\t\t\t\t$this->string .= $padding;\n\t\t\t}\n\t\t\tif ($newLength < $this->length()) {\n\t\t\t\t$this->string = mb_substr($this->string, 0, $newLength, $this->encoding);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "function char_pad ( $str )\n\t{\n\t\t$tmpStr = $str;\n\n\t\t$l = strlen( $tmpStr ) * 8; // # of bits from input string\n\n\n\t\t$tmpStr .= \"\\x80\"; // append the \"1\" bit followed by 7 0's\n\n\n\t\t$k = (512 - (($l + 8 + 64) % 512)) / 8; // # of 0 bytes to append\n\t\t$k += 4; // PHP String's will never exceed (2^31)-1, so 1st 32bits of\n\t\t// the 64-bit value representing $l can be all 0's\n\n\n\t\tfor ( $x = 0; $x < $k; $x ++ )\n\t\t\t$tmpStr .= \"\\0\";\n\n\t\t// append the last 32-bits representing the # of bits from input string ($l)\n\t\t$tmpStr .= chr( (($l >> 24) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 16) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 8) & 0xFF) );\n\t\t$tmpStr .= chr( ($l & 0xFF) );\n\n\t\treturn $tmpStr;\n\t}", "public function strPadLeft( string $value, int $digits) : string\n {\n return str_pad( $value, $digits, '0', STR_PAD_LEFT );\n }", "function padr_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s.= str_repeat($c, $m);\r\n return $s;\r\n }", "public static function padRight($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return $value . mb_substr(str_repeat($pad, $short), 0, $short);\n }", "public static function str_pad($b) {\n $padding = 16 - ((strlen($b) - 1) & 15);\n return $b . str_repeat(\"\\0\", $padding - 1);\n }", "function pad(int $length, string $padContent = ' ', int $type = STR_PAD_RIGHT): Closure\n{\n /**\n * @param string $string The string to pad out.\n * @return string\n */\n return function (string $string) use ($length, $padContent, $type): string {\n return \\str_pad($string, $length, $padContent, $type);\n };\n}", "function padding($id){\n return str_pad($id, 6, 0, STR_PAD_LEFT);\n }", "function lshift($n,$b){ return str_pad($n,($b+strlen($n)),\"0\");}", "function pad_zero($number, $length=6, $in_front=TRUE) {\n $number = (string)$number;\n // jumlah loop yang dilakukan adalah panjang digit - jumlah karakter\n // jadi jika ingin digit 6 dan angka yang disupply adalah 3\n // maka loop = 6 - 1 => 5 buah NOL\n $loop = $length - strlen($number);\n\n // variabel penampung hasil\n $result = '';\n for ($i=0; $i<$loop; $i++) {\n // tambahkan nol\n $result .= '0';\n }\n\n // gabungkan jumlah NOL dengan angka\n if ($in_front === TRUE) {\n $result = $result . $number;\n } else {\n // NOL dibelakang\n $result = $number . $result;\n }\n\n return $result;\n}", "public function pad (int $length) : self {\n $currentCount = $this->count();\n\n if ($currentCount >= $length) {\n return $this;\n }\n\n $bits = array_fill(0, $length - $currentCount, 0);\n array_push($bits, ...$this->items);\n\n $this->items = $bits;\n return $this;\n }", "public function left(string $string, int $chars): string;", "public function padRight($length, $padStr = ' ')\n {\n return $this->applyPadding(0, $length - $this->length(), $padStr);\n }", "public static function oneTimePadCreate ($length=100) {\n self::mt_randomize();\n\n $pad = '';\n for ($i = 0; $i < $length; $i++) {\n $pad .= chr(mt_rand(0,255));\n }\n\n return base64_encode($pad);\n }", "private function padCounter($counter, $padding) :string\n {\n return str_pad($counter, $padding, '0', STR_PAD_LEFT);\n }", "function\tlpad($subject, $char=\" \", $maxsize=4)\t{\r\n\twhile(strlen($subject)<$maxsize) {\r\n\t\t$subject = $char.$subject;\r\n\t}\r\n\r\n\treturn $subject;\r\n}", "public function pad($size, $value);", "public function testPadRightDefaultFiller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "protected function addpadding($string, $blocksize = 32) {\n $len = strlen($string);\n $pad = $blocksize - ($len % $blocksize);\n $string .= \\str_repeat(chr($pad), $pad);\n return $string;\n }", "public\n\n function addZero( $nr, $range = 2, $left = true, $char = \"0\" )\n {\n $nr = trim( $nr );\n if ($left) {\n $method = STR_PAD_LEFT;\n } else {\n $method = STR_PAD_RIGHT;\n }\n return str_pad( $nr, $range, $char, $method );\n }", "public function testPadRightSpecifiedFIller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "static public function PackStringWithLength($str){\n $len = strlen($str);\n return pack('n', $len) . $str;\n }", "function pad($data, $shouldbe, $put) {\n\tif (strlen($data) == $shouldbe) {\n\t\treturn $data;\n\t} else {\n\t\t$padding = \"\";\n\t\tfor ($i = strlen($data);$i < $shouldbe;$i++) {\n\t\t\t$padding .= $put;\n\t\t}\n\t\treturn $padding . $data;\n\t}\n}", "public function align(string $message, int $length = null, int $alignment = self::ALIGN_LEFT): string\n {\n $plainLength = Helper::strlenWithoutDecoration($this->getFormatter(), $message);\n $length = $length + (strlen($message) - $plainLength);\n \n switch ($alignment) {\n case self::ALIGN_CENTER:\n return str_pad($message, $length, ' ', STR_PAD_BOTH);\n \n case self::ALIGN_RIGHT:\n return str_pad($message, $length, ' ', STR_PAD_LEFT);\n \n default:\n case self::ALIGN_LEFT:\n return str_pad($message, $length, ' ', STR_PAD_RIGHT);\n }\n }", "private static function padKey($key)\n {\n return strlen($key) < 16 ? str_repeat($key, ceil(16 / strlen($key))) : $key;\n }", "function leading_words($str, $length, $strict = false)\n {\n $l = strlen($str);\n if ($l <= $length) return $str;\n $result = substr($str, -1 * $length);\n\n if ($strict) {\n // only words that fit in specified bounds\n for ($i = 0, $l = strlen($result); $i < $l; $i++) {\n if (Strings::_is_devider($result[0])) break;\n // cut one byte from the beginning of string\n $result = substr($result, 1);\n }\n\n } else {\n // expand bounds if leftmost word cannot fit in it\n for ($i = $l - $length - 1; $i >= 0; $i--) {\n if (Strings::_is_devider($str[$i])) break;\n $result = $str[$i] . $result;\n }\n }\n\n return ltrim($result, implode('', Strings::_word_deviders()));\n }", "function zero_pad($number)\n{\n if ($number < 10)\n return \"0$number\";\n\n return \"$number\";\n}", "public function pad($length, $value)\n {\n return new static(array_pad($this->items, $length, $value));\n }", "public static function left($str, $num){\t\t\t\n\t\t\t$str = substr($str, 0, $num);\n\t\t\treturn $str;\t\n\t\t}", "public function format_id($next_id, $left_pad = 0) {\n return str_pad($next_id, $left_pad, '0', STR_PAD_LEFT);\n }", "public function padNext($padWidth)\n {\n return $this->padNext2($padWidth, ' ');\n }", "public function padBoth($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padBoth($this->_s, $finalWidth, $with), $this->_encoding);\n }", "protected function encodeLength(int $length, int $offset)\r\n {\r\n if ($length < 56) {\r\n return dechex(strval($length + $offset));\r\n }\r\n $hexLength = $this->intToHex($length);\r\n $firstByte = $this->intToHex($offset + 55 + (strlen($hexLength) / 2));\r\n return $firstByte . $hexLength;\r\n }", "public static function addLeading(string $string, string $chars): string\n {\n if (self::startsWith($string, $chars)) {\n $length = strlen($chars);\n $string = substr($string, $length);\n }\n\n return $chars . $string;\n }", "public function padding(string $padding)\r\n {\r\n return $this->option('padding', $padding);\r\n }", "protected function tcPad($padThis)\n\t{\n\t\tif(strlen($padThis) < 2){\n\t\t\treturn str_pad($padThis, 2, '0', STR_PAD_LEFT);\n\t\t}else{\n\t\t\treturn $padThis;\n\t\t}\n\t}", "function slice(string $string, int $offset, ?int $length = null, Encoding $encoding = Encoding::UTF_8): string\n{\n $string_length = length($string, $encoding);\n $offset = Internal\\validate_offset($offset, $string_length);\n if (0 === $offset && (null === $length || $string_length <= $length)) {\n return $string;\n }\n\n return mb_substr($string, $offset, $length, $encoding->value);\n}", "function number_pad($number,$n) {\r\n\treturn str_pad((int) $number,$n,\"0\",STR_PAD_LEFT);\r\n}", "function writePadded($string, $pad, $fgColor = null, $bgColor = null) {\n\t\treturn $this->write($string . str_repeat(' ', max(0, $pad - strlen($string))), $fgColor, $bgColor);\n\t}", "protected function addPadding($value)\n\t{\n\t\t$pad = $this->block - (strlen($value) % $this->block);\n\n\t\treturn $value.str_repeat(chr($pad), $pad);\n\t}", "public function padRight($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padRight($this->_s, $finalWidth, $with), $this->_encoding);\n }", "function fit($str, $len, $separator){\n //\n //Get teh length of teh string\n $strlen = strlen($str);\n //\n //Decide whether to truncate teh string or padd id\n if ($strlen>$len){\n //\n //Trim the string by $x characters\n return substr($str, 0, $len);\n }\n //\n else{\n //\n return str_pad($str, $len, $separator, STR_PAD_RIGHT);\n \n }\n }", "protected function stringWithLength($str){\n $str = strlen(StripSlashes($str)).$str;\n return $str;\n }", "function str_trunc($string, $limit, $break=\" \", $pad=\"...\") {\n $limit -= strlen($pad);\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "function shortenString($str, $length)\r\n\t{\r\n\t\treturn substr($str, 0, $length) . (strlen($str) > $length ? \"....\" : \"\");\r\n\t}", "public function rightPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_RIGHT);\n }", "function str_limit(string $string, int $length, bool $addDots = false): string {\n\t\tif (strlen($string) > $length)\n\t\t\t$string = substr($string, 0, ($addDots ? $length - 3 : $length)) . ($addDots ? \"...\" : \"\");\n\n\t\treturn $string;\n\t}", "function trimSize($str, $size)\n{\n if ($size - strlen($str) > 0) {\n return str_pad($str, $size);\n } else {\n return substr($str, 0, $size);\n }\n}", "protected function padDigits($number , $padTo)\n\t{\n\t\t$temp = \"\";\n\t $pad = $padTo - strlen($number);\n\n\t\tfor($i = 1; $i <= $pad;$i++){\n\t\t\t$temp .= \"0\";\n\t\t}\n\n\t\treturn $temp.$number;\n\t}", "protected static function unpadString($string)\r\n {\r\n $len = strlen($string);\r\n $pad = ord($string[$len - 1]);\r\n\r\n return substr($string, 0, $len - $pad);\r\n }", "public function setPadding($padding);", "protected function _pad($message, $level = 1) {\n\t\t$padding = str_repeat(' ', $level * 4);\n\t\treturn $padding . str_replace(\"\\n\", \"\\n{$padding}\", $message);\n\t}" ]
[ "0.815958", "0.80475897", "0.7918722", "0.78402317", "0.7523954", "0.7450244", "0.71637285", "0.7133385", "0.7131126", "0.71059763", "0.7058166", "0.70455825", "0.69306904", "0.6910259", "0.6904102", "0.69022524", "0.68968594", "0.6890957", "0.68871844", "0.68491", "0.6843297", "0.6767461", "0.6760668", "0.6690406", "0.6623929", "0.66225487", "0.6619463", "0.6568588", "0.6556306", "0.65344137", "0.6499957", "0.64966357", "0.6495451", "0.64921796", "0.6455249", "0.6437449", "0.6415303", "0.64115983", "0.6397276", "0.6312834", "0.62862754", "0.62794065", "0.62614775", "0.62287253", "0.61727697", "0.6151337", "0.6149399", "0.60624397", "0.6019019", "0.6013321", "0.60050184", "0.59494454", "0.5944793", "0.5944105", "0.5840941", "0.5832867", "0.58177376", "0.57886857", "0.57755667", "0.5765353", "0.57548034", "0.56889427", "0.5688751", "0.56496507", "0.5612554", "0.5571495", "0.55706316", "0.5564281", "0.55281293", "0.5484968", "0.5469373", "0.54390967", "0.54099846", "0.539752", "0.5388417", "0.536211", "0.53565145", "0.53272194", "0.5319444", "0.53107315", "0.5308961", "0.5306531", "0.5296885", "0.5289458", "0.52685475", "0.5268545", "0.5218933", "0.52058583", "0.51647496", "0.5163127", "0.51629984", "0.5153158", "0.5126271", "0.51176", "0.5110166", "0.5109187", "0.5096665", "0.50953436", "0.50917363", "0.5083284" ]
0.86786276
0
Returns a new string of a given length such that the end of the string is padded. Alias for pad($str, $length, $padStr, 'right', $encoding)
Возвращает новый строку заданной длины, так что конец строки заполняется. Алиас для pad($str, $length, $padStr, 'right', $encoding)
public static function padRight($str, $length, $padStr = ' ', $encoding = null) { return self::pad($str, $length, $padStr, 'right', $encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function padEnd($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_RIGHT);\n }", "public static function pad($str, $length, $padStr = ' ', $padType = 'right',\n $encoding = null) {\n $encoding = $encoding ?: mb_internal_encoding();\n\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new InvalidArgumentException('Pad expects the fourth ' .\n \"argument to be one of 'left', 'right' or 'both'\");\n }\n\n $strLength = mb_strlen($str, $encoding);\n $padStrLength = mb_strlen($padStr, $encoding);\n\n if ($length <= $strLength || $padStrLength <= 0)\n return $str;\n\n // Number of times to repeat the padStr if left or right\n $times = ceil(($length - $strLength) / $padStrLength);\n $paddedStr = '';\n\n if ($padType == 'left') {\n // Repeat the pad, cut it, and prepend\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, $length - $strLength, $encoding);\n $paddedStr = $leftPad . $str;\n } elseif ($padType == 'right') {\n // Append the repeated pad and get a substring of the given length\n $paddedStr = $str . str_repeat($padStr, $times);\n $paddedStr = mb_substr($paddedStr, 0, $length, $encoding);\n } else {\n // Number of times to repeat the padStr on both sides\n $paddingSize = ($length - $strLength) / 2;\n $times = ceil($paddingSize / $padStrLength);\n\n // Favour right padding over left, as with str_pad()\n $rightPad = str_repeat($padStr, $times);\n $rightPad = mb_substr($rightPad, 0, ceil($paddingSize), $encoding);\n\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, floor($paddingSize), $encoding);\n\n $paddedStr = $leftPad . $str . $rightPad;\n }\n\n return $paddedStr;\n }", "function rightpad($str, $len, $pad = \" \") {\n while (strlen($str) < $len) {\n $str .= $pad;\n }\n return $str;\n}", "public static function padRight($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn $s . str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen);\n\t}", "public static function padBoth($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'both', $encoding);\n }", "public static function pad($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_BOTH);\n }", "public function padRight($length, $padStr = ' ')\n {\n return $this->applyPadding(0, $length - $this->length(), $padStr);\n }", "static function padString($string,$length,$padchar=' ',$padtype=STR_PAD_RIGHT) {\n\t\t\treturn str_pad($string,$length,$padchar,$padtype);\n\t\t}", "function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n{\n if(Unicode::is_ascii($str) and Unicode::is_ascii($pad_str))\n {\n return str_pad($str, $final_str_length, $pad_str, $pad_type);\n }\n\n $str_length = Unicode::strlen($str);\n\n if($final_str_length <= 0 or $final_str_length <= $str_length)\n {\n return $str;\n }\n\n $pad_str_length = Unicode::strlen($pad_str);\n $pad_length = $final_str_length - $str_length;\n\n if($pad_type == STR_PAD_RIGHT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);\n }\n\n if($pad_type == STR_PAD_LEFT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;\n }\n\n if($pad_type == STR_PAD_BOTH)\n {\n $pad_length /= 2;\n $pad_length_left = floor($pad_length);\n $pad_length_right = ceil($pad_length);\n $repeat_left = ceil($pad_length_left / $pad_str_length);\n $repeat_right = ceil($pad_length_right / $pad_str_length);\n $pad_left = Unicode::substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n $pad_right = Unicode::substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n return $pad_left . $str . $pad_right;\n }\n\n trigger_error('Unicode::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n}", "public static function padRight($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return $value . mb_substr(str_repeat($pad, $short), 0, $short);\n }", "public static function mbStrPad($str, $len, $padStr = \" \", $padStyle = STR_PAD_RIGHT, $encoding = \"UTF-8\") {\n\t\treturn str_pad($str, strlen($str) - mb_strlen($str, $encoding) + $len, $padStr, $padStyle);\n\t}", "public static function pad($string, $padLen, $padStr = ' ', $padType = STR_PAD_RIGHT)\n\t{\n\t\t$strLength = mb_strlen($string);\n\t\t$padStrLength = mb_strlen($padStr);\n\t\tif (!$strLength && ($padType == STR_PAD_RIGHT || $padType == STR_PAD_LEFT))\n\t\t{\n\t\t\t$strLength = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLength || $padLen <= $strLength)\n\t\t{\n\t\t\treturn $string;\n\t\t}\n\n\t\t$result = null;\n\t\t$repeat = ceil(($padLen - $strLength) / $padStrLength);\n\t\tif ($padType == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$result = $string . str_repeat($padStr, $repeat);\n\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_LEFT)\n\t\t{\n\t\t\t$result = str_repeat($padStr, $repeat) . $string;\n\t\t\t$result = mb_substr($result, -$padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_BOTH)\n\t\t{\n\t\t\t$length = ($padLen - $strLength) / 2;\n\t\t\t$repeat = ceil($length / $padStrLength);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length))\n\t\t\t\t.$string\n\t\t\t\t.mb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n\t{\n\t\tif (str::is_ascii($str) AND str::is_ascii($pad_str))\n\t\t{\n\t\t\treturn str_pad($str, $final_str_length, $pad_str, $pad_type);\n\t\t}\n\n\t\t$str_length = mb_strlen($str);\n\n\t\tif ($final_str_length <= 0 OR $final_str_length <= $str_length)\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t$pad_str_length = mb_strlen($pad_str);\n\t\t$pad_length = $final_str_length - $str_length;\n\n\t\tif ($pad_type == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr($str.str_repeat($pad_str, $repeat), 0, $final_str_length);\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_LEFT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)).$str;\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_BOTH)\n\t\t{\n\t\t\t$pad_length /= 2;\n\t\t\t$pad_length_left = floor($pad_length);\n\t\t\t$pad_length_right = ceil($pad_length);\n\t\t\t$repeat_left = ceil($pad_length_left / $pad_str_length);\n\t\t\t$repeat_right = ceil($pad_length_right / $pad_str_length);\n\n\t\t\t$pad_left = mb_substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n\t\t\t$pad_right = mb_substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n\t\t\treturn $pad_left.$str.$pad_right;\n\t\t}\n\n\t\ttrigger_error('utf8::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n\t}", "public function padBoth($length, $padStr = ' ')\n {\n $padding = $length - $this->length();\n\n return $this->applyPadding(floor($padding / 2), ceil($padding / 2),\n $padStr);\n }", "function mb_str_pad($str, $padLen, $padStr = ' ', $dir = STR_PAD_RIGHT) {\n\t\t// @codingStandardsIgnoreEnd\n\t\t$strLen = mb_strlen($str);\n\t\t$padStrLen = mb_strlen($padStr);\n\t\tif (!$strLen && ($dir == STR_PAD_RIGHT || $dir == STR_PAD_LEFT)) {\n\t\t\t$strLen = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLen || $padLen <= $strLen) {\n\t\t\treturn $str;\n\t\t}\n\n\t\t$result = null;\n\t\tif ($dir == STR_PAD_BOTH) {\n\t\t\t$length = ($padLen - $strLen) / 2;\n\t\t\t$repeat = ceil($length / $padStrLen);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) .\n\t\t\t\t$str .\n\t\t\t\tmb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t} else {\n\t\t\t$repeat = ceil($strLen - $padStrLen + $padLen);\n\t\t\tif ($dir == STR_PAD_RIGHT) {\n\t\t\t\t$result = $str . str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t\t} elseif ($dir == STR_PAD_LEFT) {\n\t\t\t\t$result = str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr(\n\t\t\t\t\t$result,\n\t\t\t\t\t0,\n\t\t\t\t\t$padLen - (($strLen - $padStrLen) + $padStrLen)\n\t\t\t\t) .\n\t\t\t\t\t$str;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function pad($length, $padStr = ' ', $padType = 'right')\n {\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new \\InvalidArgumentException('Pad expects $padType ' .\n \"to be one of 'left', 'right' or 'both'\");\n }\n\n switch ($padType) {\n case 'left':\n return $this->padLeft($length, $padStr);\n case 'right':\n return $this->padRight($length, $padStr);\n default:\n return $this->padBoth($length, $padStr);\n }\n }", "function mb_str_pad(string $string, int $pad_length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, string $encoding = null): string\n{\n return Strings::pad($string, $pad_length, $pad_string, $pad_type, $encoding);\n}", "function str_pad($input,$pad_length,$pad_string=' ',$pad_type=STR_PAD_RIGHT)\n{\n\treturn '';\n}", "public static function padBoth(string $value, int $length, string $pad = ' '): string\n {\n $short = max(0, $length - mb_strlen($value));\n $shortLeft = floor($short / 2);\n $shortRight = ceil($short / 2);\n\n return mb_substr(str_repeat($pad, $shortLeft), 0, $shortLeft) .\n $value .\n mb_substr(str_repeat($pad, $shortRight), 0, $shortRight);\n }", "function str_pad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT)\n{\n return '';\n}", "function padString($number, $pad_len){\n\t$result=null;\n\tfor($i=0; $i < $pad_len - strlen($number); $i++){\n\t\t$result .= \"0\";\n\t}\n\t$result .= $number;\n\treturn $result;\n}", "protected function _pad($string = '', $len = 14) {\n\t\treturn str_pad($string, $len);\n\t}", "protected function strpad($input, $pad_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n {\n $input_len = $this->strlen($input);\n if ($pad_length <= $input_len) {\n return $input;\n }\n $pad_str_len = $this->strlen($pad_str);\n $pad_len = $pad_length - $input_len;\n if ($pad_type == STR_PAD_LEFT) {\n $repeat_times = ceil($pad_len / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times);\n return $this->substr($prefix, 0, floor($pad_len)) . $input;\n }\n if ($pad_type == STR_PAD_BOTH) {\n $pad_len /= 2;\n $pad_amount_left = floor($pad_len);\n $pad_amount_right = ceil($pad_len);\n $repeat_times_left = ceil($pad_amount_left / $pad_str_len);\n $repeat_times_right = ceil($pad_amount_right / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times_left);\n $padding_left = $this->substr($prefix, 0, $pad_amount_left);\n $suffix = str_repeat($pad_str, $repeat_times_right);\n $padding_right = $this->substr($suffix, 0, $pad_amount_right);\n return $padding_left . $input . $padding_right;\n }\n // STR_PAD_RIGHT\n $repeat_times = ceil($pad_len / $pad_str_len);\n $input .= str_repeat($pad_str, $repeat_times);\n return $this->substr($input, 0, $pad_length);\n }", "public function rightPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_RIGHT);\n }", "public static function pad($number, $length, $pad = '0'){\n return str_pad((intval($number) + 1), $length, $pad, STR_PAD_LEFT);;\n }", "private static function pad($text, $length, $char = ' ') {\n\t\tassert(TRUE === is_string(base64_encode($text)));\n\t\tassert(TRUE === is_int($length));\n\t\tassert(TRUE === is_string($char));\n\t\t$return = $text;\n\t\tif (mb_strlen($text) < $length) {\n\t\t\t$return = mb_str_pad($text, $length, $char);\n\t\t}\n\t\tif (mb_strlen($text) > $length) {\n\t\t\t$return = mb_substr($text, 0, $length);\n\t\t}\n\t\treturn $return;\n\t}", "private function mbStrPad($input, $padLength, $padString, $padStyle, $encoding = \"UTF-8\") {\n \t\treturn str_pad($input, strlen($input) - mb_strlen($input, $encoding) + $padLength, $padString, $padStyle);\n \t}", "public static function padRight($pInput, $pPadLength, $pPadChar) {\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_RIGHT);\n\t}", "public static function padLeft($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'left', $encoding);\n }", "private static function strpad($value, $length)\n {\n $buf = \"\";\n $padLength = $length - mb_strlen($value);\n\n // Sanity check: $padLength can be sub-zero when incorrect\n // mb_internal_encoding is used.\n if ($padLength > 0) {\n return str_repeat(\" \", $padLength) . $value;\n } else {\n return $value;\n }\n }", "public static function padStart($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_LEFT);\n }", "public function padRight($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padRight($this->_s, $finalWidth, $with), $this->_encoding);\n }", "public function padding($length = 1)\n {\n $padding = \"\";\n \n for ($i = 0; $i < $length; $i++) {\n $padding .= \"&nbsp;\";\n }\n \n return $padding;\n }", "private function applyPadding($left = 0, $right = 0, $padStr = ' ')\n {\n $stringy = static::create($this->str, $this->encoding);\n $length = mb_strlen($padStr, $stringy->encoding);\n\n $strLength = $stringy->length();\n $paddedLength = $strLength + $left + $right;\n\n if (!$length || $paddedLength <= $strLength) {\n return $stringy;\n }\n\n $leftPadding = mb_substr(str_repeat($padStr, ceil($left / $length)), 0,\n $left, $stringy->encoding);\n $rightPadding = mb_substr(str_repeat($padStr, ceil($right / $length)),\n 0, $right, $stringy->encoding);\n\n $stringy->str = $leftPadding . $stringy->str . $rightPadding;\n\n return $stringy;\n }", "function padr_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s.= str_repeat($c, $m);\r\n return $s;\r\n }", "private function pad($string)\n {\n return $string . $string;\n }", "function pad(int $length, string $padContent = ' ', int $type = STR_PAD_RIGHT): Closure\n{\n /**\n * @param string $string The string to pad out.\n * @return string\n */\n return function (string $string) use ($length, $padContent, $type): string {\n return \\str_pad($string, $length, $padContent, $type);\n };\n}", "function zpad($text,$length=2,$c='0')\n{\n\twhile(strlen($text)<$length) $text=$c.$text;\n\treturn $text;\n}", "public static function padLeft($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return mb_substr(str_repeat($pad, $short), 0, $short) . $value;\n }", "public static function padLeft($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen) . $s;\n\t}", "function padl_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s = str_repeat($c, $m) . $s;\r\n return $s;\r\n }", "public function setLength($newLength, $padding = ' ')\n\t{\n\t\t$newLength = (int) $newLength;\n\t\t$currentLength = $this->length();\n\n\t\tif ($newLength != $currentLength) {\n\t\t\twhile ($newLength > $this->length()) {\n\t\t\t\t$this->string .= $padding;\n\t\t\t}\n\t\t\tif ($newLength < $this->length()) {\n\t\t\t\t$this->string = mb_substr($this->string, 0, $newLength, $this->encoding);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public function testPadRightSpecifiedFIller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "protected function padMessage(string $message, $length = 80): string\n {\n $currentLen = strlen($this->filterOutTags($message));\n if ($currentLen < $length) {\n $message .= str_repeat(' ', $length - $currentLen);\n }\n\n return $message;\n }", "public static function hex_lpad($str, $length) {\n while (strlen($str) < $length) {\n $str = \"0\" . $str;\n }\n return $str;\n }", "public function padLeft($length, $padStr = ' ')\n {\n return $this->applyPadding($length - $this->length(), 0, $padStr);\n }", "public function testPadRightDefaultFiller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "public static function str_pad($b) {\n $padding = 16 - ((strlen($b) - 1) & 15);\n return $b . str_repeat(\"\\0\", $padding - 1);\n }", "public static function lpad()\n\t{\n\t}", "function right($text, $length){\n return substr($text, -$length);\n }", "function padLeft($targetNo, $padLength)\n{\n $res = str_pad($targetNo, $padLength, '0', STR_PAD_LEFT);\n return $res;\n}", "public function pad($size, $value);", "public function pad (int $length) : self {\n $currentCount = $this->count();\n\n if ($currentCount >= $length) {\n return $this;\n }\n\n $bits = array_fill(0, $length - $currentCount, 0);\n array_push($bits, ...$this->items);\n\n $this->items = $bits;\n return $this;\n }", "public function padNext($padWidth)\n {\n return $this->padNext2($padWidth, ' ');\n }", "function char_pad ( $str )\n\t{\n\t\t$tmpStr = $str;\n\n\t\t$l = strlen( $tmpStr ) * 8; // # of bits from input string\n\n\n\t\t$tmpStr .= \"\\x80\"; // append the \"1\" bit followed by 7 0's\n\n\n\t\t$k = (512 - (($l + 8 + 64) % 512)) / 8; // # of 0 bytes to append\n\t\t$k += 4; // PHP String's will never exceed (2^31)-1, so 1st 32bits of\n\t\t// the 64-bit value representing $l can be all 0's\n\n\n\t\tfor ( $x = 0; $x < $k; $x ++ )\n\t\t\t$tmpStr .= \"\\0\";\n\n\t\t// append the last 32-bits representing the # of bits from input string ($l)\n\t\t$tmpStr .= chr( (($l >> 24) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 16) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 8) & 0xFF) );\n\t\t$tmpStr .= chr( ($l & 0xFF) );\n\n\t\treturn $tmpStr;\n\t}", "protected function addpadding($string, $blocksize = 32) {\n $len = strlen($string);\n $pad = $blocksize - ($len % $blocksize);\n $string .= \\str_repeat(chr($pad), $pad);\n return $string;\n }", "public function padBoth($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padBoth($this->_s, $finalWidth, $with), $this->_encoding);\n }", "function str_limit(string $string, int $length, bool $addDots = false): string {\n\t\tif (strlen($string) > $length)\n\t\t\t$string = substr($string, 0, ($addDots ? $length - 3 : $length)) . ($addDots ? \"...\" : \"\");\n\n\t\treturn $string;\n\t}", "protected function stringWithLength($str){\n $str = strlen(StripSlashes($str)).$str;\n return $str;\n }", "public static function oneTimePadCreate ($length=100) {\n self::mt_randomize();\n\n $pad = '';\n for ($i = 0; $i < $length; $i++) {\n $pad .= chr(mt_rand(0,255));\n }\n\n return base64_encode($pad);\n }", "public function padding(string $padding)\r\n {\r\n return $this->option('padding', $padding);\r\n }", "function padding($id){\n return str_pad($id, 6, 0, STR_PAD_LEFT);\n }", "public function limit_string($string, $length, $replacer = '...') {\n\t if (strlen($string) > $length)\n\t $string = mb_substr($string, 0, $length-3) . $replacer;\n\t return $string;\n\t}", "function right($str, $len)\n\t{\n\t\treturn substr($str, (-1 * $len));\n\t}", "public static function rpad()\n\t{\n\t}", "function pad($data, $shouldbe, $put) {\n\tif (strlen($data) == $shouldbe) {\n\t\treturn $data;\n\t} else {\n\t\t$padding = \"\";\n\t\tfor ($i = strlen($data);$i < $shouldbe;$i++) {\n\t\t\t$padding .= $put;\n\t\t}\n\t\treturn $padding . $data;\n\t}\n}", "static public function PackStringWithLength($str){\n $len = strlen($str);\n return pack('n', $len) . $str;\n }", "private static function truncateToLength(string $text, int $length): string\n {\n return mb_substr($text, 0, $length);\n }", "private function padCounter($counter, $padding) :string\n {\n return str_pad($counter, $padding, '0', STR_PAD_LEFT);\n }", "public function leftPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_LEFT);\n }", "function str_trunc($string, $limit, $break=\" \", $pad=\"...\") {\n $limit -= strlen($pad);\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "public static function truncate($string, $endlength = '30', $end = '...')\n {\n $strlen = strlen($string);\n if ($strlen > $endlength) {\n $trim = $endlength - $strlen;\n $string = substr($string, 0, $trim);\n $string .= $end;\n }\n\n return $string;\n }", "public function addPadding(string $base64String): string\n {\n if (strlen($base64String) % 4 !== 0) {\n return $this->addPadding($base64String . '=');\n }\n\n return $base64String;\n }", "public static function truncate($string, int $maxLength, string $endingChars = '...'): string\n {\n if (self::strlen($string) <= $maxLength) {\n return $string;\n } else {\n $length = $maxLength - self::strlen($endingChars);\n\n return self::substr($string, 0, $length) . $endingChars;\n }\n }", "public function right(string $string, int $chars): string;", "private static function padKey($key)\n {\n return strlen($key) < 16 ? str_repeat($key, ceil(16 / strlen($key))) : $key;\n }", "function\tlpad($subject, $char=\" \", $maxsize=4)\t{\r\n\twhile(strlen($subject)<$maxsize) {\r\n\t\t$subject = $char.$subject;\r\n\t}\r\n\r\n\treturn $subject;\r\n}", "public function pad($length, $value)\n {\n return new static(array_pad($this->items, $length, $value));\n }", "public function generateString(int $length): string;", "function writePadded($string, $pad, $fgColor = null, $bgColor = null) {\n\t\treturn $this->write($string . str_repeat(' ', max(0, $pad - strlen($string))), $fgColor, $bgColor);\n\t}", "public function generateString($length);", "public function testPadLeftSpecifiedFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4, '0');\n $this->assertSame('0' . $this->stringLeft, $paddedString);\n }", "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n}", "function fit($str, $len, $separator){\n //\n //Get teh length of teh string\n $strlen = strlen($str);\n //\n //Decide whether to truncate teh string or padd id\n if ($strlen>$len){\n //\n //Trim the string by $x characters\n return substr($str, 0, $len);\n }\n //\n else{\n //\n return str_pad($str, $len, $separator, STR_PAD_RIGHT);\n \n }\n }", "public static function padLeft($pInput, $pPadLength, $pPadChar)\t{\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_LEFT);\n\t}", "function shorten_by_words($str, $length, $append = '...')\n {\n $result = Strings::trailing_words($str, $length, false);\n return ($str != $result) ? $result . $append : $str;\n }", "public function testPadLeftDefaultFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4);\n $this->assertSame(' ' . $this->stringLeft, $paddedString);\n }", "public function align(string $message, int $length = null, int $alignment = self::ALIGN_LEFT): string\n {\n $plainLength = Helper::strlenWithoutDecoration($this->getFormatter(), $message);\n $length = $length + (strlen($message) - $plainLength);\n \n switch ($alignment) {\n case self::ALIGN_CENTER:\n return str_pad($message, $length, ' ', STR_PAD_BOTH);\n \n case self::ALIGN_RIGHT:\n return str_pad($message, $length, ' ', STR_PAD_LEFT);\n \n default:\n case self::ALIGN_LEFT:\n return str_pad($message, $length, ' ', STR_PAD_RIGHT);\n }\n }", "protected function encodeLength(int $length, int $offset)\r\n {\r\n if ($length < 56) {\r\n return dechex(strval($length + $offset));\r\n }\r\n $hexLength = $this->intToHex($length);\r\n $firstByte = $this->intToHex($offset + 55 + (strlen($hexLength) / 2));\r\n return $firstByte . $hexLength;\r\n }", "public static function leading_zeros( $length ) {\n\t\t\t$s = '';\n\t\t\twhile ( strlen( $s ) < $length ){\n\t\t\t\t$s = '0' . $s;\n\t\t\t}\n\t\t\treturn $s;\n\t\t}", "function truncateChars($string, $limit, $break = \".\", $pad = \"...\") {\n // return with no change if string is shorter than $limit\n if (strlen($string) <= $limit)\n return $string;\n\n // is $break present between $limit and the end of the string? \n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n\n return $string;\n}", "private function _pad($padding)\n {\n $desired_size = $this->_lineSize + $padding - 1;\n $lines = array();\n foreach (file($this->getDatPath()) as $line) {\n $lines[] = str_pad(rtrim($line), $desired_size);\n }\n writeFile($this->getDatPath(), $lines);\n }", "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\")\n{\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n}", "protected function padDigits($number , $padTo)\n\t{\n\t\t$temp = \"\";\n\t $pad = $padTo - strlen($number);\n\n\t\tfor($i = 1; $i <= $pad;$i++){\n\t\t\t$temp .= \"0\";\n\t\t}\n\n\t\treturn $temp.$number;\n\t}", "function gfwa_truncate( $str, $length=10 ) {\n\n if ( strlen( $str ) > $length ) {\n return substr( $str, 0, $length );\n } else {\n $res = $str;\n }\n\n return $res;\n}", "public function generatePassword($length = 8) {\n return new AdvanceStringProcesser(PortableStringProcesser::generatePassword($length, $this->_encoding), $this->_encoding);\n }", "function lshift($n,$b){ return str_pad($n,($b+strlen($n)),\"0\");}", "function str_chop($string, $length = 60, $center = false, $append = null)\n{\n\t// Set the default append string\n\tif ($append === null) {\n\t\t$append = ($center === true) ? ' ... ' : ' ...';\n\t}\n\n\t// Get some measurements\n\t$len_string = strlen($string);\n\t$len_append = strlen($append);\n\n\t// If the string is longer than the maximum length, we need to chop it\n\tif ($len_string > $length) {\n\t\t// Check if we want to chop it in half\n\t\tif ($center === true) {\n\t\t\t// Get the lengths of each segment\n\t\t\t$len_start = $length / 2;\n\t\t\t$len_end = $len_start - $len_append;\n\n\t\t\t// Get each segment\n\t\t\t$seg_start = substr($string, 0, $len_start);\n\t\t\t$seg_end = substr($string, $len_string - $len_end, $len_end);\n\n\t\t\t// Stick them together\n\t\t\t$string = $seg_start . $append . $seg_end;\n\t\t} else {\n // Otherwise, just chop the end off\n\t\t\t$string = substr($string, 0, $length - $len_append) . $append;\n\t\t}\n\t}\n\n\treturn $string;\n}", "public function generatePassword(int $length = 8)\n {\n if ($length <= 0)\n throw new DomainException(\"Cannot generate zero-length passwords\");\n\n if (empty($this->characters))\n throw new UnderflowException(\"First add characters used to generate the password\");\n\n $chars = implode('', array_keys($this->characters));\n $max_val = mb_strlen($chars) - 1;\n $pwd = \"\";\n for ($i = 0; $i < $length; ++$i)\n {\n $pos = random_int(0, $max_val);\n $pwd .= mb_substr($chars, $pos, 1);\n }\n return $pwd;\n }", "function myTruncate($string, $limit, $break=\" \", $pad=\"...\"){\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1)\n $string = substr($string, 0, $breakpoint) . $pad;\n\n return $string;\n }\n }" ]
[ "0.8152257", "0.81412715", "0.8068944", "0.7998606", "0.7959613", "0.7790267", "0.7740737", "0.7709207", "0.7655165", "0.763456", "0.7478849", "0.73773795", "0.73534817", "0.732302", "0.72941774", "0.72439086", "0.723216", "0.71368474", "0.7094544", "0.7077499", "0.7070061", "0.70643204", "0.70539796", "0.7052134", "0.7007102", "0.70049006", "0.6996551", "0.6906124", "0.67499214", "0.67481136", "0.66450524", "0.6621369", "0.661067", "0.6591296", "0.6590712", "0.65387744", "0.65026057", "0.64390045", "0.64358836", "0.64316744", "0.6391596", "0.63765174", "0.6358671", "0.6329208", "0.6151706", "0.6140823", "0.6098735", "0.5991909", "0.5978771", "0.59445393", "0.5919014", "0.5906054", "0.58899903", "0.5856582", "0.58281064", "0.5797525", "0.57377136", "0.5678121", "0.5670619", "0.5669185", "0.56601924", "0.56451213", "0.56208867", "0.56067747", "0.553443", "0.5533205", "0.5531157", "0.5527277", "0.55162525", "0.55024385", "0.54965806", "0.5483442", "0.5473609", "0.54482615", "0.5448022", "0.54456216", "0.54426914", "0.5440581", "0.5426423", "0.54195267", "0.5411995", "0.5388067", "0.53822786", "0.53694254", "0.53686666", "0.53257036", "0.532214", "0.5301846", "0.53006345", "0.53000134", "0.5294774", "0.52633697", "0.52518445", "0.52516323", "0.5247891", "0.5246902", "0.5237343", "0.5232625", "0.5231829", "0.5224902" ]
0.855999
0
Returns a new string of a given length such that both sides of the string string are padded. Alias for pad($str, $length, $padStr, 'both', $encoding)
Возвращает новый строку заданной длины, так что обе стороны строки string заполняются. Алиас для pad($str, $length, $padStr, 'both', $encoding)
public static function padBoth($str, $length, $padStr = ' ', $encoding = null) { return self::pad($str, $length, $padStr, 'both', $encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function pad($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_BOTH);\n }", "public static function pad($str, $length, $padStr = ' ', $padType = 'right',\n $encoding = null) {\n $encoding = $encoding ?: mb_internal_encoding();\n\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new InvalidArgumentException('Pad expects the fourth ' .\n \"argument to be one of 'left', 'right' or 'both'\");\n }\n\n $strLength = mb_strlen($str, $encoding);\n $padStrLength = mb_strlen($padStr, $encoding);\n\n if ($length <= $strLength || $padStrLength <= 0)\n return $str;\n\n // Number of times to repeat the padStr if left or right\n $times = ceil(($length - $strLength) / $padStrLength);\n $paddedStr = '';\n\n if ($padType == 'left') {\n // Repeat the pad, cut it, and prepend\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, $length - $strLength, $encoding);\n $paddedStr = $leftPad . $str;\n } elseif ($padType == 'right') {\n // Append the repeated pad and get a substring of the given length\n $paddedStr = $str . str_repeat($padStr, $times);\n $paddedStr = mb_substr($paddedStr, 0, $length, $encoding);\n } else {\n // Number of times to repeat the padStr on both sides\n $paddingSize = ($length - $strLength) / 2;\n $times = ceil($paddingSize / $padStrLength);\n\n // Favour right padding over left, as with str_pad()\n $rightPad = str_repeat($padStr, $times);\n $rightPad = mb_substr($rightPad, 0, ceil($paddingSize), $encoding);\n\n $leftPad = str_repeat($padStr, $times);\n $leftPad = mb_substr($leftPad, 0, floor($paddingSize), $encoding);\n\n $paddedStr = $leftPad . $str . $rightPad;\n }\n\n return $paddedStr;\n }", "static function padString($string,$length,$padchar=' ',$padtype=STR_PAD_RIGHT) {\n\t\t\treturn str_pad($string,$length,$padchar,$padtype);\n\t\t}", "public function padBoth($length, $padStr = ' ')\n {\n $padding = $length - $this->length();\n\n return $this->applyPadding(floor($padding / 2), ceil($padding / 2),\n $padStr);\n }", "public static function padBoth(string $value, int $length, string $pad = ' '): string\n {\n $short = max(0, $length - mb_strlen($value));\n $shortLeft = floor($short / 2);\n $shortRight = ceil($short / 2);\n\n return mb_substr(str_repeat($pad, $shortLeft), 0, $shortLeft) .\n $value .\n mb_substr(str_repeat($pad, $shortRight), 0, $shortRight);\n }", "public static function mbStrPad($str, $len, $padStr = \" \", $padStyle = STR_PAD_RIGHT, $encoding = \"UTF-8\") {\n\t\treturn str_pad($str, strlen($str) - mb_strlen($str, $encoding) + $len, $padStr, $padStyle);\n\t}", "function mb_str_pad(string $string, int $pad_length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, string $encoding = null): string\n{\n return Strings::pad($string, $pad_length, $pad_string, $pad_type, $encoding);\n}", "function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n{\n if(Unicode::is_ascii($str) and Unicode::is_ascii($pad_str))\n {\n return str_pad($str, $final_str_length, $pad_str, $pad_type);\n }\n\n $str_length = Unicode::strlen($str);\n\n if($final_str_length <= 0 or $final_str_length <= $str_length)\n {\n return $str;\n }\n\n $pad_str_length = Unicode::strlen($pad_str);\n $pad_length = $final_str_length - $str_length;\n\n if($pad_type == STR_PAD_RIGHT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);\n }\n\n if($pad_type == STR_PAD_LEFT)\n {\n $repeat = ceil($pad_length / $pad_str_length);\n return Unicode::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;\n }\n\n if($pad_type == STR_PAD_BOTH)\n {\n $pad_length /= 2;\n $pad_length_left = floor($pad_length);\n $pad_length_right = ceil($pad_length);\n $repeat_left = ceil($pad_length_left / $pad_str_length);\n $repeat_right = ceil($pad_length_right / $pad_str_length);\n $pad_left = Unicode::substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n $pad_right = Unicode::substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n return $pad_left . $str . $pad_right;\n }\n\n trigger_error('Unicode::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n}", "function rightpad($str, $len, $pad = \" \") {\n while (strlen($str) < $len) {\n $str .= $pad;\n }\n return $str;\n}", "function str_pad($input,$pad_length,$pad_string=' ',$pad_type=STR_PAD_RIGHT)\n{\n\treturn '';\n}", "public static function pad($string, $padLen, $padStr = ' ', $padType = STR_PAD_RIGHT)\n\t{\n\t\t$strLength = mb_strlen($string);\n\t\t$padStrLength = mb_strlen($padStr);\n\t\tif (!$strLength && ($padType == STR_PAD_RIGHT || $padType == STR_PAD_LEFT))\n\t\t{\n\t\t\t$strLength = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLength || $padLen <= $strLength)\n\t\t{\n\t\t\treturn $string;\n\t\t}\n\n\t\t$result = null;\n\t\t$repeat = ceil(($padLen - $strLength) / $padStrLength);\n\t\tif ($padType == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$result = $string . str_repeat($padStr, $repeat);\n\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_LEFT)\n\t\t{\n\t\t\t$result = str_repeat($padStr, $repeat) . $string;\n\t\t\t$result = mb_substr($result, -$padLen);\n\t\t}\n\t\telse if ($padType == STR_PAD_BOTH)\n\t\t{\n\t\t\t$length = ($padLen - $strLength) / 2;\n\t\t\t$repeat = ceil($length / $padStrLength);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length))\n\t\t\t\t.$string\n\t\t\t\t.mb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function padRight($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'right', $encoding);\n }", "private function mbStrPad($input, $padLength, $padString, $padStyle, $encoding = \"UTF-8\") {\n \t\treturn str_pad($input, strlen($input) - mb_strlen($input, $encoding) + $padLength, $padString, $padStyle);\n \t}", "public function pad($length, $padStr = ' ', $padType = 'right')\n {\n if (!in_array($padType, array('left', 'right', 'both'))) {\n throw new \\InvalidArgumentException('Pad expects $padType ' .\n \"to be one of 'left', 'right' or 'both'\");\n }\n\n switch ($padType) {\n case 'left':\n return $this->padLeft($length, $padStr);\n case 'right':\n return $this->padRight($length, $padStr);\n default:\n return $this->padBoth($length, $padStr);\n }\n }", "function str_pad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT)\n{\n return '';\n}", "protected function _pad($string = '', $len = 14) {\n\t\treturn str_pad($string, $len);\n\t}", "public static function padEnd($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_RIGHT);\n }", "function mb_str_pad($str, $padLen, $padStr = ' ', $dir = STR_PAD_RIGHT) {\n\t\t// @codingStandardsIgnoreEnd\n\t\t$strLen = mb_strlen($str);\n\t\t$padStrLen = mb_strlen($padStr);\n\t\tif (!$strLen && ($dir == STR_PAD_RIGHT || $dir == STR_PAD_LEFT)) {\n\t\t\t$strLen = 1; // @debug\n\t\t}\n\t\tif (!$padLen || !$padStrLen || $padLen <= $strLen) {\n\t\t\treturn $str;\n\t\t}\n\n\t\t$result = null;\n\t\tif ($dir == STR_PAD_BOTH) {\n\t\t\t$length = ($padLen - $strLen) / 2;\n\t\t\t$repeat = ceil($length / $padStrLen);\n\t\t\t$result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) .\n\t\t\t\t$str .\n\t\t\t\tmb_substr(str_repeat($padStr, $repeat), 0, ceil($length));\n\t\t} else {\n\t\t\t$repeat = ceil($strLen - $padStrLen + $padLen);\n\t\t\tif ($dir == STR_PAD_RIGHT) {\n\t\t\t\t$result = $str . str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr($result, 0, $padLen);\n\t\t\t} elseif ($dir == STR_PAD_LEFT) {\n\t\t\t\t$result = str_repeat($padStr, $repeat);\n\t\t\t\t$result = mb_substr(\n\t\t\t\t\t$result,\n\t\t\t\t\t0,\n\t\t\t\t\t$padLen - (($strLen - $padStrLen) + $padStrLen)\n\t\t\t\t) .\n\t\t\t\t\t$str;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "private static function pad($text, $length, $char = ' ') {\n\t\tassert(TRUE === is_string(base64_encode($text)));\n\t\tassert(TRUE === is_int($length));\n\t\tassert(TRUE === is_string($char));\n\t\t$return = $text;\n\t\tif (mb_strlen($text) < $length) {\n\t\t\t$return = mb_str_pad($text, $length, $char);\n\t\t}\n\t\tif (mb_strlen($text) > $length) {\n\t\t\t$return = mb_substr($text, 0, $length);\n\t\t}\n\t\treturn $return;\n\t}", "function padString($number, $pad_len){\n\t$result=null;\n\tfor($i=0; $i < $pad_len - strlen($number); $i++){\n\t\t$result .= \"0\";\n\t}\n\t$result .= $number;\n\treturn $result;\n}", "public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n\t{\n\t\tif (str::is_ascii($str) AND str::is_ascii($pad_str))\n\t\t{\n\t\t\treturn str_pad($str, $final_str_length, $pad_str, $pad_type);\n\t\t}\n\n\t\t$str_length = mb_strlen($str);\n\n\t\tif ($final_str_length <= 0 OR $final_str_length <= $str_length)\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t$pad_str_length = mb_strlen($pad_str);\n\t\t$pad_length = $final_str_length - $str_length;\n\n\t\tif ($pad_type == STR_PAD_RIGHT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr($str.str_repeat($pad_str, $repeat), 0, $final_str_length);\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_LEFT)\n\t\t{\n\t\t\t$repeat = ceil($pad_length / $pad_str_length);\n\t\t\treturn mb_substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)).$str;\n\t\t}\n\n\t\tif ($pad_type == STR_PAD_BOTH)\n\t\t{\n\t\t\t$pad_length /= 2;\n\t\t\t$pad_length_left = floor($pad_length);\n\t\t\t$pad_length_right = ceil($pad_length);\n\t\t\t$repeat_left = ceil($pad_length_left / $pad_str_length);\n\t\t\t$repeat_right = ceil($pad_length_right / $pad_str_length);\n\n\t\t\t$pad_left = mb_substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left);\n\t\t\t$pad_right = mb_substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_left);\n\t\t\treturn $pad_left.$str.$pad_right;\n\t\t}\n\n\t\ttrigger_error('utf8::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR);\n\t}", "public function padding($length = 1)\n {\n $padding = \"\";\n \n for ($i = 0; $i < $length; $i++) {\n $padding .= \"&nbsp;\";\n }\n \n return $padding;\n }", "protected function strpad($input, $pad_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)\n {\n $input_len = $this->strlen($input);\n if ($pad_length <= $input_len) {\n return $input;\n }\n $pad_str_len = $this->strlen($pad_str);\n $pad_len = $pad_length - $input_len;\n if ($pad_type == STR_PAD_LEFT) {\n $repeat_times = ceil($pad_len / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times);\n return $this->substr($prefix, 0, floor($pad_len)) . $input;\n }\n if ($pad_type == STR_PAD_BOTH) {\n $pad_len /= 2;\n $pad_amount_left = floor($pad_len);\n $pad_amount_right = ceil($pad_len);\n $repeat_times_left = ceil($pad_amount_left / $pad_str_len);\n $repeat_times_right = ceil($pad_amount_right / $pad_str_len);\n $prefix = str_repeat($pad_str, $repeat_times_left);\n $padding_left = $this->substr($prefix, 0, $pad_amount_left);\n $suffix = str_repeat($pad_str, $repeat_times_right);\n $padding_right = $this->substr($suffix, 0, $pad_amount_right);\n return $padding_left . $input . $padding_right;\n }\n // STR_PAD_RIGHT\n $repeat_times = ceil($pad_len / $pad_str_len);\n $input .= str_repeat($pad_str, $repeat_times);\n return $this->substr($input, 0, $pad_length);\n }", "public static function padRight($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn $s . str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen);\n\t}", "public static function padStart($string, $length = 0, $padStr = ' ')\n {\n return str_pad($string, $length, $padStr, STR_PAD_LEFT);\n }", "private function pad($string)\n {\n return $string . $string;\n }", "public static function pad($number, $length, $pad = '0'){\n return str_pad((intval($number) + 1), $length, $pad, STR_PAD_LEFT);;\n }", "public static function padLeft($str, $length, $padStr = ' ', $encoding = null) {\n return self::pad($str, $length, $padStr, 'left', $encoding);\n }", "private static function strpad($value, $length)\n {\n $buf = \"\";\n $padLength = $length - mb_strlen($value);\n\n // Sanity check: $padLength can be sub-zero when incorrect\n // mb_internal_encoding is used.\n if ($padLength > 0) {\n return str_repeat(\" \", $padLength) . $value;\n } else {\n return $value;\n }\n }", "public static function padLeft($s, int $length, string $pad = ' '): string\n\t{\n\t\t$s = (string) $s;\n\t\t$length = max(0, $length - self::strLength($s));\n\t\t$padLen = self::strLength($pad);\n\t\treturn str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen) . $s;\n\t}", "public function padRight($length, $padStr = ' ')\n {\n return $this->applyPadding(0, $length - $this->length(), $padStr);\n }", "private function applyPadding($left = 0, $right = 0, $padStr = ' ')\n {\n $stringy = static::create($this->str, $this->encoding);\n $length = mb_strlen($padStr, $stringy->encoding);\n\n $strLength = $stringy->length();\n $paddedLength = $strLength + $left + $right;\n\n if (!$length || $paddedLength <= $strLength) {\n return $stringy;\n }\n\n $leftPadding = mb_substr(str_repeat($padStr, ceil($left / $length)), 0,\n $left, $stringy->encoding);\n $rightPadding = mb_substr(str_repeat($padStr, ceil($right / $length)),\n 0, $right, $stringy->encoding);\n\n $stringy->str = $leftPadding . $stringy->str . $rightPadding;\n\n return $stringy;\n }", "function zpad($text,$length=2,$c='0')\n{\n\twhile(strlen($text)<$length) $text=$c.$text;\n\treturn $text;\n}", "protected function padMessage(string $message, $length = 80): string\n {\n $currentLen = strlen($this->filterOutTags($message));\n if ($currentLen < $length) {\n $message .= str_repeat(' ', $length - $currentLen);\n }\n\n return $message;\n }", "public static function padRight($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return $value . mb_substr(str_repeat($pad, $short), 0, $short);\n }", "public function setLength($newLength, $padding = ' ')\n\t{\n\t\t$newLength = (int) $newLength;\n\t\t$currentLength = $this->length();\n\n\t\tif ($newLength != $currentLength) {\n\t\t\twhile ($newLength > $this->length()) {\n\t\t\t\t$this->string .= $padding;\n\t\t\t}\n\t\t\tif ($newLength < $this->length()) {\n\t\t\t\t$this->string = mb_substr($this->string, 0, $newLength, $this->encoding);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public static function padLeft($value, $length, $pad = ' ')\n {\n $short = max(0, $length - mb_strlen($value));\n\n return mb_substr(str_repeat($pad, $short), 0, $short) . $value;\n }", "function pad(int $length, string $padContent = ' ', int $type = STR_PAD_RIGHT): Closure\n{\n /**\n * @param string $string The string to pad out.\n * @return string\n */\n return function (string $string) use ($length, $padContent, $type): string {\n return \\str_pad($string, $length, $padContent, $type);\n };\n}", "public static function str_pad($b) {\n $padding = 16 - ((strlen($b) - 1) & 15);\n return $b . str_repeat(\"\\0\", $padding - 1);\n }", "function padr_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s.= str_repeat($c, $m);\r\n return $s;\r\n }", "function padl_length($s, $n, $c = '&nbsp;') {\r\n $m = $n - strlen($s);\r\n if ($m < 0) $s = substr($s, 0, $n);\r\n else $s = str_repeat($c, $m) . $s;\r\n return $s;\r\n }", "public function padBoth($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padBoth($this->_s, $finalWidth, $with), $this->_encoding);\n }", "public function padLeft($length, $padStr = ' ')\n {\n return $this->applyPadding($length - $this->length(), 0, $padStr);\n }", "protected function addpadding($string, $blocksize = 32) {\n $len = strlen($string);\n $pad = $blocksize - ($len % $blocksize);\n $string .= \\str_repeat(chr($pad), $pad);\n return $string;\n }", "function char_pad ( $str )\n\t{\n\t\t$tmpStr = $str;\n\n\t\t$l = strlen( $tmpStr ) * 8; // # of bits from input string\n\n\n\t\t$tmpStr .= \"\\x80\"; // append the \"1\" bit followed by 7 0's\n\n\n\t\t$k = (512 - (($l + 8 + 64) % 512)) / 8; // # of 0 bytes to append\n\t\t$k += 4; // PHP String's will never exceed (2^31)-1, so 1st 32bits of\n\t\t// the 64-bit value representing $l can be all 0's\n\n\n\t\tfor ( $x = 0; $x < $k; $x ++ )\n\t\t\t$tmpStr .= \"\\0\";\n\n\t\t// append the last 32-bits representing the # of bits from input string ($l)\n\t\t$tmpStr .= chr( (($l >> 24) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 16) & 0xFF) );\n\t\t$tmpStr .= chr( (($l >> 8) & 0xFF) );\n\t\t$tmpStr .= chr( ($l & 0xFF) );\n\n\t\treturn $tmpStr;\n\t}", "public static function oneTimePadCreate ($length=100) {\n self::mt_randomize();\n\n $pad = '';\n for ($i = 0; $i < $length; $i++) {\n $pad .= chr(mt_rand(0,255));\n }\n\n return base64_encode($pad);\n }", "public static function hex_lpad($str, $length) {\n while (strlen($str) < $length) {\n $str = \"0\" . $str;\n }\n return $str;\n }", "public function padding(string $padding)\r\n {\r\n return $this->option('padding', $padding);\r\n }", "public function pad($size, $value);", "function padLeft($targetNo, $padLength)\n{\n $res = str_pad($targetNo, $padLength, '0', STR_PAD_LEFT);\n return $res;\n}", "public static function padRight($pInput, $pPadLength, $pPadChar) {\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_RIGHT);\n\t}", "public static function lpad()\n\t{\n\t}", "function padding($id){\n return str_pad($id, 6, 0, STR_PAD_LEFT);\n }", "function pad($data, $shouldbe, $put) {\n\tif (strlen($data) == $shouldbe) {\n\t\treturn $data;\n\t} else {\n\t\t$padding = \"\";\n\t\tfor ($i = strlen($data);$i < $shouldbe;$i++) {\n\t\t\t$padding .= $put;\n\t\t}\n\t\treturn $padding . $data;\n\t}\n}", "public function rightPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_RIGHT);\n }", "public function testPadRightSpecifiedFIller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "public function pad (int $length) : self {\n $currentCount = $this->count();\n\n if ($currentCount >= $length) {\n return $this;\n }\n\n $bits = array_fill(0, $length - $currentCount, 0);\n array_push($bits, ...$this->items);\n\n $this->items = $bits;\n return $this;\n }", "private function padCounter($counter, $padding) :string\n {\n return str_pad($counter, $padding, '0', STR_PAD_LEFT);\n }", "public function padRight($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padRight($this->_s, $finalWidth, $with), $this->_encoding);\n }", "public function padNext($padWidth)\n {\n return $this->padNext2($padWidth, ' ');\n }", "public function testPadRightDefaultFiller(): void\n {\n $paddedString = Str::padRight($this->stringLeft, 4);\n $this->assertSame($this->stringLeft . ' ', $paddedString);\n }", "function writePadded($string, $pad, $fgColor = null, $bgColor = null) {\n\t\treturn $this->write($string . str_repeat(' ', max(0, $pad - strlen($string))), $fgColor, $bgColor);\n\t}", "static public function PackStringWithLength($str){\n $len = strlen($str);\n return pack('n', $len) . $str;\n }", "public static function padLeft($pInput, $pPadLength, $pPadChar)\t{\n\t\treturn str_pad($pInput, $pPadLength, $pPadChar, STR_PAD_LEFT);\n\t}", "public function setPadding($padding);", "private static function padKey($key)\n {\n return strlen($key) < 16 ? str_repeat($key, ceil(16 / strlen($key))) : $key;\n }", "public function addPadding(string $base64String): string\n {\n if (strlen($base64String) % 4 !== 0) {\n return $this->addPadding($base64String . '=');\n }\n\n return $base64String;\n }", "public function leftPad(int $length, string|\\Stringable $character = ' '): self\n {\n return $this->pad($length, $character, \\STR_PAD_LEFT);\n }", "public function testPadLeftDefaultFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4);\n $this->assertSame(' ' . $this->stringLeft, $paddedString);\n }", "protected function tcPad($padThis)\n\t{\n\t\tif(strlen($padThis) < 2){\n\t\t\treturn str_pad($padThis, 2, '0', STR_PAD_LEFT);\n\t\t}else{\n\t\t\treturn $padThis;\n\t\t}\n\t}", "public function pad($length, $value)\n {\n return new static(array_pad($this->items, $length, $value));\n }", "protected function stringWithLength($str){\n $str = strlen(StripSlashes($str)).$str;\n return $str;\n }", "public function align(string $message, int $length = null, int $alignment = self::ALIGN_LEFT): string\n {\n $plainLength = Helper::strlenWithoutDecoration($this->getFormatter(), $message);\n $length = $length + (strlen($message) - $plainLength);\n \n switch ($alignment) {\n case self::ALIGN_CENTER:\n return str_pad($message, $length, ' ', STR_PAD_BOTH);\n \n case self::ALIGN_RIGHT:\n return str_pad($message, $length, ' ', STR_PAD_LEFT);\n \n default:\n case self::ALIGN_LEFT:\n return str_pad($message, $length, ' ', STR_PAD_RIGHT);\n }\n }", "protected function padDigits($number , $padTo)\n\t{\n\t\t$temp = \"\";\n\t $pad = $padTo - strlen($number);\n\n\t\tfor($i = 1; $i <= $pad;$i++){\n\t\t\t$temp .= \"0\";\n\t\t}\n\n\t\treturn $temp.$number;\n\t}", "public function testPadLeftSpecifiedFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4, '0');\n $this->assertSame('0' . $this->stringLeft, $paddedString);\n }", "function\tlpad($subject, $char=\" \", $maxsize=4)\t{\r\n\twhile(strlen($subject)<$maxsize) {\r\n\t\t$subject = $char.$subject;\r\n\t}\r\n\r\n\treturn $subject;\r\n}", "public function padLeft($finalWidth, $with = ' ') {\n if($with instanceof AdvanceStringProcesser) {\n $with = $with->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::padLeft($this->_s, $finalWidth, $with), $this->_encoding);\n }", "public function stdWrap_strPadDataProvider() {}", "protected function addPadding($value)\n\t{\n\t\t$pad = $this->block - (strlen($value) % $this->block);\n\n\t\treturn $value.str_repeat(chr($pad), $pad);\n\t}", "public function generatePassword($length = 8) {\n return new AdvanceStringProcesser(PortableStringProcesser::generatePassword($length, $this->_encoding), $this->_encoding);\n }", "public static function leading_zeros( $length ) {\n\t\t\t$s = '';\n\t\t\twhile ( strlen( $s ) < $length ){\n\t\t\t\t$s = '0' . $s;\n\t\t\t}\n\t\t\treturn $s;\n\t\t}", "function str_limit(string $string, int $length, bool $addDots = false): string {\n\t\tif (strlen($string) > $length)\n\t\t\t$string = substr($string, 0, ($addDots ? $length - 3 : $length)) . ($addDots ? \"...\" : \"\");\n\n\t\treturn $string;\n\t}", "private function _pad($padding)\n {\n $desired_size = $this->_lineSize + $padding - 1;\n $lines = array();\n foreach (file($this->getDatPath()) as $line) {\n $lines[] = str_pad(rtrim($line), $desired_size);\n }\n writeFile($this->getDatPath(), $lines);\n }", "public function limit_string($string, $length, $replacer = '...') {\n\t if (strlen($string) > $length)\n\t $string = mb_substr($string, 0, $length-3) . $replacer;\n\t return $string;\n\t}", "function fit($str, $len, $separator){\n //\n //Get teh length of teh string\n $strlen = strlen($str);\n //\n //Decide whether to truncate teh string or padd id\n if ($strlen>$len){\n //\n //Trim the string by $x characters\n return substr($str, 0, $len);\n }\n //\n else{\n //\n return str_pad($str, $len, $separator, STR_PAD_RIGHT);\n \n }\n }", "public function generateString($length);", "public function paddingCommand()\n {\n $data = [\n 'Eggs' => '$1.99',\n 'Oatmeal' => '$4.99',\n 'Bacon' => '$2.99',\n ];\n\n Show::padding($data, 'padding data show');\n }", "function str_trunc($string, $limit, $break=\" \", $pad=\"...\") {\n $limit -= strlen($pad);\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "function pad_zero($number, $length=6, $in_front=TRUE) {\n $number = (string)$number;\n // jumlah loop yang dilakukan adalah panjang digit - jumlah karakter\n // jadi jika ingin digit 6 dan angka yang disupply adalah 3\n // maka loop = 6 - 1 => 5 buah NOL\n $loop = $length - strlen($number);\n\n // variabel penampung hasil\n $result = '';\n for ($i=0; $i<$loop; $i++) {\n // tambahkan nol\n $result .= '0';\n }\n\n // gabungkan jumlah NOL dengan angka\n if ($in_front === TRUE) {\n $result = $result . $number;\n } else {\n // NOL dibelakang\n $result = $number . $result;\n }\n\n return $result;\n}", "public function setPadType(int $padType): static\n {\n if (!\\in_array($padType, [\\STR_PAD_LEFT, \\STR_PAD_RIGHT, \\STR_PAD_BOTH], true)) {\n throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');\n }\n\n $this->padType = $padType;\n\n return $this;\n }", "protected function _pad($message, $level = 1) {\n\t\t$padding = str_repeat(' ', $level * 4);\n\t\treturn $padding . str_replace(\"\\n\", \"\\n{$padding}\", $message);\n\t}", "public static function generatePassword(int $length = 8): string\n {\n $pass = [];\n $alphabet = 'abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789';\n for ($i = 0; $i <= $length; $i++)\n {\n $n = mt_rand(0, strlen($alphabet) - 1);\n $pass[$i] = $alphabet[$n];\n }\n\n return implode('',$pass);\n }", "protected function encodeLength(int $length, int $offset)\r\n {\r\n if ($length < 56) {\r\n return dechex(strval($length + $offset));\r\n }\r\n $hexLength = $this->intToHex($length);\r\n $firstByte = $this->intToHex($offset + 55 + (strlen($hexLength) / 2));\r\n return $firstByte . $hexLength;\r\n }", "public static function rpad()\n\t{\n\t}", "public function generatePassword(int $length = 8)\n {\n if ($length <= 0)\n throw new DomainException(\"Cannot generate zero-length passwords\");\n\n if (empty($this->characters))\n throw new UnderflowException(\"First add characters used to generate the password\");\n\n $chars = implode('', array_keys($this->characters));\n $max_val = mb_strlen($chars) - 1;\n $pwd = \"\";\n for ($i = 0; $i < $length; ++$i)\n {\n $pos = random_int(0, $max_val);\n $pwd .= mb_substr($chars, $pos, 1);\n }\n return $pwd;\n }", "protected static function encodeLength($length)\n\t{\n\t\tif ($length < 127) {\n\t\t\t$length = chr($length);\n\t\t} else {\n\t\t\t$length = \n\t\t\t\t chr((($length >> 24) & 0xFF) | 0x80)\n\t\t\t\t.chr(($length >> 16) & 0xFF)\n\t\t\t\t.chr(($length >> 8) & 0xFF)\n\t\t\t\t.chr($length & 0xFF);\n\t\t}\t\t\n\t\treturn $length;\t\n\t}", "function shortenString($str, $length)\r\n\t{\r\n\t\treturn substr($str, 0, $length) . (strlen($str) > $length ? \"....\" : \"\");\r\n\t}", "public function generateString(int $length): string;", "protected static function rand_str( int $length = 8 ): string\n {\n return PasswordGenerator::generatePassword( $length, false );\n }", "function zero_pad($number)\n{\n if ($number < 10)\n return \"0$number\";\n\n return \"$number\";\n}" ]
[ "0.82240915", "0.82021546", "0.7939213", "0.7918961", "0.7574173", "0.75696546", "0.7556162", "0.7524386", "0.7480106", "0.7445853", "0.7442283", "0.74379313", "0.7404411", "0.73731786", "0.73688877", "0.73650515", "0.7362734", "0.72763485", "0.725128", "0.7242381", "0.7147092", "0.7117107", "0.7085963", "0.7074263", "0.70472103", "0.7040259", "0.7036558", "0.7024916", "0.6936679", "0.672375", "0.6651811", "0.66496605", "0.6637755", "0.6628474", "0.66128117", "0.65801686", "0.65394485", "0.64520204", "0.6421164", "0.6409091", "0.63840526", "0.6323596", "0.6319204", "0.6298881", "0.62229633", "0.6141268", "0.61317426", "0.6131258", "0.60839903", "0.607924", "0.60727", "0.6055123", "0.60246044", "0.6006883", "0.60052085", "0.5961814", "0.59014654", "0.5888578", "0.587659", "0.58719987", "0.5863191", "0.58209974", "0.5815095", "0.5808581", "0.5766778", "0.57262874", "0.5714238", "0.56759685", "0.5665891", "0.5664122", "0.5625685", "0.5616417", "0.5614443", "0.5612932", "0.55929816", "0.5576", "0.55500805", "0.55425453", "0.5493437", "0.54841006", "0.5468787", "0.5465569", "0.5422321", "0.54163104", "0.5404592", "0.5393096", "0.5384662", "0.5366886", "0.53552085", "0.5350112", "0.53422725", "0.5324397", "0.5278147", "0.5259698", "0.52552676", "0.5246934", "0.5237516", "0.5232579", "0.5227277", "0.5205304" ]
0.86937034
0
Returns true if the string $str ends with $substring, false otherwise. By default, the comparison is casesensitive, but can be made insensitive by setting $caseSensitive to false.
Возвращает true, если строка $str заканчивается на $substring, и false в противном случае. По умолчанию сравнение чувствительно к регистру, но можно сделать его нечувствительным, установив $caseSensitive в false.
public static function endsWith($str, $substring, $caseSensitive = true, $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); $substringLength = mb_strlen($substring, $encoding); $strLength = mb_strlen($str, $encoding); $endOfStr = mb_substr($str, $strLength - $substringLength, $substringLength, $encoding); if (!$caseSensitive) { $substring = mb_strtolower($substring, $encoding); $endOfStr = mb_strtolower($endOfStr, $encoding); } return $substring === $endOfStr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endsWith($substring, $caseSensitive = true)\n {\n $substringLength = mb_strlen($substring, $this->encoding);\n $strLength = $this->length();\n\n $endOfStr = mb_substr($this->str, $strLength - $substringLength,\n $substringLength, $this->encoding);\n\n if (!$caseSensitive) {\n $substring = mb_strtolower($substring, $this->encoding);\n $endOfStr = mb_strtolower($endOfStr, $this->encoding);\n }\n\n return (string) $substring === $endOfStr;\n }", "public static function ends_with($substring, $string)\n {\n // search forward starting from end minus needle length characters\n return\n ($substring === '')\n or (($temp = strlen($string) - strlen($substring)) >= 0\n and strpos($string, $substring, $temp) !== FALSE);\n }", "public static function endsWith($str, $substr)\r\n {\r\n if(is_string($str) && is_string($substr))\r\n {\r\n return $substr == substr($str, strlen($str) - strlen($substr));\r\n }\r\n }", "public static function ends_with( $str, $full_string, $case_sensitive = false ){\n\t\t$offset = strlen( $full_string ) - strlen( $str );\n\t\tif( strlen( $str ) == 0 || strlen( $full_string ) == 0 || $offset >= strlen( $full_string ) ){\n\t\t\treturn false;\n\t\t}\n\t\treturn substr_compare( $full_string, $str, $offset, strlen( $str ), ! $case_sensitive ) === 0;\n\t}", "public static function endsWith($str, $sub)\n {\n return (substr($str, strlen($str) - strlen($sub)) === $sub);\n }", "public static function ends_with(string $string, string $ends_with, bool $case_sensitive = true) : bool\n {\n }", "public function parseEndsWith($string, $substring)\n\t{\n\t\treturn $this->generateEndsWith($string, $substring, true);\n\t}", "public static function endsWith($string, $endString)\n {\n $len = strlen($endString);\n if ($len == 0) {\n return true;\n }\n return (substr($string, -$len) === $endString);\n }", "public static function endsWith($string, $end)\n {\n return substr($string, -strlen($end)) === $end;\n }", "public function endsWith($string, bool $caseInsensitive = false): bool\n {\n if (Assert::validate(['string', __CLASS__], $string) === false) {\n return false;\n }\n\n $value = (string) $string;\n $strLen = mb_strlen($value, $this->encoding);\n $length = $this->length();\n\n if ($strLen > $length) {\n return false;\n }\n\n return substr_compare($this->data, $value, $length - $strLen, $length, $caseInsensitive) === 0;\n }", "public function endsWith($string)\n {\n return substr($this->string, -strlen($string)) == $string;\n }", "private function endswith($string, $suffix)\n {\n $strlen = strlen($string);\n $testlen = strlen($suffix);\n if ($testlen > $strlen) {\n return false;\n }\n\n return substr_compare($string, $suffix, -$testlen) === 0;\n }", "function strEndsWith($string, $end)\n {\n return substr($string, strlen($string) - strlen($end)) == $end;\n }", "protected function _endsWith($string, $requiredSuffix)\n {\n $requiredLength = strlen($requiredSuffix);\n $suffix = substr($string, -$requiredLength, $requiredLength);\n\n return $suffix === $requiredSuffix;\n }", "function ends_with($string, $endString) { \r\n $len = strlen($endString); \r\n if ($len == 0) { \r\n return true; \r\n } \r\n return (substr($string, -$len) === $endString); \r\n}", "public function endsWith($string){\n\t\tif (is_object($string) && $string instanceof Customweb_Core_String) {\n\t\t\t$string = $string->convertTo($this->getCharset());\n\t\t}\n\t\t$pos = $this->getCharset()->getStringPosition($this->string, (string) $string);\n\t\tif ($pos === $this->getLength()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function ends_with($str, $needle)\n\t{\n\t\t$pos = stripos($str, $needle);\n\t\tif( $pos === false ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn ($pos + strlen($needle) == strlen($str));\n\t}", "function EndsWith($FullStr, $EndStr)\r\n\t{\r\n\t\t$StrLen = strlen($EndStr);\r\n\t\t// Look at the end of FullStr for the substring the size of EndStr\r\n\t\t$FullStrEnd = substr($FullStr, strlen($FullStr) - $StrLen);\r\n\t\t// If it matches, it does end with EndStr\r\n\t\t\r\n\t\treturn $FullStrEnd == $EndStr;\r\n }", "public static function endsWith($string, $with, $caseSensitive = true)\n {\n if (!$bytes = static::byteLength($with)) {\n return true;\n }\n if ($caseSensitive) {\n // Warning check, see http://php.net/manual/en/function.substr-compare.php#refsect1-function.substr-compare-returnvalues\n if (static::byteLength($string) < $bytes) {\n return false;\n }\n return substr_compare($string, $with, -$bytes, $bytes) === 0;\n } else {\n return mb_strtolower(mb_substr($string, -$bytes, null, '8bit'), Yii::$app->charset) === mb_strtolower($with, Yii::$app->charset);\n }\n }", "public static function str_has($substring, $string)\n {\n foreach ((array) $substring as $needle)\n if ($needle !== '' && strpos($string, $needle) !== FALSE) {\n return TRUE;\n }\n\n return FALSE;\n }", "protected function generateEndsWith($string, $substring, $bool)\n\t{\n\t\treturn (preg_match('(^(?:\\'[^\\']+\\'|\"[^\"]+\")$)D', $substring))\n\t\t ? $this->generateEndsWithLiteral($string, $substring, $bool)\n\t\t : $this->generateEndsWithExpression($string, $substring, $bool);\n\t}", "protected function generateEndsWithExpression($string, $substring, $bool)\n\t{\n\t\t$operator = ($bool) ? '' : '!';\n\n\t\treturn $operator . \"preg_match('('.preg_quote(\" . $this->recurse($substring) . \").'$)D',\" . $this->recurse($string) . ')';\n\t}", "protected function str_ends_with(string $haystack, string $needle): bool\n {\n $needle_len = strlen($needle);\n $haystack_len = strlen($haystack);\n if ($haystack_len < $needle_len) {\n return false;\n }\n return ($needle_len === 0 || 0 === substr_compare($haystack, $needle, -$needle_len));\n }", "public function parseNotEndsWith($string, $substring)\n\t{\n\t\treturn $this->generateEndsWith($string, $substring, false);\n\t}", "public static function strEndsWith($string, $query) {\n\t\treturn (substr ( $string, - strlen ( $query ) ) === $query);\n\t}", "function ends_with($string, $sub = '', $strict = true)\n{\n if (empty($sub)) {\n throw new Exception('Parameter 2 of ends_with with type string cannot be empty');\n }\n\n if (empty($sub) || strpos($string, $sub) < 0) {\n return false;\n }\n\n $str = substr($string, strlen($string) - strlen($sub));\n if (!$strict) {\n $sub = strtolower($sub);\n $str = strtolower($str);\n }\n return $str === $sub;\n}", "public static function str_endsWith($haystack, $needle, $ci=false)\n {\n $nlen = strlen($needle);\n // have to catch this case since substr('', 0) produces an error\n if (0 == $nlen) {\n return true;\n }\n if ($nlen > strlen($haystack)) {\n return false;\n }\n // substr_compare is broken, so...\n if ($ci) {\n if (0 != strcasecmp(substr($haystack, -1 * $nlen), $needle)) {\n return false;\n }\n } else {\n if (0 != strcmp(substr($haystack, -1 * $nlen), $needle)) {\n return false;\n }\n }\n return true;\n }", "public function endsWith($string)\n\t{\n\t\t$string = static::_convertString($string, $this->encoding);\n\t\treturn $string === $this->substring($this->length() - mb_strlen($string, $this->encoding))->__toString();\n\t}", "public static function endsWith($string, $needle) {\n return $needle === '' || static::substr($string, -static::length($needle)) === $needle;\n }", "public static function stringEndsWith(string $haystack, string $needle): bool\n {\n return \\substr(\n $haystack,\n \\strlen($haystack) - \\strlen($needle),\n \\strlen($needle)\n ) === $needle;\n }", "public static function endsWith($haystack, $needle, $caseInSensitive = false)\n {\n $len = strlen($needle);\n if ($len == 0) {\n return true;\n }\n\n if ((strlen($haystack) < $len)) {\n return false;\n }\n\n if ($caseInSensitive) {\n return strtolower(substr($haystack, -$len)) === strtolower($needle);\n }\n\n return substr($haystack, -$len) === (string) $needle;\n }", "private static function endsWith($haystack, $needle, $case) {\n\t\t$expectedPosition = strlen($haystack) - strlen($needle);\n\n\t\t$ans = false;\n\n\t\tif ($case) {\n\t\t\treturn strrpos($haystack, $needle, 0) === $expectedPosition;\n\t\t} else {\n\t\t\treturn strripos($haystack, $needle, 0) === $expectedPosition;\n\t\t}\n\t}", "function str_endswith($needle, $haystack)\r\n{\r\n return strrpos($haystack, $needle) === strlen($haystack)-strlen($needle);\r\n}", "public static function endsWith( string $haystack, string $needle, ?bool $caseSsensitive = true ) : bool\n {\n if ( ! $caseSsensitive ) {\n $haystack = strtolower( $haystack );\n $needle = strtolower( $needle );\n }\n\n return ( substr( $haystack, -strlen( $needle ) ) === $needle );\n }", "public static function endsWith($haystack, $needle, $case = true) {\n\t\tif ($case) {\n\t\t\treturn (strcmp(substr($haystack, strlen($haystack) - strlen($needle)), $needle) === 0);\n\t\t}\n\t\treturn (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)), $needle) === 0);\n\t}", "public static function endsWith(string $haystack, string $needle, bool $caseSensitive = true, $encoding = 'UTF-8'): bool\n {\n $length = mb_strlen($needle, $encoding);\n\n // always return true if needle is empty\n if (0 === $length) {\n return true;\n }\n\n if (false === $caseSensitive) {\n return 0 === strcasecmp(mb_substr($haystack, -$length, null, $encoding), $needle);\n }\n\n return 0 === strcmp(mb_substr($haystack, -$length, null, $encoding), $needle);\n }", "public static function endsWith($haystack, $needle, $caseInsensitive = false) {\n\t\t// if doing case-insensitive\n\t\tif ($caseInsensitive){\n\t\t\treturn (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)), $needle) === 0);\n\t\t}\n\t\treturn (strcmp(substr($haystack, strlen($haystack) - strlen($needle)), $needle) === 0);\n\t}", "function str_endswith($haystack, $needle, $match_case = true) {\n\treturn $match_case\n\t\t? 0 === strcmp($needle, substr($haystack, -strlen($needle)))\n\t\t: 0 === strcasecmp($needle, substr($haystack, -strlen($needle)));\n}", "static function endsWith($haystack, $needle, $case=true) {\n if($case){ return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0); }\n return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0);\n }", "public static function endsWith($haystack, $needle) {\n\t\t\treturn (strrpos($haystack, $needle) === (strlen($haystack) - strlen($needle)));\n\t\t}", "function str_ends_with(string $haystack, string $needle): bool {\n\t\t$length = strlen($needle);\n\n\t\treturn $length === 0 || substr($haystack, -$length) === $needle;\n\t}", "function endWith($str, $ending)\n{\n $length = strlen($ending);\n $start = $length * -1;\n return (substr($str, $start) === $ending);\n}", "function stringEndsWith($whole, $end)\n{\n return (strpos($whole, $end, strlen($whole) - strlen($end)) !== false);\n}", "function zuhaus_mikado_string_ends_with( $haystack, $needle ) {\n\t\tif ( $haystack !== '' && $needle !== '' ) {\n\t\t\treturn ( substr( $haystack, - strlen( $needle ), strlen( $needle ) ) == $needle );\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private static function containsType(string $substring, string $string): bool\n {\n foreach (explode(' ', $substring) as $char) {\n if (empty($char)) {\n continue;\n }\n if (str_contains($string, $char)) {\n return true;\n }\n }\n\n return false;\n }", "protected function generateEndsWithLiteral($string, $substring, $bool)\n\t{\n\t\t$operator = ($bool) ? '===' : '!==';\n\n\t\treturn '(substr(' . $this->recurse($string) . ',-' . (strlen($substring) - 2) . ')' . $operator . $this->recurse($substring) . ')';\n\t}", "public static function endsWith($haystack, $needle, $match_case = true) {\n\t\treturn $match_case\n\t\t\t? 0 === strcmp($needle, substr($haystack, -strlen($needle)))\n\t\t\t: 0 === strcasecmp($needle, substr($haystack, -strlen($needle)));\n\t}", "protected function _pathEndsWith(\r\n $path,\r\n $string)\r\n {\r\n $length = strlen($string);\r\n\r\n return substr_compare($path, $string, strlen($path) - $length, $length) === 0;\r\n }", "function affinity_mikado_string_ends_with($haystack, $needle) {\n\t\tif ($haystack !== '' && $needle !== '') {\n\t\t\treturn (substr($haystack, -strlen($needle), strlen($needle)) == $needle);\n\t\t}\n\n\t\treturn true;\n\t}", "public static function strEndsWith(string $haystack, string $needle): bool\n {\n return $needle !== '' &&\n substr($haystack, -strlen($needle)) === (string) $needle;\n }", "public function endsWith($string, $caseSensitive = false) {\n if($string instanceof AdvanceStringProcesser) {\n $string = $string->get();\n }\n return PortableStringProcesser::endsWith($this->_s, $string, $caseSensitive, $this->_encoding);\n }", "public static function endsWith(string $haystack, string $needle): bool {\n\t\treturn (substr($haystack, -strlen($needle)) === $needle);\n\t}", "public static function endsWith(string $haystack, string $needle){\n $length = mb_strlen($needle);\n if (!$length) return true;\n return mb_substr($haystack, -$length) == $needle;\n }", "public static function endsWith(string $haystack, string $needle) : bool\n {\n if (!strlen($needle)) return true;\n return substr($haystack, -strlen($needle)) === $needle;\n }", "function substrEq($str, $sub) {\n return substr($str, 0, strlen($sub)) == $sub;\n}", "function stringEndsWith($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if (substr($haystack, -strlen($needle)) === (string)$needle) {\n return true;\n }\n }\n return false;\n }", "public static function endsWith($haystack, $needle) {\n if ($needle === '') {\n return true;\n }\n $diff = \\strlen($haystack) - \\strlen($needle);\n return $diff >= 0 && strpos($haystack, $needle, $diff) !== false;\n }", "function stringEndsWith($haystack, $needle)\n {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }", "public static function ends_with($needle, $haystack)\n {\n return substr($haystack, -strlen($needle)) == $needle;\n }", "public static function endsWith($haystack, $needle)\n\t\t{\n\t\t\t// http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions\n\t\t\treturn substr($haystack, -strlen($needle)) == $needle;\n\t\t}", "public static function endsWith($needle, $haystack)\n {\n $len = strlen($needle);\n\n return ($len > strlen($haystack)) ? false :\n (substr($haystack, -$len) === $needle);\n }", "function endsWith($stringToCheck, $checkAgainst) {\n $length = strlen($checkAgainst);\n if ($length == 0) {\n return true;\n }\n return (substr($stringToCheck, -$length) === $checkAgainst);\n}", "public function endsWith($endsWith, $caseSensitive = false);", "function endsWith($haystack, $needle){\r\n $length = strlen($needle);\r\n if ($length == 0) {\r\n return true;\r\n }\r\n return (substr($haystack, -$length) === $needle);\r\n}", "public static function isLastPartOfStr($haystack, $needle)\n {\n return Tx_Rnbase_Utility_Strings::isLastPartOfStr($haystack, $needle);\n }", "function endsWith($haystack, $needle)\r\n{\r\n $length = strlen($needle);\r\n if ($length == 0)\r\n {\r\n return true;\r\n }\r\n return (substr($haystack, -$length) === $needle);\r\n}", "protected function _isPathEndsWith(\n $string)\n {\n $length = strlen($string);\n\n return substr_compare($this->path, $string, strlen($this->path) - $length, $length) === 0;\n }", "protected function endsWith( $haystack, $needle ) {\n if (strlen( $haystack ) < strlen( $needle )) {\n return false;\n }\n return (substr( $haystack, strlen($haystack)-strlen($needle), strlen($needle) ) == $needle);\n}", "public static function endsWith($haystack, $needle) {\n $length = strlen($needle);\n if ($length == 0) {\n return true;\n }\n\n return (substr(strtolower($haystack), -$length) === strtolower($needle));\n }", "public function testEndsWith()\r\n {\r\n self::assertTrue(Str::endsWith('jason', 'on'));\r\n self::assertTrue(Str::endsWith('jason', 'jason'));\r\n self::assertTrue(Str::endsWith('jason', ['on']));\r\n self::assertTrue(Str::endsWith('jason', ['no', 'on']));\r\n self::assertFalse(Str::endsWith('jason', 'no'));\r\n self::assertFalse(Str::endsWith('jason', ['no']));\r\n self::assertFalse(Str::endsWith('jason', ''));\r\n self::assertFalse(Str::endsWith('7', ' 7'));\r\n }", "function str_ends_with($haystack, $needles)\n {\n foreach ((array) $needles as $needle) {\n if (substr($haystack, -strlen($needle)) === (string) $needle) {\n return true;\n }\n }\n\n return false;\n }", "public static function ends_with( $haystack, $needle ) {\n\t\t$length = strlen( $needle );\n\t\tif ( 0 == $length ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn ( substr( $haystack, - $length ) == $needle );\n\t}", "public static function endsWith($haystack, $needle) {\n\t\treturn strlen($needle) === 0 || substr($haystack, -strlen($needle)) === $needle;\n\t}", "function endsWith($haystack, $needle)\n{\n $length = strlen($needle);\n if ($length == 0) {\n return true;\n }\n return (substr($haystack, -$length) === $needle);\n}", "function filename_ends_with($aSearchString, $aString)\n{\n if(substr($aString, strlen($aString) - strlen($aSearchString), strlen($aSearchString)) == $aSearchString)\n \n return true;\n else\n return false;\n}", "function contains($substring, $string) {\r\n $pos = strpos($string, $substring);\r\n \r\n if($pos === false) {\r\n // string needle NOT found in haystack\r\n return false;\r\n }\r\n else {\r\n // string needle found in haystack\r\n return true;\r\n }\r\n \r\n}", "function endsWith($haystack, $needle)\n{\n $length = strlen($needle);\n if ($length == 0) {\n return true;\n }\n\n return (substr($haystack, -$length) === $needle);\n}", "function ends_with(string $haystack, $needles): bool\n {\n foreach ((array) $needles as $needle) {\n if (substr($haystack, -strlen($needle)) === (string) $needle) {\n return true;\n }\n }\n return false;\n }", "function endsWith($haystack, $needle)\n{\n $length = strlen($needle);\n if ($length == 0)\n {\n return true;\n }\n\n return (substr($haystack, -$length) === $needle);\n}", "public static function endsWith($haystack, $needle)\n {\n if (strlen($haystack) < strlen($needle)) {\n return false;\n }\n $end = substr($haystack, strlen($haystack) - strlen($needle), strlen($needle));\n\n return $needle === \"\" || $needle === $end;\n }", "public static function ends($string, $look){\n\t\t$Fn = self::$Fn;\n\t\t\n\t\treturn $Fn['strrpos']($string, $look)===$Fn['strlen']($string)-$Fn['strlen']($look);\n\t}", "function endsWith($haystack, $needle)\r\n {\r\n $length = mb_strlen($needle);\r\n $start = $length * -1; //negative\r\n return (substr($haystack, $start) === $needle);\r\n }", "function str_has_suffix(string $string, string|array $search, bool $icase = false): bool\n{\n if (is_array($search)) {\n foreach ($search as $search) {\n if (str_has_suffix($string, (string) $search, $icase)) {\n return true;\n }\n }\n return false;\n }\n\n return !$icase ? str_ends_with($string, $search) : (\n mb_strripos($string, $search) === mb_strlen($string) - mb_strlen($search)\n );\n}", "public static function endsWith($haystack, $needle) {\n\t return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}", "public function endsWith(string|\\Stringable $value): bool\n {\n $value = (string) $value;\n\n if ($value === '') {\n return true;\n }\n\n $length = self::of($value, $this->encoding)->length();\n\n return $this->takeEnd($length)->toString() === $value;\n }", "public static function ends_with($haystack, $needle)\n\t{\n\t\t$end_len = strlen($needle);\n\t\t\n\t\tif (strlen($haystack) < $end_len) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$bit = substr($haystack, -$end_len);\n\t\t\n\t\treturn $bit == $needle;\n\t}", "public static function ends_with( $haystack, $needle ) {\r\n\t\t// Search forward starting from end minus needle length characters.\r\n\t\treturn '' === $needle || ( strlen( $haystack ) - strlen( $needle ) === strrpos( $haystack, $needle ) );\r\n\t}", "public static function endsWith($haystack, $needle){\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}", "protected function isInStr($str, $substr)\n {\n $result = strpos($str, $substr);\n if ($result === FALSE)\n return FALSE;\n else\n return TRUE; \n }", "protected function toEndsWith(string $haystack, string $needle, bool $ignoreCase = true): bool\n {\n }", "function endsWith($string, $toCheck) {\n // search forward starting from end minus needle length characters\n return $toCheck === \"\" || strpos($string, $toCheck, strlen($string) - strlen($toCheck)) !== FALSE;\n}", "public static function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }", "function str_cut_end(\n string $str,\n string $subString = ' ',\n bool $repeat = false,\n bool $caseSensitive = false\n ) : string {\n return Str::cutEnd($str, $subString, $repeat, $caseSensitive);\n }", "function fluid_edge_string_ends_with($haystack, $needle) {\n\t\tif($haystack !== '' && $needle !== '') {\n\t\t\treturn (substr($haystack, -strlen($needle), strlen($needle)) == $needle);\n\t\t}\n\n\t\treturn true;\n\t}", "public static function endsWith($haystack, $needle)\n {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }", "public static function ends_with( $haystack, $needle ) {\n\t\t// Search forward starting from end minus needle length characters.\n\t\treturn '' === $needle || ( strlen( $haystack ) - strlen( $needle ) === strrpos( $haystack, $needle ) );\n\t}", "public static function endsWith($haystack, $needle)\n {\n return $needle === \"\" || substr($haystack, -strlen($needle)) === $needle;\n }", "public static function endsWith($haystack, $needle)\n {\n $length = strlen($needle);\n return $length === 0 ||\n (substr($haystack, -$length) === $needle);\n }", "public static function endsWith($haystack, $needle)\n {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }", "function endsWith($haystack, $needle) {\n return $needle === \"\" || substr($haystack, -strlen($needle)) === $needle;\n}" ]
[ "0.830508", "0.82784754", "0.7988899", "0.7629886", "0.7530768", "0.7261843", "0.72603595", "0.7257167", "0.72559184", "0.72484016", "0.719612", "0.71692127", "0.7163501", "0.71370494", "0.7053888", "0.70214045", "0.70092046", "0.6906134", "0.6868683", "0.68281364", "0.68243146", "0.6804521", "0.67905635", "0.6769067", "0.675526", "0.6736055", "0.67006564", "0.66763866", "0.6660857", "0.6645397", "0.6642862", "0.663062", "0.66293776", "0.662118", "0.6607793", "0.660256", "0.66004", "0.6585831", "0.65787077", "0.65755326", "0.6565541", "0.65592366", "0.6556792", "0.65532625", "0.6552452", "0.651226", "0.64760154", "0.6447085", "0.6444057", "0.64311016", "0.6425843", "0.6418886", "0.64037585", "0.63908345", "0.63897985", "0.63778543", "0.63777584", "0.63744915", "0.63614297", "0.6356997", "0.63483775", "0.6335784", "0.6286676", "0.62560093", "0.6245787", "0.6245073", "0.62385345", "0.62362623", "0.62359405", "0.62356913", "0.6234722", "0.6233588", "0.62290454", "0.6224298", "0.62152565", "0.621522", "0.6214822", "0.6205013", "0.6197779", "0.619613", "0.6194353", "0.6189101", "0.61871696", "0.61854696", "0.61853486", "0.61758006", "0.6175606", "0.617135", "0.6167451", "0.6165027", "0.61631393", "0.6158119", "0.61564213", "0.6154695", "0.6140299", "0.61321044", "0.61286616", "0.6127659", "0.6126901", "0.6124927" ]
0.8430294
0
Converts each tab in a string to some number of spaces, as defined by $tabLength. By default, each tab is converted to 4 consecutive spaces.
Преобразует каждый таб в строке в некоторое количество пробелов, определяемое $tabLength. По умолчанию каждый таб преобразуется в 4 последовательных пробела.
public static function toSpaces($str, $tabLength = 4) { $spaces = str_repeat(' ', $tabLength); return str_replace("\t", $spaces, $str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toSpaces($tabLength = 4)\n {\n return $this->newSelf\n (\n UTF8::str_replace\n (\n \"\\t\",\n UTF8::str_repeat(' ', $tabLength),\n $this->scalarString\n )\n );\n }", "public function toSpaces($tabLength = 4)\n {\n $spaces = str_repeat(' ', $tabLength);\n $str = str_replace(\"\\t\", $spaces, $this->str);\n\n return static::create($str, $this->encoding);\n }", "public static function toTabs($str, $tabLength = 4) {\n $spaces = str_repeat(' ', $tabLength);\n\n return str_replace($spaces, \"\\t\", $str);\n }", "public function toTabs($tabLength = 4)\n {\n return $this->newSelf\n (\n UTF8::str_replace\n (\n UTF8::str_repeat(' ', $tabLength),\n \"\\t\",\n $this->scalarString\n )\n );\n }", "public function toTabs($tabLength = 4)\n {\n $spaces = str_repeat(' ', $tabLength);\n $str = str_replace($spaces, \"\\t\", $this->str);\n\n return static::create($str, $this->encoding);\n }", "public function makeTab(): string\n {\n $sumSpacesInTab = $this->blockWidth /2;\n return work::accumulate(' ', $sumSpacesInTab);\n }", "private function getTabs($tabs)\n {\n $tab_size = '4';\n $ret = '';\n\n if ($tabs === 0) {\n return $ret; \n }\n\n foreach (range(1, $tabs) as $i) {\n $ret .= join('', array_fill(0, 4, ' '));\n }\n\n return $ret;\n }", "public function detab($text)\n {\n return str_replace(\"\\t\", str_repeat(' ', $this->tab_width), $text);\n }", "public function spaces();", "function mapTabToStart($value)\n{\n return \"\\t$value\";\n}", "static public function spaces( $aCount=1 )\n\t{ return self::repeat( ' ', $aCount ) ; }", "function addSpace($numberOfSpaces)\n{\n for ($i = 1; $i <= $numberOfSpaces; $i++) {\n echo '&nbsp;';\n }\n}", "public function getTabs($number)\n {\n $str = \"\";\n for ($i = 0; $i < $number; $i++) {\n $str .= \" \";\n }\n return $str;\n }", "protected function indent($string, $tab = \"\\t\")\n {\n $array = preg_split(\"/\\r\\n|\\n|\\r/\", trim($string));\n $first = $tab.trim(array_shift($array));\n if (empty($array)) {\n return $first; // ie. no indentation at all\n }\n $spaces = array();\n foreach ($array as $value) {\n $spaces[] = strspn($value, \" \\t\");\n }\n $spaces = min($spaces);\n foreach ($array as $key => $value) {\n $array[$key] = $tab.substr($value, $spaces);\n }\n array_unshift($array, $first);\n\n return implode(\"\\n\", $array);\n }", "static function simple_spaces($str){\n\t\treturn str_replace(\"\\n \", \"\\n\", preg_replace(\"/ +/mi\", \" \", str_replace(\"\\t\", \" \", $str)));\n\t}", "public function tab()\r\n {\r\n $this->pattern[] = \"\\t\";\r\n\r\n return $this;\r\n }", "function formatTab($tab) {\n\t$tab = mb_strtolower($tab);\n\t$initial = array(\"é\", \"è\", \"à\", \"ê\", \"ë\", \" \", \"É\", \"Ê\", \"È\", \"Ë\", \"À\",\"&\");\n\t$remplacer = array(\"e\", \"e\", \"a\", \"e\", \"e\", \"_\", \"e\", \"e\", \"e\", \"e\", \"a\",\"e\");\n\t$tab = str_replace($initial, $remplacer, $tab);\n\n\treturn $tab;\n}", "function fix_indentation($s)\n{\n // Replace tabs by spaces\n $s = str_replace(\"\\t\", \" \", $s);\n $lines = explode(\"\\n\", $s);\n $num_spaces = 100000; // \"MAX_INT\"\n $out = \"\";\n // We skip the first and last line\n for ($i = 1; $i < count($lines) - 1; $i++)\n {\n $line = $lines[$i];\n if (trim($line) === \"\")\n \tcontinue; // Ignore empty lines in calculation\n $sp = strlen($line) - strlen(ltrim($line));\n $num_spaces = min($num_spaces, $sp);\n }\n for ($i = 1; $i < count($lines) - 1; $i++)\n {\n $line = $lines[$i];\n $out .= substr($line, $num_spaces).\"\\n\";\n }\n return $out;\n}", "public static function space($n = 1)\n\t{\n\t\treturn str_repeat(\"&nbsp;\", $n);\n\t}", "function trimUltime($str)\n{\n\t$str = str_replace('\\t', \" \", $str);\n\t$str = trim(preg_replace('/([ \\t]+)|(\\\\t+)/', \" \", $str));\t\n\treturn $str;\n}", "function chuanhoaxau($str)\n{\n $len=strlen($str); \n $str=trim($str);\n\tif($len>0)\n\t{\n\t\t$str=ltrim($str);\n\t\t$str=rtrim($str);\t\t\n\t\tfor($c=1;$c<$len;$c++)\n\t\t{\n\t\t\t$str=str_replace(\" \",\" \",$str);\t\t\n\t\t}\n\treturn $str;\n\t}\n}", "protected function tabulate($number) {\n if (!$this->debug) {\n return '';\n }\n $return = '';\n \n for ($i = 0; $i < $number; $i++) {\n $return .= \"\\t\";\n }\n \n return $return;\n }", "function smarty_modifier_formatTab($string) {\n\t$string = mb_strtolower($string);\n\t$initial = array(\"é\", \"è\", \"à\", \"ê\", \"ë\", \" \", \"É\", \"Ê\", \"È\", \"Ë\", \"À\",\"&\");\n\t$remplacer = array(\"e\", \"e\", \"a\", \"e\", \"e\", \"_\", \"e\", \"e\", \"e\", \"e\", \"a\",\"e\");\n\t$string = str_replace($initial, $remplacer, $string);\n\n\treturn $string;\n}", "public function increaseTabOnString(string $text, int $tabAmount = 1, bool $skipFirst = false): string {\n\t\t$indent = str_repeat(' ', $tabAmount);\n\t\t$exploded = explode(\"\\n\", $text);\n\t\t$isFirst = true;\n\t\tforeach ($exploded as $key => $item) {\n\t\t\tif ($isFirst === true && $skipFirst === true) {\n\t\t\t\t$isFirst = false;\n\t\t\t} else {\n\t\t\t\t$exploded[$key] = $indent . $item;\n\t\t\t}\n\n\t\t}\n\n\t\treturn implode(\"\\n\", $exploded);\n\t}", "function ReformatToLeft($s, $i)\n{\n\n $Delimited = \"\";\n if (func_num_args() > 2) {\n $Delimited = func_get_arg(2);\n }\n\n\n if ($Delimited == \"\") {\n $s = (strlen($s) <= $i) ? $s : substr($s, 0, $i) . \"...\";\n $s = str_replace(\" \", \"&nbsp;\", htmlspecialchars($s));\n } else {\n $s = str_replace(\" \", \"&nbsp;\", htmlspecialchars(chunk_split($s, $i, \"\\n\")));\n $s = preg_replace(\"/\\n/ms\", \"$Delimited\", $s);\n $s = preg_replace(\"/$Delimited$/\", \"\", $s);\n }\n return $s;\n}", "public function detab(ElementLiteral $text, array $options = array())\n {\n /** @noinspection PhpUnusedParameterInspection */\n $text->replace('/(.*?)\\t/', function (ElementLiteral $whole, ElementLiteral $string) use ($options) {\n return $string . str_repeat(' ', $options['tabWidth'] - $string->getLength() % $options['tabWidth']);\n });\n }", "function tabScript($theLines,$tabSize) {\n\t$cnt1 = 0;\n\t$quoting = false;\n\twhile ($cnt1 < count($theLines)) {\n\t\t$theLine = $theLines[$cnt1];\n\t\t$cnt2 = 0;\n\t\twhile ($cnt2 < strlen($theLine)) {\n\t\t\t$char = $theLine[$cnt2];\n\t\t\tif ($char == '\"' || $char == \"'\" || $quoting) {\n\t\t\t\tif (!$quoting) {\n\t\t\t\t\t$quote = $char;\n\t\t\t\t\t$quoting = true;\n\t\t\t\t\t$cnt2++;\n\t\t\t\t}\n\t\t\t\tdo {\n\t\t\t\t\tif (($theLine[$cnt2 - 1] != '\\\\') && ($theLine[$cnt2] == $quote)) {\n\t\t\t\t\t\t$quoting = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} while ($cnt2++ < strlen($theLine));\n\t\t\t} else {\n\t\t\t\tif ($char == '{' && strlen($theLine) == 1) {\n\t\t\t\t\t$theLines[$cnt1 - 1] = $theLines[$cnt1 - 1] . \" \" . $theLines[$cnt1];\n\t\t\t\t\tunset($theLines[$cnt1]);\n\t\t\t\t\t$theLines = array_values($theLines);\n\t\t\t\t\t$cnt1--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (($char == ';') && $cnt2 < strlen($theLine) - 1) {\n\t\t\t\t\t$theLines[$cnt1] = trim(substr($theLine, 0, $cnt2+1));\n\t\t\t\t\tarray_splice($theLines, $cnt1+1, 0, trim(substr($theLine, $cnt2+1)));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cnt2++;\n\t\t}\n\t\t$cnt1++;\n\t}\n\t//Pass 2: Output lines with tabs.\n\tforeach ($theLines as $theLine) {\n \tif (substr($theLine,0,1) == \"}\" || substr($theLine,-1) == \"}\") $tabSize--;\n \ttabLine($theLine, $tabSize);\n \tif (substr($theLine,0,1) == \"{\" || substr($theLine,-1) == \"{\") $tabSize++;\n\t}\n}", "function _indent($width = 2)\n{\n return str_repeat(' ', $width);\n}", "function replaceDBlSpace($str='') {\r\n\t\tif(trim($str) == '')\r\n\t\t\treturn;\r\n\t\t\r\n\t\twhile ($pos = strpos($str,\" \")) {\r\n\t\t\t$str = str_replace(\" \",\" \",$str);\r\n\t\t}\r\n\r\n\t\treturn $str;\r\n\t}", "private function outputTabs()\n {\n if ($this->tabsPending) {\n $this->_write(str_repeat($this->tabString, $this->indentLevel));\n $this->tabsPending = false;\n }\n }", "public static function spaces($number)\n\t{\n\t\tstatic $spacestring = ' ';\n\t\t$number <<= 1;\n\t\twhile ($number > strlen($spacestring)) {\n\t\t\t$spacestring .= $spacestring;\n\t\t}\n\n\t\treturn substr($spacestring, 0, max(0, $number));\n\t}", "function trimspaces($str) {\r\r\t\t\r\r\t\t$str = trim($str);\r\r\t\t$str = str_replace(' ','',$str);\r\r\t\t$str = str_replace(\"\\n\",'',$str);\r\r\t\t$str = str_replace(\"\\t\",'',$str);\r\r\t\t$str = str_replace(\"\\r\",'',$str);\r\r\t\t$str = str_replace(\"\\0\",'',$str);\r\r\t\t$str = str_replace(\"\\x0B\",'',$str);\r\r\t\treturn $str;\r\r\t\r\r\t}", "private function reduce_spaces( $str ) {\r\n\t\t\r\n\t\t\t$str = preg_replace(\"/ {2,}/\", ' ', $str );\r\n\t\t\t$str = trim( $str );\r\n\t\t\t\r\n\t\t\treturn( $str );\r\n\t\t}", "public static function spacelessText(string $s): string\n\t{\n\t\treturn preg_replace('#[ \\t\\r\\n]+#', ' ', $s);\n\t}", "function my_inputformat($str, $space)\n{\n if ($space == 1)\n return strtolower(trim(preg_replace(\"/\\s+/\", \" \", $str)));\n else\n return strtolower(trim(preg_replace(\"/\\s+/\", \"\", $str)));\n}", "public function padding($length = 1)\n {\n $padding = \"\";\n \n for ($i = 0; $i < $length; $i++) {\n $padding .= \"&nbsp;\";\n }\n \n return $padding;\n }", "public function verticalTab()\r\n {\r\n $this->pattern[] = \"\\v\";\r\n\r\n return $this;\r\n }", "function replaceWhitespace($str)\n{\n $result = $str;\n foreach (array(\n \" \", \" \\t\", \" \\r\", \" \\n\",\n \"\\t\\t\", \"\\t \", \"\\t\\r\", \"\\t\\n\",\n \"\\r\\r\", \"\\r \", \"\\r\\t\", \"\\r\\n\",\n \"\\n\\n\", \"\\n \", \"\\n\\t\", \"\\n\\r\",\n ) as $replacement) {\n $result = str_replace($replacement, $replacement[0], $result);\n }\n return $str !== $result ? replaceWhitespace($result) : $result;\n}", "private function addTabsToArray()\n\t{\n\t\tfor ($l = 1; $l <= $this->arrayLevelsDeep; $l++)\n\t\t\t$this->data .= \"\\t\";\n\t}", "public function indent($tabs = 1)\n {\n $this->indention += $tabs;\n }", "public static function formatStringBreakPoints($value, $length)\n\t\t{\n\t\t\t$parts = explode(\" \", $value);\n\t\t\t\n\t\t\t$string = \"\";\n\t\t\t$wordCount = 0;\n\t\t\t\n\t\t\tforeach($parts as $part)\n\t\t\t{\n\t\t\t\tif (strlen($part) > $length && $wordCount > 0)\n\t\t\t\t\t$string .= \"<br>\" .$part .\" \";\n\t\t\t\telse\n\t\t\t\t\t$string .= $part .\" \";\n\t\t\t\t\n\t\t\t\t$wordCount++;\n\t\t\t}\n\t\t\t\n\t\t\treturn (empty($string)) ? $value : $string;\n\t\t}", "protected function countTabs($line){\n $count = strspn($line, \"\\t\");\n return $count;\n }", "function replaceWhitespace($str) {\n $result = $str;\n foreach (array(\n \" \", \" \\t\", \" \\r\", \" \\n\",\n \"\\t\\t\", \"\\t \", \"\\t\\r\", \"\\t\\n\",\n \"\\r\\r\", \"\\r \", \"\\r\\t\", \"\\r\\n\",\n \"\\n\\n\", \"\\n \", \"\\n\\t\", \"\\n\\r\",\n ) as $replacement) {\n $result = str_replace($replacement, $replacement[0], $result);\n }\n return $str !== $result ? replaceWhitespace($result) : $result;\n}", "protected function removeTabs($text)\n\t{\n\t\treturn str_replace(\"\\t\", \"\", $text);\n\t}", "function fSpace($string)\n{\n\treturn str_replace(\" \", \"_\", $string);\n}", "function canonicalize_whitespace($s)\n{\n return preg_replace('/[ \\t\\n\\r\\0\\x0B]+/', ' ', trim($s));\n}", "public static function indent($string, $spaces=4)\n {\n $spaces = str_repeat(' ', $spaces);\n $newLines = array();\n $lines = explode(\"\\n\", $string);\n foreach ($lines as $line) {\n $newLines[] = $spaces.$line;\n }\n\n $implodedLines = implode(\"\\n\", $newLines);\n return $implodedLines;\n\n }", "static public function verticalTab10()\n\t{\n\t\t$html = \"\n<div class=\\\"vspace10\\\"></div>\";\n\t\treturn $html;\n\t}", "public function outdent($tabs = 1)\n {\n $this->indention -= $tabs;\n if ($this->indention < 0) {\n $this->indention = 0;\n }\n }", "private function _indent($times=1)\n\t{\n\t\t$indent = \"\\t\";\n\t\t$out = '';\n\t\tfor ($i=$times; $i>0; $i--)\n\t\t{\n\t\t\t$out .= $indent;\n\t\t}\n\t\treturn $out;\n\t}", "function space_collapse($parsedHTMLtoken) {\r\n\t\tif(!isset($this->settings[\"spaceCollapse\"]) || !$this->settings[\"spaceCollapse\"]) return $parsedHTMLtoken;\r\n\r\n\r\n\t\t# find the HTML character representation for the following characters:\r\n\t\t#\t\ttab | line feed | carriage return | space | non-breaking space | ethiopic wordspace\r\n\t\t#\t\togham space mark | en quad space | em quad space | en-space | three-per-em space\r\n\t\t#\t\tfour-per-em space | six-per-em space | figure space | punctuation space | em-space\r\n\t\t#\t\tthin space | hair space | narrow no-break space\r\n\t\t#\t\tmedium mathematical space | ideographic space\r\n\t\t# Some characters are used inside words, we will not count these as a space for the purpose\r\n\t\t# of finding word boundaries:\r\n\t\t#\t\tzero-width-space (\"&#8203;\", \"&#x200b;\")\r\n\t\t#\t\tzero-width-joiner (\"&#8204;\", \"&#x200c;\", \"&zwj;\")\r\n\t\t#\t\tzero-width-non-joiner (\"&#8205;\", \"&#x200d;\", \"&zwnj;\")\r\n\r\n\t\t$htmlSpaces = '\r\n\t\t\t\\x{00a0}\t\t# no-break space\r\n\t\t\t|\r\n\t\t\t\\x{1361}\t\t# ethiopic wordspace\r\n\t\t\t|\r\n\t\t\t\\x{2000}\t\t# en quad-space\r\n\t\t\t|\r\n\t\t\t\\x{2001}\t\t# em quad-space\r\n\t\t\t|\r\n\t\t\t\\x{2002}\t\t# en space\r\n\t\t\t|\r\n\t\t\t\\x{2003}\t\t# em space\r\n\t\t\t|\r\n\t\t\t\\x{2004}\t\t# three-per-em space\r\n\t\t\t|\r\n\t\t\t\\x{2005}\t\t# four-per-em space\r\n\t\t\t|\r\n\t\t\t\\x{2006}\t\t# six-per-em space\r\n\t\t\t|\r\n\t\t\t\\x{2007}\t\t# figure space\r\n\t\t\t|\r\n\t\t\t\\x{2008}\t\t# punctuation space\r\n\t\t\t|\r\n\t\t\t\\x{2009}\t\t# thin space\r\n\t\t\t|\r\n\t\t\t\\x{200a}\t\t# hair space\r\n\t\t\t|\r\n\t\t\t\\x{200b}\t\t# zero-width space\r\n\t\t\t|\r\n\t\t\t\\x{200c}\t\t# zero-width joiner\r\n\t\t\t|\r\n\t\t\t\\x{200d}\t\t# zero-width non-joiner\r\n\t\t\t|\r\n\t\t\t\\x{202f}\t\t# narrow no-break space\r\n\t\t\t|\r\n\t\t\t\\x{205f}\t\t# medium mathematical space\r\n\t\t\t|\r\n\t\t\t\\x{3000}\t\t# ideographic space\r\n\t\t\t'; // required modifiers: x (multiline pattern) i (case insensitive) u (utf8)\r\n\r\n\t\t// normal spacing\r\n\t $parsedHTMLtoken[\"value\"] = preg_replace(\r\n\t\t\t\"/\\s+/xu\",\r\n\t\t\t\" \",\r\n\t\t\t$parsedHTMLtoken[\"value\"]\r\n\t\t\t);\r\n\r\n\t\t// nbsp get's priority. if nbsp exists in a string of spaces, it collapses to nbsp\r\n\t $parsedHTMLtoken[\"value\"] = preg_replace(\r\n\t\t\t\"/(?:\\s|$htmlSpaces)*\".$this->chr[\"noBreakSpace\"].\"(?:\\s|$htmlSpaces)*/xu\",\r\n\t\t\t$this->chr[\"noBreakSpace\"],\r\n\t\t\t$parsedHTMLtoken[\"value\"]\r\n\t\t\t);\r\n\r\n\t\t// for any other spaceing, replace with the first occurance of an unusual space character\r\n\t $parsedHTMLtoken[\"value\"] = preg_replace(\r\n\t\t\t\"/(?:\\s)*($htmlSpaces)(?:\\s|$htmlSpaces)*/xu\",\r\n\t\t\t\"$1\",\r\n\t\t\t$parsedHTMLtoken[\"value\"]\r\n\t\t\t);\r\n\r\n\t\t// remove all spacing at beginning of block level elements\r\n\t\tif(!isset($parsedHTMLtoken[\"prevChr\"]) || $parsedHTMLtoken[\"prevChr\"] == NULL) { // we have the first text in a block level element\r\n\t $parsedHTMLtoken[\"value\"] = preg_replace(\r\n\t\t\t\"/\\A(?:\\s|$htmlSpaces)+/xu\",\r\n\t\t\t\"\",\r\n\t\t\t$parsedHTMLtoken[\"value\"]\r\n\t\t\t);\r\n\t\t}\r\n/**/\r\n\r\n\t\treturn $parsedHTMLtoken;\r\n\t}", "function removeSpacing($str) {\r\n return trim(preg_replace('/\\s\\s+/', ' ', $str));\r\n}", "function normalize_whitespace($str)\n{\n}", "public function getWhitespace($indent)\n {\n if (is_int($indent)) {\n return str_repeat(' ', $indent);\n }\n\n return (string) $indent;\n }", "function _locale_export_wrap($str, $len) {\n $words = explode(' ', $str);\n $return = array();\n\n $cur = \"\";\n $nstr = 1;\n while (count($words)) {\n $word = array_shift($words);\n if ($nstr) {\n $cur = $word;\n $nstr = 0;\n }\n elseif (strlen(\"$cur $word\") > $len) {\n $return[] = $cur . \" \";\n $cur = $word;\n }\n else {\n $cur = \"$cur $word\";\n }\n }\n $return[] = $cur;\n\n return implode(\"\\n\", $return);\n}", "public function stdWrap_space() {}", "private function addSpacesBetweenChars($str){\r\n\t\treturn implode(' ',str_split($str));\r\n\t}", "function fix_spaces($phrase){\n for($i = 0; $i < count($phrase); $i++){\n if($phrase[$i] == '_'){\n $phrase[$i] = ' ';\n }\n }\n return $phrase;\n}", "private function generateTab($text)\n\t{\n\t\t$text_explode = explode(\"\\n\\r\", $text);\n\t\t$text_explode = explodeStringInArrayToSimpleArray(\"\\n\", $text_explode);\n\t\t$text_explode = $this->explodeRowsInArrayToWord($text_explode);\n\t\t$tab = [];\n\t\t$tab_size = $this->number_cases;\n\t\t$text_max_row = count($text_explode);\n\t\tif ($text_max_row > $tab_size) {\n\t\t\t$text_row = rand(0, $text_max_row - 1);\n\t\t}\n\t\telse {\n\t\t\t$text_row = 0;\n\t\t}\n\t\t$text_col = 0;\n\t\tfor ($row = 0; $row < $tab_size; $row++) {\n\t\t\tif ($text_row > $text_max_row - 1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor ($col = 0; $col < $tab_size; $col++) {\n\t\t\t\tif ($text_col > count($text_explode[$text_row]) -1) {\n\t\t\t\t\t$text_col = 0;\n\t\t\t\t\t$text_row++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$tab[$row][$col] = $text_explode[$text_row][$text_col];\n\t\t\t\t$text_col++;\n\t\t\t}\n\t\t}\n\t\treturn $tab;\n\t}", "public static function nowrap($value)\n\t{\n\t\t$value = str_replace(array(\" \", \"\\t\", \"\\n\", \"\\r\"), \"&nbsp;\", $value);\n\t\twhile (false !== strpos($value, \"&nbsp;&nbsp;\"))\n\t\t{\n\t\t\t$value = str_replace(\"&nbsp;&nbsp;\", \"&nbsp;\", $value);\n\t\t}\n\t\treturn $value;\n\t}", "public static function columnize()\n {\n $n = PHP_EOL;\n if (isset($_SERVER['SHELL'], $_SERVER['TERM']) && $_SERVER['SHELL'] == '/bin/bash') {\n $maxChars = shell_exec('tput cols');\n $maxChars = str_replace($n, '', $maxChars);\n $maxChars = is_numeric($maxChars) ? $maxChars : self::MAX_LINE_CHARS;\n }\n else {\n $maxChars = self::MAX_LINE_CHARS;\n }\n $args = func_get_args();\n $output = '';\n \n $index = 0;\n $lastIndex = count($args) -1;\n while ($index <= $lastIndex)\n {\n if ($index % 2 == 0 && !is_numeric($args[$index]))\n {\n $left = is_numeric($args[$index + 1]) ? $args[$index + 1] : 0;\n \n if ($left < $maxChars)\n {\n $value = '';\n $left = ($left - strlen($output)) > 0 ? $left - strlen($output) : 0;\n if ($left > 0)\n $value .= implode('', array_pad(array(), $left, ' '));\n\n $value .= $args[$index];\n //we split the line if it's too long\n if ((strlen($output.$value)) > $maxChars)\n {\n $trimPortion = substr($output. $value, $maxChars);\n $output = substr($output.$value, 0, $maxChars);\n $output .= $n;\n $output .= self::columnize($trimPortion, $args[$index + 1]);\n }\n else\n $output .= $value;\n } \n\n $index += 2;\n }\n else\n $index++;\n }\n \n return $output;\n }", "static function str_replace_space( $_string = \"\" ) {\n\t\t\t\t\t $_string = str_replace(array(\"\\t\"), ',+,', $_string);\n\t\t\t\t\t $_string = str_replace(array(\"\\r\", \"\\r\\n\", \"\\n\"), ',-,', $_string);\n\t\t\t\t\t //print ( \"'\" . $_string . \"'<br/>\\n\" );\n\t\t\t\t\t //$_string = str_replace(array(\" \"), ',', $_string);\n\t\t\t\t\t $_string = preg_replace(\"/\\s+/u\", ',', $_string);\n\t\t\t\t\t //print ( \"'\" . $_string . \"'<br/>\\n\" );\n\t\t\t\t\t return $_string;\n\t\t }", "public function indent($tabs = 1)\n {\n if ($this->output) {\n $this->output->indent($tabs);\n }\n if ($this->debugOutput) {\n $this->debugOutput->indent($tabs);\n }\n }", "function clean_string($s)\n{\n $tmp = trim($s);\n while ((strpos($tmp, \" \")) == true)\n $tmp = str_replace(\" \", \" \", $tmp);\n return $tmp;\n}", "function removeSpaces($data){\r\n\t\t\t\t$data = preg_replace(\"/[\\t]+/\", \"\", $data);\r\n\t\t\t\t$data = preg_replace(\"/[\\r\\n]+/\", \"\", $data);\r\n\t\t\t\treturn preg_replace(\"/\\s+/\", \" \", $data);\r\n\t\t\t}", "protected function formatShift()\n {\n $sShift = str_repeat($this->tab, $this->nbTab);\n return $sShift; \t\n }", "public function compressSpaces(): Strink\n {\n return new static(preg_replace('/\\s\\s+/', ' ', $this->string));\n }", "function tokenTruncate($string, $your_desired_width) {\r\n $parts = preg_split('/([\\s\\n\\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);\r\n $parts_count = count($parts);\r\n\r\n $length = 0;\r\n $last_part = 0;\r\n for (; $last_part < $parts_count; ++$last_part) {\r\n $length += strlen($parts[$last_part]);\r\n if ($length > $your_desired_width) { break; }\r\n }\r\n\r\n return implode(array_slice($parts, 0, $last_part));\r\n}", "function PrintSpace() {\n\techo \"&nbsp;\";\n}", "protected function _getWhitespace($indent)\n {\n if (is_int($indent)) {\n $indent = str_repeat(' ', $indent);\n }\n\n return (string) $indent;\n }", "function splitWithWidth($strs, $strWidths, $totalWidth, $maxWidth, $fontSize, $fontStyle, $EnglishSplitSymbol) {\n\t\t$newStrsArray = array(); //2-D array, each element is one print line\n\t\t$newStrs = array(); //1-D array, element of $newStrsArray\n\t\t$temWidth = 0;\n\t\t\t\t\n\t\t$lineCount = ceil($totalWidth / $maxWidth); //line count\n\t\t$lineWidth = $totalWidth / $lineCount; //minimal line width (for all line, the current line is SHORTER than its previous line)\n\t\t$isChinese = checkChinese($strs); //check whether each string is Chinese or English\n\t\t\n\t\tfor($i=0; $i<count($strs); ++$i) {\n\t\t\t$temWidth = $temWidth + $strWidths[$i];\n\t\t\t\n\t\t\tif($temWidth > $lineWidth) {\n\t\t\t\t$temWidth = $temWidth - $strWidths[$i];\n\t\t\t\t\n\t\t\t\tif($isChinese[$i]) {\n\t\t\t\t\t$splitRegExp = '//u';\n\t\t\t\t\t$concatSymbol = '';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$splitRegExp = '/[' . $EnglishSplitSymbol . ']+/u';\n\t\t\t\t\t$concatSymbol = ( $EnglishSplitSymbol=='\\s' ) ? ' ' : $EnglishSplitSymbol;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$pieces = preg_split($splitRegExp, $strs[$i]);\n\t\t\t\t$pieceWidths = calWidths($pieces, $fontSize, $fontStyle); //calculate widths of each piece (string)\n\t\t\t\t\n\t\t\t\t$currentLine = ''; \n\t\t\t\tfor($j=0; $j<count($pieces); ++$j) {\n\t\t\t\t\t$temWidth = $temWidth + $pieceWidths[$j];\n\t\t\t\t\t\n\t\t\t\t\tif($temWidth >= $lineWidth) {\n\t\t\t\t\t\tif($temWidth <= $maxWidth)\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$currentLine = ($j == count($pieces)-1)? $currentLine.$pieces[$j] : $currentLine.$pieces[$j].$concatSymbol;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($newStrs, trim($currentLine, ' '));\n\t\t\t\t\t\t\tarray_push($newStrsArray, $newStrs);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$newStrs = array();\t\n\t\t\t\t\t\t\t$currentLine = '';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$temWidth = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($newStrs, trim($currentLine, ' '));\n\t\t\t\t\t\t\tarray_push($newStrsArray, $newStrs);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$newStrs = array();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$currentLine = ($j == count($pieces)-1)? $pieces[$j] : $pieces[$j].$concatSymbol;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$temWidth = $pieceWidths[$j];\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$currentLine = ($j == count($pieces)-1)? $currentLine.$pieces[$j] : $currentLine.$pieces[$j].$concatSymbol;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(trim($currentLine, ' ') != '') {\n\t\t\t\t\tarray_push($newStrs, trim($currentLine, ' '));\n\t\t\t\t\tif($i == count($strs)-1) array_push($newStrsArray, $newStrs);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telseif($temWidth == $lineWidth) {\n\t\t\t\tarray_push($newStrs, $strs[$i]);\n\t\t\t\tarray_push($newStrsArray, $newStrs);\n\t\t\t\t\n\t\t\t\t$newStrs = array();\n\t\t\t\t$temWidth = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_push($newStrs, $strs[$i]);\n\t\t\t\tif($i == count($strs)-1) array_push($newStrsArray, $newStrs);\n\t\t\t}\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\treturn $newStrsArray;\n\t}", "protected function linear_whitespace()\n {\n }", "function HorizontalTab($pos=0){\n $this->Ticket .= chr(9);\n }", "function parseToTabs($textLines)\n{\n\t$splitTabsArray = explode(\"\\t\", $textLines);\n\t$nameAndTimeArray = array('name' => $splitTabsArray[2], 'timecode' => $splitTabsArray[4], 'properName' => $splitTabsArray[2]);\n\treturn $nameAndTimeArray;\n}", "function ws($val){\n\treturn (strlen($val) > 0)?$val:'&nbsp;';\n}", "public function tab()\n {\n // Write character onto writer\n $this->writer->write(new Tab());\n\n // Afford chaining\n return $this;\n }", "public static function dump(mixed $input, string $tab = ' ', int $tabs = 0): string\n {\n $type = gettype($input);\n\n switch ($type) {\n case 'NULL';\n return '*NULL';\n case 'integer':\n return 'int: '. $input;\n\n case 'double':\n return 'float: '. var_export($input, true);\n\n case 'boolean':\n return 'bool: '. var_export($input, true);\n\n case 'string':\n // Add multibyte length (as expected).\n $length = mb_strlen($input);\n\n return 'string('. $length .') \"'. $input .'\"';\n\n case 'array':\n case 'object':\n $tabs += 1;\n\n if ($type == 'array') {\n $type = $input ? (is_list($input) ? 'list' : 'map') : '?';\n $count = count($input);\n $output = format('array(%d) <%s> {', $count, $type);\n if ($count) {\n $output .= \"\\n\";\n }\n\n // // For space gaps.\n // $maxKeyLen = max(array_map(\n // fn($k) => strlen((string) $k),\n // array_keys($input)\n // ));\n\n foreach ($input as $key => $value) {\n $recursion = null;\n if (is_array($value)) {\n $recursion = self::checkRecursion($value);\n }\n\n // Fix null/none keys.\n if ($key === '') {\n $key = \"''\";\n }\n\n $space = '';\n // $spaceGap = $maxKeyLen - strlen((string) $key);\n // if ($spaceGap > 0) {\n // $space = str_repeat(' ', $spaceGap);\n // }\n\n $output .= str_repeat($tab, $tabs);\n $output .= $key . $space .' => '. (\n $recursion ?: self::dump($value, $tab, $tabs)\n );\n $output .= \"\\n\";\n }\n } else {\n static $prep; $prep ??= function ($dump) {\n $dump = slice(split(\"\\n\", $dump), 1, -1); // Drop \"array(1) <..> {\" and \"}\" parts.\n $dump = join(\"\\n\", $dump); // Join back elements/properties.\n return $dump;\n };\n\n [$objectType, $objectId] = split('#', Objects::getId($input));\n\n // I really hate this thing.\n if ($objectType == 'stdClass') {\n $objectType = 'object';\n }\n\n // Handle special objects.\n if ($input instanceof \\SplFixedArray) {\n $output = format('object(%d) <%s>#%s {', $input->count(), $objectType, $objectId);\n\n if ($input->count()) {\n $dump = self::dump($input->toArray(), $tab, $tabs - 1);\n $output .= \"\\n\". $prep($dump) .\"\\n\";\n $output .= str_repeat($tab, $tabs - 1);\n }\n\n $output .= '}';\n\n return $output;\n }\n\n // Handle spacial cases for debug info.\n if (method_exists($input, '__debugInfo')) {\n $info = $input->__debugInfo();\n\n // In case: \"[\\0ArrayObject\\0storage] => ..\".\n $info = array_map_keys($info, function ($key) {\n $name = strval($key);\n if (strsrc($name, \"\\0\")) {\n $key = array_last(split(\"\\0\", $key));\n $key = $key .' '. (strsrc($name, '*') ? '[protected]' : '[private]');\n }\n return $key;\n });\n\n $count = count($info);\n $output = format('object(%d) <%s>#%s {', $count, $objectType, $objectId);\n\n if ($info) {\n $dump = self::dump($info, $tab, $tabs - 1);\n $output .= \"\\n\". $prep($dump) .\"\\n\";\n $output .= str_repeat($tab, $tabs - 1);\n }\n\n $output .= '}';\n\n return $output;\n }\n\n $properties = Objects::getProperties($input);\n $count = count($properties);\n $output = format('object(%d) <%s>#%s {', $count, $objectType, $objectId);\n if ($count) {\n $output .= \"\\n\";\n }\n\n foreach ($properties as $property) {\n $recursion = self::checkRecursion($input, $property['name']);\n if ($recursion) {\n return $recursion;\n }\n\n $output .= str_repeat($tab, $tabs);\n\n // Drop public & join.\n $property['modifiers'] = join('|', array_delete(\n $property['modifiers'], 'public'\n ));\n\n $propertyInfo = array_filter([\n $property['modifiers'],\n $property['type'],\n ]);\n\n $output .= format('%s%s => ', $property['name'], (\n $propertyInfo ? ' ['. join(':', $propertyInfo) .']' : ''\n ));\n\n // To get value, this reflection must come from Objects call.\n $ref = $property['reflection'];\n if (is_false($property['initialized'])) {\n if ($ref->hasDefaultValue()) {\n $output .= self::dump($ref->getDefaultValue(), $tab, $tabs);\n } else {\n $output .= '*UNINITIALIZED';\n }\n } else {\n $value = $ref->getValue();\n if (is_null($value)) {\n $output .= '*NULL';\n } elseif (\n is_object($value)\n && is_class_of($value, 'DOMNode') // Danger & safe.\n && !is_class_of($value, 'DOMImplementation', /* 'DOMProcessingInstruction', ... */\n )) {\n // Problematic...\n $output .= format('<%s>#%s { ... }', ...split('#', get_object_id($value)));\n } else {\n $output .= self::dump($value, $tab, $tabs);\n }\n }\n\n $output .= \"\\n\";\n }\n }\n\n $tabs -= 1;\n\n if ($count) {\n $output .= str_repeat($tab, $tabs);\n }\n $output .= '}';\n\n return $output;\n\n case 'resource':\n case 'resource (closed)':\n return get_type($input) .' #'. get_resource_id($input);\n }\n\n return $type;\n }", "protected function addTabs($numero){\n $tabs=\"\";\n for($i=0;$i<$numero;$i++)\n $tabs.=\"\\n\";\n return $tabs;\n }", "static function padString($string,$length,$padchar=' ',$padtype=STR_PAD_RIGHT) {\n\t\t\treturn str_pad($string,$length,$padchar,$padtype);\n\t\t}", "function spacein($string){\n\n $string = str_replace(\n array('_'),\n array(' '),\n $string\n );\n return $string;\n }", "function NoBreak($string) {\r\n return str_replace(\" \",\"&nbsp;\",$string);\r\n}", "function changeSizeText($str, $n = 500, $end_char = '&#8230;'){\n if (strlen($str) < $n){\n return $str;\n }\n\n $str = preg_replace(\"/\\s+/\", ' ', str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), ' ', $str));\n\n if (strlen($str) <= $n){\n return $str;\n }\n\n $out = \"\";\n foreach (explode(' ', trim($str)) as $val){\n $out .= $val.' ';\n\n if (strlen($out) >= $n){\n $out = trim($out);\n return (strlen($out) == strlen($str)) ? $out : $out.$end_char;\n }\n }\n}", "protected function removeWhiteSpace($str) {\n\n $str = str_replace(\"\\t\", ' ', $str);\n\n $str = str_replace(\"\\n\", '', $str);\n\n $str = str_replace(\"\\r\", '', $str);\n\n while (stristr($str, ' ')) {\n\n $str = str_replace(' ', '', $str);\n\n }\n\n return $str;\n\n }", "function indentContent($content, $tab=\"\\t\")\n\t{\n\t\t$content = preg_replace('/(>)(<)(\\/*)/', \"$1\\n$2$3\", $content);\n\t\n\t\t// now indent the tags\n\t\t$token = strtok($content, \"\\n\");\n\t\t$result = ''; // holds formatted version as it is built\n\t\t$pad = 0; // initial indent\n\t\t$matches = array(); // returns from preg_matches()\n\t\n\t\t// scan each line and adjust indent based on opening/closing tags\n\t\twhile ($token !== false)\n\t\t{\n\t\t\t$token = trim($token);\n\t\t\t// test for the various tag states\n\t\n\t\t\t// 1. open and closing tags on same line - no change\n\t\t\tif (preg_match('/.+<\\/\\w[^>]*>$/', $token, $matches)) $indent=0;\n\t\t\t// 2. closing tag - outdent now\n\t\t\telseif (preg_match('/^<\\/\\w/', $token, $matches))\n\t\t\t{\n\t\t\t\t$pad--;\n\t\t\t\tif($indent>0) $indent=0;\n\t\t\t}\n\t\t\t// 3. opening tag - don't pad this one, only subsequent tags\n\t\t\telseif (preg_match('/^<\\w[^>]*[^\\/]>.*$/', $token, $matches)) $indent=1;\n\t\t\t// 4. no indentation needed\n\t\t\telse $indent = 0;\n\t\n\t\t\t// pad the line with the required number of leading spaces\n\t\t\t$line = str_pad($token, strlen($token)+$pad, $tab, STR_PAD_LEFT);\n\t\t\t$result .= $line.\"\\n\"; // add to the cumulative result, with linefeed\n\t\t\t$token = strtok(\"\\n\"); // get the next token\n\t\t\t$pad += $indent; // update the pad size for subsequent lines\n\t\t}\n\t\treturn $result;\n\t}", "function _split_str_by_whitespace($string, $goal)\n{\n}", "function tabBody($theLines,$tabSize) {\n\t$cnt1 = 0;\n\t$quoting = false;\n\twhile ($cnt1 < count($theLines)) {\n \t$theLine = $theLines[$cnt1];\n \t$cnt2 = 0;\n \twhile ($cnt2 < strlen($theLine)) {\n \t\t$char = $theLine[$cnt2];\n \t\tif ($char == '\"' || $char == \"'\" || $quoting) {\n \t\tif (!$quoting) {\n \t\t\t$quote = $char;\n \t\t\t$quoting = true;\n \t\t\t$cnt2++;\n \t\t}\n \t\tdo {\n \t\t\tif ($theLine[$cnt2++] == $quote) {\n \t\t\t$quoting = false;\n \t\t\tbreak;\n \t\t\t}\n \t\t} while ($cnt2 < strlen($theLine));\n \t\t} else {\n \t\tif ($char == \">\" && $cnt2 + 1 < strlen($theLine)) {\n \t\t\t$theLines[$cnt1] = trim(substr($theLine, 0, $cnt2 + 1));\n \t\t\tarray_splice($theLines, $cnt1+1, 0, trim(substr($theLine, $cnt2 + 1)));\n \t\t\t$theLines = array_values($theLines);\n \t\t\tbreak;\n \t\t}\n \t\tif ($char == \"<\" && $cnt2 > 0) {\n \t\t\t$theLines[$cnt1] = trim(substr($theLine, 0, $cnt2));\n \t\t\tarray_splice($theLines, $cnt1+1, 0, trim(substr($theLine, $cnt2)));\n \t\t\t$theLines = array_values($theLines);\n \t\t\tbreak;\n \t\t}\n \t\t$cnt2++;\n \t\t}\n \t}\n \t$cnt1++;\n\t}\n\n\t//Pass 2: Concatenate selected tags back to single line.\n\t$openTags = array(\"<a \",\"<h1\",\"<h2\",\"<h3\",\"<h4\",\"<h5\",\"<h6\",\"<strong\",\"<label\",\"<textarea\",\"<td\",\"<tr>\",\"<tr \",\"<p>\",\"<p \",\"<li>\",\"<li \",\"<option\");\n\t$closeTags = array(\"</a>\",\"</h1>\",\"</h2>\",\"</h3>\",\"</h4>\",\"</h5>\",\"</h6>\",\"</strong>\",\"</label>\",\"</textarea>\",\"</td>\",\"</tr>\",\"</tr>\",\"</p>\",\"</p>\",\"</li>\",\"</li>\",\"</option>\");\n\tforeach ($openTags as $key => $openTag) {\n \t$closeTag = $closeTags[$key];\n \t$cnt1 = 0;\n \t$newLines = array();\n \twhile ($cnt1 < count($theLines)) {\n \t\t$theLine = $theLines[$cnt1];\n \t\tif (substr($theLine,0,strlen($openTag)) == $openTag) {\n \t\tdo {\n \t\t\tif (($openTag == \"<li>\" || $openTag == \"<li \") && substr($theLines[$cnt1 + 1], 0, 3) == \"<ul\") break;\n \t\t\t$theLine = $theLine . $theLines[++$cnt1];\n \t\t} while ($theLines[$cnt1] != $closeTag);\n \t\t}\n \t\t$newLines[] = $theLine;\n \t\t$cnt1++;\n \t}\n \t$theLines = $newLines;\n\t}\n\n\t//Pass 3: Output lines with tabs.\n\t$openTags = array(\"<div\",\"<table\",\"<form\",\"<span\",\"<ul\",\"<ol\",\"<select\");\n\t$closeTags = array(\"</div\",\"</table\",\"</form\",\"</span\",\"</ul\",\"</ol\",\"</select\");\n\tforeach ($theLines as $theLine) {\n \tforeach ($closeTags as $closeTag) {\n \t\tif (substr($theLine, 0, strlen($closeTag)) == $closeTag) {\n \t\t$tabSize--;\n \t\tbreak;\n \t\t}\n \t}\n \ttabLine($theLine, $tabSize);\n \tforeach ($openTags as $openTag) {\n \t\tif (substr($theLine, 0, strlen($openTag)) == $openTag) {\n \t\t$tabSize++;\n \t\tbreak;\n \t\t}\n \t}\n\t}\n}", "public function singleSpace() {\n\t\t$this->text = preg_replace(\"/\\s{2,}/\", ' ', $this->text);\n\t\treturn $this;\n\t}", "function ptln($string, $indent = 0) {\n echo str_repeat(' ', $indent).\"$string\\n\";\n}", "public function outdent($tabs = 1)\n {\n if ($this->output) {\n $this->output->outdent($tabs);\n }\n if ($this->debugOutput) {\n $this->debugOutput->outdent($tabs);\n }\n }", "function nbs($num = 1)\n{\n\treturn str_repeat(\"&nbsp;\", $num);\n}", "function staircase($n)\n{\n $space = ' ';\n $symbol = '#';\n $how_much_space = 0;\n $how_much_symbol = 0;\n\n for ($i=1; $i<$n+1; $i++)\n {\n $how_much_space = $n - $i;\n $how_much_symbol = $i;\n\n $temp_space = str_repeat($space, $how_much_space);\n $temp_symbol = str_repeat($symbol, $how_much_symbol);\n\n echo $temp_space;\n echo $temp_symbol, \"\\n\";\n }\n\n}", "static function CorrectSpaces($text)\n {\n $chars = '!,;.?:';\n $charArray = str_split($chars);\n foreach ($charArray as $char)\n {\n $text = Str::Replace($char, $char . ' ', $text);\n }\n return self::RemoveMultipleSpaces($text);\n }", "function check_space($string) {\r\n $space = FALSE;\r\n $asciiArray = string_to_ascii($string);\r\n foreach ($asciiArray as $ascii) {\r\n if ($ascii == 32) {\r\n $space = TRUE;\r\n }\r\n }\r\n return $space;\r\n}", "public static function space()\n\t{\n\t}", "function removespaces($s)\n\t{\n\t\treturn str_replace(\" \", \"\", $s);\n\t}", "public static function oneLiner($string) {\n return preg_replace('/\\\\s+/', ' ', $string);\n }", "public function stdWrap_spaceBefore() {}", "public static function stripMultipleSpaces( string $str ) : string\n {\n return preg_replace('/\\s+/', ' ', $str );\n }", "public static function collapseSpaces(string $string): string\n {\n $string = (string) preg_replace('/\\h+/u', ' ', $string);\n $string = trim($string);\n\n return $string;\n }", "function _setWidth($fontSize)\n {\n global $pdf;\n\n foreach ($this->fields as $field) {\n $this->width = max($this->width, $pdf->GetStringWidth($field));\n }\n $this->width += $pdf->GetStringWidth(' ');\n $pdf->SetFont($this->_ff, 'B', $fontSize);\n /*\n * it is unknown what value must be added, because\n * table title is affected by the tabe width value\n */\n while ($this->width < $pdf->GetStringWidth($this->_getTitle())) {\n $this->width += 5;\n }\n $pdf->SetFont($this->_ff, '', $fontSize);\n }" ]
[ "0.77772117", "0.7638425", "0.7425997", "0.731023", "0.6969291", "0.6882442", "0.6428398", "0.6283149", "0.6241652", "0.6014609", "0.5995382", "0.5816061", "0.5723572", "0.56651235", "0.56485784", "0.55783415", "0.5518583", "0.5412814", "0.53465533", "0.5310194", "0.52817714", "0.52562433", "0.5241837", "0.5238951", "0.51926684", "0.5191319", "0.51358443", "0.512725", "0.5127126", "0.51051146", "0.5101243", "0.50573564", "0.50506467", "0.5032243", "0.5018053", "0.50138575", "0.4993915", "0.49847037", "0.495651", "0.4956273", "0.49130931", "0.48876834", "0.48850346", "0.48661053", "0.48532078", "0.48429525", "0.48282698", "0.4818296", "0.48116317", "0.4807144", "0.48045632", "0.48028418", "0.47794664", "0.4779422", "0.47766915", "0.47643024", "0.47403756", "0.4734374", "0.47322416", "0.4726667", "0.47229815", "0.47073096", "0.47055978", "0.46850204", "0.4680649", "0.46763942", "0.46688884", "0.46539217", "0.46499607", "0.464462", "0.46303493", "0.4603591", "0.45975977", "0.45947987", "0.4592628", "0.45867628", "0.4577778", "0.45731223", "0.45665583", "0.45490575", "0.45448261", "0.45399517", "0.45365193", "0.45311576", "0.45292512", "0.45232278", "0.4511422", "0.45057648", "0.45054066", "0.45048374", "0.44948643", "0.44930133", "0.44920045", "0.44895175", "0.448869", "0.44730076", "0.44718078", "0.44704828", "0.44660127", "0.44617176" ]
0.7826104
0
Surrounds a string with the given substring.
Окружает строку заданным подстрокой.
public static function surround($str, $substring) { return implode('', array($substring, $str, $substring)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function surround($substring)\n {\n $str = implode('', array($substring, $this->str, $substring));\n\n return static::create($str, $this->encoding);\n }", "function utf8_substr_replace($string, $replacement, $start, $length = 0)\n {\n $ret = '';\n if ($start > 0)\n $ret .= utf8_substr($string, 0, $start);\n $ret .= $replacement;\n $ret .= utf8_substr($string, $start + $length);\n return $ret;\n }", "function surround($str, $token)\n {\n return $token . trim($str, $token) . $token;\n }", "public static function substrReplace(string $string, string $replacement, int $start, int $length): string\n {\n return mb_substr($string, 0, $start) . $replacement . mb_substr($string, $start + $length);\n }", "function substr_replace($string, $replacement, $start, $length = null)\n{\n return '';\n}", "protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }", "protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }", "protected function replacePlaceHolder($string)\n {\n foreach ($this->placeHolders as $key => $val) {\n $string = str_replace($key, $val, $string);\n }\n\n return $string;\n }", "function substr_replace($string,$replacement,$start,$length=NULL)\n{\n\treturn '';\n}", "function substr_replace($string, $replacement, $start, $length = NULL)\n{\n}", "public function stdWrap_substring() {}", "public static function substrReplace($string, $replace, $offset = 0, $length = null)\n {\n }", "function replaceSubString(string $replace, int $offset = 0, ?int $length = null): Closure\n{\n /**\n * @param string $string\n * @return string\n */\n return function (string $string) use ($replace, $offset, $length): string {\n return $length\n ? \\substr_replace($string, $replace, $offset, $length)\n : \\substr_replace($string, $replace, $offset);\n };\n}", "function _s_wrap_text( $string, $search = '#', $replace = 'span' ) {\n \t$string = force_balance_tags( str_replace( '#', sprintf('<%s>', $replace), $string ) );\n\t// remove empty tags\n\treturn str_replace( sprintf('<%1$s></%1$s>', $replace), '', $string );\n}", "function str_chop($string, $length = 60, $center = false, $append = null)\n{\n\t// Set the default append string\n\tif ($append === null) {\n\t\t$append = ($center === true) ? ' ... ' : ' ...';\n\t}\n\n\t// Get some measurements\n\t$len_string = strlen($string);\n\t$len_append = strlen($append);\n\n\t// If the string is longer than the maximum length, we need to chop it\n\tif ($len_string > $length) {\n\t\t// Check if we want to chop it in half\n\t\tif ($center === true) {\n\t\t\t// Get the lengths of each segment\n\t\t\t$len_start = $length / 2;\n\t\t\t$len_end = $len_start - $len_append;\n\n\t\t\t// Get each segment\n\t\t\t$seg_start = substr($string, 0, $len_start);\n\t\t\t$seg_end = substr($string, $len_string - $len_end, $len_end);\n\n\t\t\t// Stick them together\n\t\t\t$string = $seg_start . $append . $seg_end;\n\t\t} else {\n // Otherwise, just chop the end off\n\t\t\t$string = substr($string, 0, $length - $len_append) . $append;\n\t\t}\n\t}\n\n\treturn $string;\n}", "protected function _replace($string, $size) {\n\t\treturn str_replace(\"%size%\", $size, $string);\n\t}", "public static function substrReplace($string, $replace, $offset = 0, $length = null)\n {\n if ($length === null) {\n $length = strlen($string);\n }\n\n return substr_replace($string, $replace, $offset, $length);\n }", "function mb_substr_replace($output, $replace, $posOpen, $posClose) {\n\treturn mb_substr($output, 0, $posOpen).$replace.mb_substr($output, $posClose+1);\n}", "protected static function snip(&$s) {\n // removing the centre of the string, inserting the substring\n // [... snip ... ] in its place\n $snipInsert = ' ...snip... ';\n $len = strlen($s);\n if ($len > qtype_coderunner_grader::MAX_STRING_LENGTH) {\n $lenToRemove = $len - qtype_coderunner_grader::MAX_STRING_LENGTH + strlen($snipInsert);\n $partLength = ($len - $lenToRemove) / 2;\n $firstBit = substr($s, 0, $partLength);\n $lastBit = substr($s, $len - $partLength, $partLength);\n $s = $firstBit . $snipInsert . $lastBit;\n }\n return $s;\n }", "function str_chop($string, $length = 60, $center = false, $append = null)\n{\n // Set the default append string\n if ($append === null) {\n $append = ($center === true) ? ' ... ' : ' ...';\n }\n \n // Get some measurements\n $len_string = strlen($string);\n $len_append = strlen($append);\n \n // If the string is longer than the maximum length, we need to chop it\n if ($len_string > $length) {\n // Check if we want to chop it in half\n if ($center === true) {\n // Get the lengths of each segment\n $len_start = $length / 2;\n $len_end = $len_start - $len_append;\n \n // Get each segment\n $seg_start = substr($string, 0, $len_start);\n $seg_end = substr($string, $len_string - $len_end, $len_end);\n \n // Stick them together\n $string = $seg_start . $append . $seg_end;\n } else {\n // Otherwise, just chop the end off\n $string = substr($string, 0, $length - $len_append) . $append;\n }\n }\n \n return $string;\n}", "public function substitute(string $string, string $old, string $new, ?int $replaceAtIndex = null): string;", "function xthreads_our_str_replace($find, &$replacements, $subject)\r\n{\r\n\t$l = strlen($find);\r\n\t// allocate some memory\r\n\t$new_subject = str_repeat(' ', strlen($subject));\r\n\t$new_subject = '';\r\n\tforeach($replacements as $r)\r\n\t{\r\n\t\tif(($pos = strpos($subject, $find)) === false) break;\r\n\t\t$new_subject .= substr($subject, 0, $pos).$r;\r\n\t\t$subject = substr($subject, $pos+$l);\r\n\t}\r\n\t$new_subject .= $subject;\r\n\treturn $new_subject;\r\n}", "public function limit_string($string, $length, $replacer = '...') {\n\t if (strlen($string) > $length)\n\t $string = mb_substr($string, 0, $length-3) . $replacer;\n\t return $string;\n\t}", "function strbcut(string $string, string $search, int $length = null, bool $icase = false, int $offset = 0): string\n{\n $pos = !$icase ? mb_strpos($string, $search, $offset) : mb_stripos($string, $search, $offset);\n\n if ($pos !== false) {\n $ret = mb_substr($string, 0, $pos);\n return $length ? strcut($ret, $length) : $ret;\n }\n\n return ''; // Not found.\n}", "function str_insert($insertstring, $intostring, $offset){\n\t\t$part1 = substr($intostring, 0, $offset);\n\t\t$part2 = substr($intostring, $offset);\n\t\t$part1 = $part1 . $insertstring;\n\t\t$whole = $part1 . $part2;\n\t\treturn $whole;\n\t}", "protected function wrapFormatString($string, $style)\n {\n if ($style) {\n return \"<{$style}>$string</>\";\n }\n return $string;\n }", "protected function replacePlaceholder($string)\n {\n return str_replace(array_keys(self::$placeholders), self::$placeholders, $string);\n }", "public static function single_str_replace($search, $replace, $subject){\n \n $pos = strpos($subject, $search);\n \n if( $pos === false ) return $subject;\n \n return substr_replace($subject, $replace, $pos, strlen($search));\n \n }", "function stracut(string $string, string $search, int $length = null, bool $icase = false, int $offset = 0): string\n{\n $pos = !$icase ? mb_strpos($string, $search, $offset) : mb_stripos($string, $search, $offset);\n\n if ($pos !== false) {\n $ret = mb_substr($string, $pos + mb_strlen($search));\n return $length ? strcut($ret, $length) : $ret;\n }\n\n return ''; // Not found.\n}", "public function substitute(& $string)\n {\n foreach($this->_substitutes as $key => $value)\n {\n $string = str_replace($key, $value, $string);\n }\n\n return $string;\n }", "function str_replace($search, $replace, $subject)\n{\n return '';\n}", "protected function surround($html): string\n {\n return \"<{$this->surround}>{$html}</{$this->surround}>\";\n }", "public static function substring($text, $length = 100, $replacer='...', $isStriped = true) {\n\t\t\t$string = $isStriped ? strip_tags( $text ) : $text;\n\t\t\treturn JString::strlen($string) > $length ? JString::substr($string, 0, $length) . $replacer : $string;\n\t\t}", "public function insert($substring, $index)\n {\n $stringy = static::create($this->str, $this->encoding);\n if ($index > $stringy->length()) {\n return $stringy;\n }\n\n $start = mb_substr($stringy->str, 0, $index, $stringy->encoding);\n $end = mb_substr($stringy->str, $index, $stringy->length(),\n $stringy->encoding);\n\n $stringy->str = $start . $substring . $end;\n\n return $stringy;\n }", "private static function utf8_substr_replace($original, $replacement, $position, $length) {\n\t\t$startString = mb_substr($original, 0, $position, \"UTF-8\");\n\t\t$endString = mb_substr($original, $position + $length, mb_strlen($original), \"UTF-8\");\n\n\t\t$out = $startString . $replacement . $endString;\n\n\t\treturn $out;\n\t}", "function strReplace($find, $replace, $string)\n{\n\t$string = str_replace($find, $replace, $string, $count);\n\twhile(0 < $count)\n\t{\n\t\t$string = str_replace($find, $replace, $string, $count);\n\t}\n\treturn $string;\n}", "function myTruncateStr($string, $limit, $break=\" \", $pad=\"...\") \n\t\t{\n\t\t\n\t\tif(strlen($string) <= $limit) return $string; \n\t\t// is $break present between $limit and the end of the string?\n\t\tif(false !== ($breakpoint = strpos($string, $break, $limit))) \n\t\t\t{ \n\t\t\t \n\t\t\t\tif($breakpoint < strlen($string) - 1) \n\t\t\t\t{\n\t\t\t\t\t$string = substr($string, 0, $breakpoint) . $pad;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$finalstring=stripslashes($string);\n\t\t\treturn $finalstring;\n\t\t}", "public static function substr_replace($str, $replacement, $offset, $length = NULL)\n\t{\n\t\tif (str::is_ascii($str))\n\t\t\treturn ($length === NULL) ? substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length);\n\n\t\t$length = ($length === NULL) ? mb_strlen($str) : (int) $length;\n\t\tpreg_match_all('/./us', $str, $str_array);\n\t\tpreg_match_all('/./us', $replacement, $replacement_array);\n\n\t\tarray_splice($str_array[0], $offset, $length, $replacement_array[0]);\n\t\treturn implode('', $str_array[0]);\n\t}", "private static function escape($underlinedstring)\n {\n $underlinedstring = str_replace('_', '.', $underlinedstring);\n $underlinedstring = str_replace('-', '..', $underlinedstring);\n $underlinedstring = str_replace('%', '...', $underlinedstring);\n\n return $underlinedstring;\n }", "public function safeTruncate($length, $substring = '')\n {\n $stringy = static::create($this->str, $this->encoding);\n if ($length >= $stringy->length()) {\n return $stringy;\n }\n\n // Need to further trim the string so we can append the substring\n $encoding = $stringy->encoding;\n $substringLength = mb_strlen($substring, $encoding);\n $length = $length - $substringLength;\n\n $truncated = mb_substr($stringy->str, 0, $length, $encoding);\n\n // If the last word was truncated\n if (mb_strpos($stringy->str, ' ', $length - 1, $encoding) != $length) {\n // Find pos of the last occurrence of a space, get up to that\n $lastPos = mb_strrpos($truncated, ' ', 0, $encoding);\n $truncated = mb_substr($truncated, 0, $lastPos, $encoding);\n }\n\n $stringy->str = $truncated . $substring;\n\n return $stringy;\n }", "function str_cut_end(\n string $str,\n string $subString = ' ',\n bool $repeat = false,\n bool $caseSensitive = false\n ) : string {\n return Str::cutEnd($str, $subString, $repeat, $caseSensitive);\n }", "private function ifEmptyReplace( $string, $replacement )\n\t\t{\n\t\t\tif( empty( $string) )\n\t\t\t{\n\t\t\t\t$string = $replacement;\n\t\t\t}\n\t\t\treturn $string;\n\t\t}", "public static function stringReplace($search, $replace, $subject, &$count = null);", "function str_replace($search,$replace,$subject)\n{\n\treturn '';\n}", "public static function wrapStringInSpan(string $string = '', array $attributes = []): string\n {\n if ('' === $string) {\n return '';\n }\n\n if (!empty($attributes)) {\n $attributes = implode(' ', array_map(fn($key, $value) => \"$key=\\\"$value\\\"\", array_keys($attributes), $attributes));\n return \"<span $attributes>$string</span>\";\n } else {\n return \"<span>$string</span>\";\n }\n }", "static private function doWrap($string, $delimiter) {\n $string = trim($string, $delimiter);\n return \"$delimiter$string$delimiter\";\n }", "function shortenString($str, $length)\r\n\t{\r\n\t\treturn substr($str, 0, $length) . (strlen($str) > $length ? \"....\" : \"\");\r\n\t}", "function tep_stri_replace($find, $replace, $string) {\n $parts = explode( strtolower($find), strtolower($string) );\n\n $pos = 0;\n\n foreach( $parts as $key=>$part ){\n $parts[ $key ] = substr($string, $pos, strlen($part));\n $pos += strlen($part) + strlen($find);\n }\n\n return( join( $replace, $parts ) );\n }", "function str_wordwrap(string $string, int $width = 75, string $break = \"\\n\", bool $cut = false): string\n{\n if (!$cut) {\n return wordwrap($string, $width, $break);\n }\n\n /** @thanks http://php.net/wordwrap#107570 */\n $string = preg_replace(\n '~(.{1,' . $width . '})(?:\\s|$)|(.{' . $width . '})~uS',\n '\\1\\2' . $break,\n $string\n );\n\n return trim($string, $break);\n}", "public function replace($start, $end, $string)\n\t{\n\t\t$start = (int) $start;\n\t\t$end = (int) $end;\n\t\t$string = static::_convertString($string, $this->encoding);\n\n\t\tif ($start < 0 || $start >= $this->length() || $end < 0 || $end >= $this->length()) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\t$this->string = mb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t0,\n\t\t\t\t$start,\n\t\t\t\t$this->encoding\n\t\t\t) .\n\t\t\t$string .\n\t\t\tmb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t$end + 1,\n\t\t\t\t$this->length(),\n\t\t\t\t$this->encoding\n\t\t\t);\n\t\treturn $this;\n\t}", "function str_trunc($string, $limit, $break=\" \", $pad=\"...\") {\n $limit -= strlen($pad);\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n }", "public static function replace_string_between(string $string, string $start, string $end, string $replacement) {\n $pos = strpos($string, $start);\n $start = $pos === false ? 0 : $pos + strlen($start);\n $pos = strpos($string, $end, $start);\n $end = $pos === false ? strlen($string) : $pos;\n return substr_replace($string, $replacement, $start, $end - $start);\n }", "function acf_str_replace($string = '', $search_replace = array()) {}", "function str_insert($str, $insert, $pos)\n{\n\t$retstr = \"\";\n\t$len = strlen($str);\n\n\tif ($pos === $len)\n\t{\n\t\t$retstr = $str . $insert;\n\t\treturn ($retstr);\n\t}\n\tfor ($cnt = 0; $cnt < $len; $cnt++)\n\t{\n\t\tif ($cnt == $pos)\n\t\t\t$retstr .= $insert;\n\t\t$retstr .= substr($str, $cnt, 1);\n\t}\n\treturn ($retstr);\n}", "public function getSubString($string, $length=NULL)\n\t{\n\t\tif ($length == NULL)\n\t\t\t$length = 50;\n\t\t//Primero eliminamos las etiquetas html y luego cortamos el string\n\t\t$stringDisplay = substr(strip_tags(utf8_decode($string)), 0, $length);\n\t\t//Si el texto es mayor que la longitud se agrega puntos suspensivos\n\t\tif (strlen(strip_tags($string)) > $length)\n\t\t\t$stringDisplay .= ' ...';\n\t\treturn $stringDisplay;\n\t}", "function hys_chopstring($string,$choplen = 30,$cut = '....') {\n\t\tif (strlen($string) > $choplen) {\n\t\t\t$ashortertitle = strip_tags($string);\n\t\t\t$string = substr_replace($ashortertitle, '', (floor($choplen/2)), strlen($ashortertitle)).$cut.substr_replace($ashortertitle, '', 0, (strlen($ashortertitle)-(floor($choplen/2))));\n\t\t}\n\t\treturn $string;\n\t}", "public static function insert($str, $substring, $index, $encoding = null) {\n $encoding = $encoding ?: mb_internal_encoding();\n\n if ($index > mb_strlen($str, $encoding))\n return $str;\n\n $start = mb_substr($str, 0, $index, $encoding);\n $end = mb_substr($str, $index, mb_strlen($str, $encoding), $encoding);\n\n return $start . $substring . $end;\n }", "function replaceBetween($str, $value, $prefix, $suffix = '') {\n $start = strpos($str, $prefix) + strlen($prefix) ;\n $end = $suffix != '' ? strpos($str, $suffix, $start) : strlen($str);\n $length = $end - $start;\n\n return $length > 0 ? substr_replace($str, $value, $start, $length) : $str;\n}", "public static function subStrTexto($string, $lenght, $start = 0) {\n\t\t$cadenaNueva = $string;\n\t\tif (strlen ( $string ) > $lenght) {\n\t\t\t$cadenaNueva = substr ( $string, $start, $lenght ) . '...';\n\t\t}\n\t\treturn $cadenaNueva;\n\t}", "function lstring_replace($string_in, $string_what, $string_with)\n\t{\n\t\treturn str_replace($string_what, $string_with, $string_in);\n\t}", "private static function replaceBracket($string)\n {\n $string = str_replace('[', '<strong>', $string);\n $string = str_replace(']', '</strong>', $string);\n\n return $string;\n }", "public function addSubStrReplacement($value, $replacement): void\n {\n $this->subStrReplacements[$value] = $replacement;\n }", "static function shorten($string, $length = \"30\", $closure = \"...\"){\n $sh = substr($string, 0, $length);\n $sh .= (strlen($string) > $length)? $closure : \"\";\n return $sh;\n }", "function str_ireplace($search, $replace, $subject)\n{\n return '';\n}", "public function ensureRight($substring)\n {\n $stringy = static::create($this->str, $this->encoding);\n\n if (!$stringy->endsWith($substring)) {\n $stringy->str .= $substring;\n }\n\n return $stringy;\n }", "public static function truncate($string, $length = 80, $etc = '...',$break_words = false, $middle = false) {\n\t\tif ($length == 0)\n\t\t\treturn '';\n\t\tif (strlen($string) > $length) {\n\t\t\t$length -= min($length, strlen($etc));\n\t\t\tif (!$break_words && !$middle) {\n\t\t\t\t$string = preg_replace('/\\s+?(\\S+)?$/', '', substr($string, 0, $length+1));\n\t\t\t}\n\t\t\tif(!$middle) {\n\t\t\t\treturn substr($string, 0, $length) . $etc;\n\t\t\t} else {\n\t\t\t\treturn substr($string, 0, $length/2) . $etc . substr($string, -$length/2);\n\t\t\t}\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}", "function string_replace(string $subject, $find, $replace, int $flags = STRING_FIND_ALL): string\n{\n if (($flags & (STRING_FIND_FIRST | STRING_FIND_LAST)) === 0) {\n return \\str_replace($subject, $find, $replace);\n }\n\n $position = string_find_position($subject, $find, $flags);\n\n if ($position === -1) {\n return $subject;\n }\n\n return ($flags & STRING_BINARY) !== 0\n ? \\substr_replace($subject, $replace, $position, \\strlen($find))\n : \\mb_substr($subject, 0, $position) . $replace . \\mb_substr($subject, $position + \\mb_strlen($find));\n}", "function str_format($string, $template) {\n\n\t$result = '';\n\t$fpos = $spos = 0;\n\n\twhile ((strlen($template) - 1) >= $fpos) {\n\t\tif (ctype_alnum(substr($template, $fpos, 1))) {\n\t\t\t$result .= substr($string, $spos, 1);\n\t\t\t$spos++;\n\t\t} else {\n\t\t\t$result .= substr($template, $fpos, 1);\n\t\t}\n\t\t$fpos++;\n\t}\n\t\n\treturn $result;\n}", "function str_lreplace($search, $replace, $subject) {\n\t $pos = strrpos($subject, $search);\n\t if ($pos !== false) {\n\t $subject = substr_replace($subject, $replace, $pos, strlen($search));\n\t }\n\t return $subject;\n\t}", "function str_tease(string $string, $length = 200, $moreTextIndicator = '...')\n{\n $string = trim($string);\n\n //remove html\n $string = strip_tags($string);\n\n //replace multiple spaces\n $string = preg_replace(\"/\\s+/\", ' ', $string);\n\n if (strlen($string) == 0) {\n return '';\n }\n\n if (strlen($string) <= $length) {\n return $string;\n }\n\n $ww = wordwrap($string, $length, \"\\n\");\n\n $string = substr($ww, 0, strpos($ww, \"\\n\")).$moreTextIndicator;\n\n return $string;\n}", "function myTruncate($string, $limit, $break=\" \", $pad=\"...\"){\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1)\n $string = substr($string, 0, $breakpoint) . $pad;\n\n return $string;\n }\n }", "private function ellipsis( $string, $length ) {\n\t\tif ( $length < 3 ) {\n\t\t\t$length = 3;\n\t\t}\n\t\tif ( mb_strlen( $string ) > $length ) {\n\t\t\t$string = mb_substr( $string, 0, $length - 3 ) . '...';\n\t\t}\n\n\t\treturn $string;\n\t}", "public function strtrunc($string, $length = 0, $findlastword = true, $trails = false){\n\t\t\t\t\t\t\t\tif ((strlen($string)>$length) && (strlen($string)>1)){ //Makes sure string is at least as long as $length\n\t\t\t\t\t\t\t\t\t\t\t\t//If we are finding last word before cutoff then we find where the first whitespace is starting from the end of $length\n\t\t\t\t\t\t\t\t\t\t\t\t$whitespacepos = ($findlastword ? strpos($string, ' ', $length) : 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$whitespacepos = ($whitespacepos ? strlen($string) > $length ? 25 : strlen($string) : $whitespacepos);\n\t\t\t\t\t\t\t\t\t\t\t\t$string = substr($string, 0, $whitespacepos);\n\t\t\t\t\t\t\t\t\t\t\t\t$string = ($trails ? $string.'&hellip;' : $string);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn $string;\n\t\t\t\t}", "private function str_replace_once($find, $replace, $subject){\n\t\tif($pos = strpos($subject, $find)){\n\t\t\treturn substr($subject, 0, $pos) . $replace . substr($subject, $pos + strlen($find));\n\t\t}else{\n\t\t\treturn $subject;\n\t\t}\n\t}", "function wordwrap($string, $width = 75, $break = \"\\n\", $cut = false)\n{\n return '';\n}", "function tep_break_string($string, $len, $break_char = '-') {\n $l = 0;\n $output = '';\n for ($i=0, $n=strlen($string); $i<$n; $i++) {\n $char = substr($string, $i, 1);\n if ($char != ' ') {\n $l++;\n } else {\n $l = 0;\n }\n if ($l > $len) {\n $l = 1;\n $output .= $break_char;\n }\n $output .= $char;\n }\n\n return $output;\n }", "public static function cropString ($string = NULL, $maxLength = 100, $hardCrop = FALSE, $endWith = '. . .')\n\t{\n\t\treturn mb_strlen($string)>$maxLength ? mb_substr($string,0,($hardCrop==FALSE) ? mb_strrpos(mb_substr($string, 0, $maxLength),' ') : $maxLength ) . $endWith : $string;\n\t}", "public function SelfCutString(string $string, int $start_char, string $length, string $end = \"...\"): string {\n if( strlen( $string ) <= $length ) return $string;\n $str = mb_substr( $string, $start_char, $length - strlen( $end ) + 1, 'UTF-8');\n return substr( $str, 0, strrpos( $str,' ') ). ' ' .$end;\n }", "function str_cut_start(\n string $str,\n string $subString = ' ',\n bool $repeat = false,\n bool $caseSensitive = false\n ) : string {\n return Str::cutStart($str, $subString, $repeat, $caseSensitive);\n }", "function partstr($str, $length) \n\t{\n\t\treturn (strlen($str)>$length) ? substr($str, 0, $length).\"...\" : $str;\n\t}", "public function subString($s, $pos, $len)\r\r\n\t{\r\r\n\t\treturn \"SUBSTRING($s, $pos, $len)\";\r\r\n\t}", "function cutString($string)\n\t{\n\t\tif (strlen($string) > 160) {\n\t\t\treturn substr(strip_tags($string), 0, 160) . '[...]';\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}", "public static function myTruncate($string, $limit, $break = \" \", $pad = \"…\") {\n // return with no change if string is shorter than $limit\n if (strlen($string) <= $limit)\n return $string;\n // is $break present between $limit and the end of the string?\n if (false !== ($breakpoint = strpos($string, $break, $limit))) {\n if ($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n } return $string;\n }", "public function getSubString($string, $length=NULL)\n{\n //Si no se especifica la longitud por defecto es 50\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}", "public function replace_placeholders($string)\n {\n }", "function shorten($string, $length) {\n $str = str_replace(\"\\n\", ' ', $string);\n $str = str_replace(' <==> ', ' (==) ', $str);\n $str = strip_tags($str);\n if (strlen($str) > $length) {\n $str = substr($str, 0, strrpos(substr($str, 0, $length - 3), ' '));\n $str .= '...';\n }\n $str = str_replace(' (==) ', ' <==> ', $str);\n return $str;\n}", "function string_keyword($string, $keyword, $before = 80, $after = 80) {\n\t$length = mb_strlen ( $string, 'UTF8' );\n\t$pos = mb_strpos ( $string, $keyword, 0, \"utf-8\" );\n\tif ($pos - $before > 0 && $pos + $after < $length) {\n\t\treturn \"...\" . mb_substr ( $string, $pos - $before, $before + $after, 'UTF-8' ) . \"...\";\n\t}\n\tif ($pos - $before < 0 && $pos + $after < $length) {\n\t\treturn mb_substr ( $string, 0, $before + $after, 'UTF-8' ) . \"...\";\n\t}\n\tif ($pos - $before > 0 && $pos + $after > $length) {\n\n\t\t$before3 = $length - $after;\n\t\tif ($before3 < 0) {\n\t\t\t$before3 = 0;\n\t\t}\n\t\treturn \"...\" . mb_substr ( $string, $before3, $before + $after, 'UTF-8' );\n\t}\n\treturn $string;\n}", "function str_lreplace($search, $replace, $subject)\n\t{\n\t\t$pos = strrpos($subject, $search);\n\n\t\tif($pos === false)\n\t\t{\n\t\t\treturn $subject;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn substr_replace($subject, $replace, $pos, strlen($search));\n\t\t}\n\t}", "function replaceAll($string) {\n\tif (strpos($string, '#') !== false) {\n\t\t$anchor = strpos($string, '#');\n\t\t$result = substr($string, 0, $anchor);\n\t\treturn $result;\n\t} else {\n\t\treturn $string;\n\t}\n}", "public function replace(string|\\Stringable $search, string|\\Stringable $replacement): self\n {\n if (!$this->contains($search)) {\n return $this;\n }\n\n $parts = $this\n ->split((string) $search)\n ->map(static fn($v) => $v->toString());\n\n return self::of((string) $replacement, $this->encoding)->join($parts);\n }", "public static function replace($string, $replace, $with)\n {\n return str_replace($replace, $with, $string);\n }", "public static function format($string, $template) {\n\t\t$result = ''; \n\t\t$fpos = 0; \n\t\t$spos = 0;\n\t\twhile ((strlen($template) - 1) >= $fpos) {\n\t\t\tif (ctype_alnum(substr($template, $fpos, 1))) {\n\t\t\t\t$result .= substr($string, $spos, 1);\n\t\t\t\t$spos++;\n\t\t\t} else {\n\t\t\t\t$result .= substr($template, $fpos, 1);\n\t\t\t}\n\t\t\t$fpos++;\n\t\t}\n\t\t\n\t\treturn $result;\t\n\t}", "public static function truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false) {\n if ($length == 0) {\n return '';\n }\n // no MBString fallback\n if (isset($string[$length])) {\n $length -= min($length, strlen($etc));\n if (!$break_words && !$middle) {\n $string = preg_replace('/\\s+?(\\S+)?$/', '', substr($string, 0, $length + 1));\n }\n if (!$middle) {\n return substr($string, 0, $length) . $etc;\n }\n\n return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2);\n }\n\n return $string;\n }", "public static function cutString($string, $maxlen)\n {\n $len = (mb_strlen($string) > $maxlen)\n ? mb_strripos(mb_substr($string, 0, $maxlen), ' ')\n : $maxlen\n ;\n $cutStr = strip_tags(mb_substr($string, 0, $len));\n\n return (mb_strlen($string) > $maxlen)\n ? $cutStr.'...'\n : $cutStr\n ;\n }", "public static function myTruncate($string, $limit, $break=\".\", $pad=\"...\"){\n // return with no change if string is shorter than $limit\n if(strlen($string) <= $limit) return $string;\n\n // is $break present between $limit and the end of the string?\n if(false !== ($breakpoint = strpos($string, $break, $limit))) {\n if($breakpoint < strlen($string) - 1) {\n $string = substr($string, 0, $breakpoint) . $pad;\n }\n }\n return $string;\n }", "public function midClip($value, $max_length = 80)\n {\n if (is_array($value) || is_object($value)) {\n foreach ($value as $_key => &$_value) {\n $_value = $this->midClip($_value, $max_length);\n }\n unset($_key, $_value); // Housekeeping.\n\n return $value;\n }\n if (!($string = (string) $value)) {\n return $string; // Empty.\n }\n $max_length = max(4, $max_length);\n\n $string = strip_tags($string);\n $string = preg_replace('/\\s+/u', ' ', strip_tags($string));\n $string = trim($string); // Trim it up now.\n\n if (mb_strlen($string) <= $max_length) {\n return $string; // Nothing to do.\n }\n $full_string = $string;\n $half_max_length = floor($max_length / 2);\n\n $first_clip = $half_max_length - 3;\n $string = $first_clip >= 1 // Something?\n ? mb_substr($full_string, 0, $first_clip).'...'\n : '...'; // Ellipsis only.\n\n $second_clip = mb_strlen($full_string) - ($max_length - mb_strlen($string));\n $string .= $second_clip >= 0 && $second_clip >= $first_clip\n ? mb_substr($full_string, $second_clip) : '';\n\n return $string;\n }", "function replaceRepeatedChars($string, $char, $replacement)\r\n\t{\r\n\t\t$pos = strpos($string, $char);\r\n\t\tif ($pos !== false) {\r\n\t\t\t$string = str_replace($char, $replacement, $string);\r\n\t\t\t$string = UrlControllerStrings::replaceRepeatedChars($string, $char, $replacement);\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "public static function secureString($string, $privateInfo, $padWith = 'x')\n {\n $result = $string;\n\n if (empty($privateInfo)) {\n return $result;\n }\n\n if (!is_array($privateInfo)) {\n $privateInfo = array($privateInfo);\n }\n\n foreach ($privateInfo as $privateString) {\n $replacement = str_repeat($padWith, strlen($privateString));\n $result = str_replace($privateString, $replacement, $result);\n }\n\n return $result;\n }", "protected function replacePlaceholders($str)\n {\n $newStr = $str;\n $newStr = $this->_processPlaceholderConditionals($newStr, $this->_contentData);\n foreach($this->_placeholders as $placeholder => $value) {\n if (array_key_exists($value, $this->_contentData)) {\n $newStr = str_replace(\"{{\".$placeholder.\"}}\", $this->_contentData[$value], $newStr);\n }\n }\n return $newStr;\n }", "function shapeSpace_truncate_string_at_word($string, $limit, $break = \".\", $pad = \"...\") { \n\t\n\tif (strlen($string) <= $limit) return $string;\n\t\n\tif (false !== ($max = strpos($string, $break, $limit))) {\n\t\t\n\t\tif ($max < strlen($string) - 1) {\n\t\t\t\n\t\t\t$string = substr($string, 0, $max) . $pad;\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $string;\n\t\n}" ]
[ "0.7087388", "0.6153878", "0.61016583", "0.5854562", "0.58337754", "0.5829651", "0.5829651", "0.5829651", "0.58045906", "0.57741404", "0.5755056", "0.566231", "0.56399685", "0.5476366", "0.5417529", "0.537258", "0.53613245", "0.5354706", "0.5345386", "0.53438056", "0.5337483", "0.5286545", "0.52784604", "0.5275842", "0.52472353", "0.52402186", "0.52365124", "0.5221564", "0.5196446", "0.5185236", "0.5180056", "0.51642555", "0.5163922", "0.5144042", "0.51245505", "0.51233375", "0.512026", "0.51112664", "0.5110426", "0.5100706", "0.5099043", "0.508976", "0.50872517", "0.50844646", "0.5071258", "0.5070882", "0.50708115", "0.5057507", "0.504003", "0.50386345", "0.50385267", "0.50226176", "0.4998301", "0.4992614", "0.49790758", "0.49772212", "0.4973294", "0.4964044", "0.49639988", "0.49618807", "0.49478373", "0.4945903", "0.49332067", "0.49237144", "0.4919732", "0.49110228", "0.49063736", "0.4902965", "0.48950216", "0.48944262", "0.48866898", "0.48748568", "0.4872041", "0.48716122", "0.4857335", "0.48569295", "0.48535848", "0.48501423", "0.48481247", "0.48450163", "0.4839614", "0.48364842", "0.48335713", "0.48303556", "0.482516", "0.48161277", "0.48121727", "0.48115626", "0.47987348", "0.47895625", "0.47872204", "0.47830233", "0.47818434", "0.4781823", "0.4781172", "0.47784147", "0.47721776", "0.47676754", "0.47669038", "0.47617605" ]
0.7919497
0
Inserts $substring into $str at the $index provided.
Вставляет $substring в $str на позиции $index.
public static function insert($str, $substring, $index, $encoding = null) { $encoding = $encoding ?: mb_internal_encoding(); if ($index > mb_strlen($str, $encoding)) return $str; $start = mb_substr($str, 0, $index, $encoding); $end = mb_substr($str, $index, mb_strlen($str, $encoding), $encoding); return $start . $substring . $end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($substring, $index)\n {\n $stringy = static::create($this->str, $this->encoding);\n if ($index > $stringy->length()) {\n return $stringy;\n }\n\n $start = mb_substr($stringy->str, 0, $index, $stringy->encoding);\n $end = mb_substr($stringy->str, $index, $stringy->length(),\n $stringy->encoding);\n\n $stringy->str = $start . $substring . $end;\n\n return $stringy;\n }", "public function insert($string, $index) {\n if($string instanceof AdvanceStringProcesser) {\n $string = $string->get();\n }\n return new AdvanceStringProcesser(PortableStringProcesser::insert($this->_s, $string, $index, $this->_encoding), $this->_encoding);\n }", "public function afterSubstringAt($index);", "function str_insert($str, $insert, $pos)\n{\n\t$retstr = \"\";\n\t$len = strlen($str);\n\n\tif ($pos === $len)\n\t{\n\t\t$retstr = $str . $insert;\n\t\treturn ($retstr);\n\t}\n\tfor ($cnt = 0; $cnt < $len; $cnt++)\n\t{\n\t\tif ($cnt == $pos)\n\t\t\t$retstr .= $insert;\n\t\t$retstr .= substr($str, $cnt, 1);\n\t}\n\treturn ($retstr);\n}", "function str_insert($insertstring, $intostring, $offset){\n\t\t$part1 = substr($intostring, 0, $offset);\n\t\t$part2 = substr($intostring, $offset);\n\t\t$part1 = $part1 . $insertstring;\n\t\t$whole = $part1 . $part2;\n\t\treturn $whole;\n\t}", "public function beforeSubstringAt($index);", "public static function shift(&$string, $index = 1)\n {\n $substr = substr($string, 0, $index);\n $string = substr($string, $index);\n return $substr;\n }", "function _string_shift(&$string, $index = 1)\n {\n $substr = substr($string, 0, $index);\n $string = substr($string, $index);\n return $substr;\n }", "public function substitute(string $string, string $old, string $new, ?int $replaceAtIndex = null): string;", "public function substringAt($index);", "private function &insert_str($offset, &$str) {\n if(is_null($str)) {\n $str = mb_convert_encoding(\"ASCII\",\"UTF-8\",\"null\");\n }\n\n $tmp_start = array();\n $tmp_end = array();\n\n $offset = intval($offset);\n\n if($offset < 0 || $offset > $this->length()) {\n throw new \\OutOfBoundsException(\"Offset is out of bounds.\");\n }\n $tmp_start = array_slice($this->buffer, 0, $offset);\n $tmp_end = array_slice($this->buffer, $offset);\n\n $this->buffer = array_merge($tmp_start, str_split($str), $tmp_end);\n return $this;\n }", "public function insert($offset, $string)\n\t{\n\t\t$offset = (int) $offset;\n\t\t$string = static::_convertString($string, $this->encoding);\n\n\t\tif ($offset < 0 || $offset >= $this->length()) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\t$this->string = mb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t0,\n\t\t\t\t$offset,\n\t\t\t\t$this->encoding\n\t\t\t) .\n\t\t\t$string .\n\t\t\tmb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t$offset,\n\t\t\t\t$this->length(),\n\t\t\t\t$this->encoding\n\t\t\t);\n\t\treturn $this;\n\t}", "public function str_insert_i(string $insert, int $position): self\n {\n $insert = $this->inputConv($insert);\n $this->str = substr_replace($this->str, $insert, $position << 2, 0);\n\n return $this;\n }", "public static function mb_insert_str($str, $insStr, $insPos, $encoding = self::enc){\n\t\t$strWidth = mb_strlen($str, $encoding);\n\t\t$strStart = mb_substr($str, 0, $insPos, $encoding);\n\t\t$strEnd = mb_substr($str, $insPos, $strWidth - $insPos, $encoding);\n\t\treturn \"{$strStart}{$insStr}{$strEnd}\";\n\t}", "public static function surround($str, $substring) {\n return implode('', array($substring, $str, $substring));\n }", "function insertSymbol($string, $position, $symbol) {\r\n $length=strlen($string);\r\n $temp1=substr($string,0,$position); //yyyy\r\n\t$temp2=substr($string,$position,$length);\r\n $rest=$temp1.$symbol.$temp2; \r\n\treturn $rest;\r\n}", "public function insertAfterStr($repeater, $times, $string){//I don't have the courage to pass by reference\n\t\twhile($times>0){\n\t\t\t$string.=$repeater;\n\t\t\t$times--;\n\t\t}\n\t\treturn $string;\n\t}", "public function insert_letter($letter, $pos) {\r\n $this->text = substr_replace($this->text, $letter, $pos, 0);\r\n $inserted = array( 'insert' );\r\n array_splice( $this->operations, $pos, 0, $inserted );\r\n }", "public static function getNextTextElement($str, $index) { }", "function charAt($string, $index)\n{\n if (!is_string($string)) {\n throw new TypeError(\"String parameter must be of string type\");\n } elseif (!is_int($index)) {\n throw new TypeError(\"Index parameter must be integer\");\n } elseif ($index < 0) {\n throw new OutOfRangeException(\"Index parameter must be non-negative\");\n } elseif ($index >= strlen($string)) {\n throw new OutOfRangeException(\"Index parameter must be less than the length of the string parameter\");\n }\n\n return $string[$index];\n}", "public static function substrReplace($string, $replace, $offset = 0, $length = null)\n {\n }", "function insertNum($str = null)\r\n{\r\n if (empty($str)) {\r\n echo \"Input is not set or empty <br>\";\r\n return \"\";\r\n }\r\n $str_result = \"\"; // target String\r\n $cur_pos_str = 0; // current possion of str\r\n $cur_num = 1; // current number\r\n $str_length = strlen($str);\r\n while ($cur_pos_str < $str_length) {\r\n // insert number and substring in OriginString to targetString\r\n $str_result .= $cur_num . substr($str, $cur_pos_str, $cur_num);\r\n // update current possion and current number\r\n $cur_num++;\r\n $cur_pos_str += $cur_num - 1;\r\n }\r\n // insert final number\r\n $str_result .= $cur_num;\r\n return $str_result;\r\n}", "public function at($index)\n {\n return $this->substr($index, 1);\n }", "public static function pop(&$string, $index = 1)\n {\n $substr = substr($string, -$index);\n $string = substr($string, 0, -$index);\n return $substr;\n }", "public static function substring_index()\n\t{\n\t}", "public function addStringForIndex($sharedString, $sharedStringIndex)\n {\n if (!$this->isCacheClosed) {\n $this->inMemoryCache->offsetSet($sharedStringIndex, $sharedString);\n }\n }", "function substr_replace($string, $replacement, $start, $length = NULL)\n{\n}", "public static function substr_replace($str, $replacement, $offset, $length = NULL)\n\t{\n\t\tif (str::is_ascii($str))\n\t\t\treturn ($length === NULL) ? substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length);\n\n\t\t$length = ($length === NULL) ? mb_strlen($str) : (int) $length;\n\t\tpreg_match_all('/./us', $str, $str_array);\n\t\tpreg_match_all('/./us', $replacement, $replacement_array);\n\n\t\tarray_splice($str_array[0], $offset, $length, $replacement_array[0]);\n\t\treturn implode('', $str_array[0]);\n\t}", "public function substring($startIndex, $length = 0){\n\t\treturn new Customweb_Core_String($this->getCharset()->getSubstring($this->string, $startIndex, $length), $this->getCharset(), true);\n\t}", "public static function substrReplace(string $string, string $replacement, int $start, int $length): string\n {\n return mb_substr($string, 0, $start) . $replacement . mb_substr($string, $start + $length);\n }", "public function deleteCharAt($index)\n\t{\n\t\t$index = (int) $index;\n\t\tif ($index < 0 || $index >= $this->length()) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\t$this->string = mb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t0,\n\t\t\t\t$index,\n\t\t\t\t$this->encoding\n\t\t\t) .\n\t\t\tmb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t$index + 1,\n\t\t\t\t$this->length(),\n\t\t\t\t$this->encoding\n\t\t\t);\n\t\treturn $this;\n\t}", "public static function insert_before(string $str, string $insert, string $after): string {\n return substr_replace($str, $insert, self::position_of($str, $after, false), 0);\n }", "private static function InsertCharacterAtRandomPositions($string, $character, $spacing = 3)\n {\n $zero_font_counts = floor(strlen($string) / $spacing) + 1;\n $insertion_indexes = range(0, strlen($string));\n shuffle($insertion_indexes);\n $insertion_indexes = array_slice($insertion_indexes, 0, $zero_font_counts);\n rsort($insertion_indexes);\n foreach ($insertion_indexes as $position) {\n $needle = is_callable($character) ? $character() : $character;\n $string = substr_replace($string, $needle, $position, 0);\n }\n return $string;\n }", "public static function charAt($str, $pos)\n {\n return self::substr($str, $pos, 1);\n }", "public function stdWrap_substring() {}", "public function addStringForIndex($sharedString, $sharedStringIndex)\n {\n $tempFilePath = $this->getSharedStringTempFilePath($sharedStringIndex);\n\n if (!$this->globalFunctionsHelper->file_exists($tempFilePath)) {\n if ($this->tempFilePointer) {\n $this->globalFunctionsHelper->fclose($this->tempFilePointer);\n }\n $this->tempFilePointer = $this->globalFunctionsHelper->fopen($tempFilePath, 'w');\n }\n\n // The shared string retrieval logic expects each cell data to be on one line only\n // Encoding the line feed character allows to preserve this assumption\n $lineFeedEncodedSharedString = $this->escapeLineFeed($sharedString);\n\n $this->globalFunctionsHelper->fwrite($this->tempFilePointer, $lineFeedEncodedSharedString . PHP_EOL);\n }", "public static function substrReplace($string, $replace, $offset = 0, $length = null)\n {\n if ($length === null) {\n $length = strlen($string);\n }\n\n return substr_replace($string, $replace, $offset, $length);\n }", "public function at($index);", "public function splitInjection($str, $length = 50, $needle = '-', $insert = ' ')\n {\n $str = $this->str_split($str, $length);\n $newStr = '';\n foreach ($str as $part) {\n if ($this->strlen($part) >= $length) {\n $lastDelimetr = $this->strpos($this->strrev($part), $needle);\n $tmpNewStr = '';\n $tmpNewStr = $this->substr($this->strrev($part), 0, $lastDelimetr)\n . $insert . $this->substr($this->strrev($part), $lastDelimetr);\n $newStr .= $this->strrev($tmpNewStr);\n } else {\n $newStr .= $part;\n }\n }\n return $newStr;\n }", "function checkString($loc, $substring) {\n if (stristr($loc, $substring) === false) {\n $loc .= \", $substring\";\n }\n return $loc;\n }", "function start($str, $token)\n {\n return $token . ltrim($str, $token);\n }", "public function insertAt($index, $item)\n\t{\n\t\tif ($index === $this->_c) {\n\t\t\t$this->_d[$this->_c++] = $item;\n\t\t} elseif ($index >= 0 && $index < $this->_c) {\n\t\t\tarray_splice($this->_d, $index, 0, array($item));\n\t\t\t$this->_c++;\n\t\t} else {\n\t\t\tthrow new InvalidParamException('Index out of range: ' . $index);\n\t\t}\n\t}", "function removeChar($tempString,$index){\n\t$part1 =substr($tempString,0, $index);\n\t$part2= substr($tempString, $index+1,strlen($tempString));\n\nreturn $part1 . $part2; \n}", "public function insert($offset, $part);", "public static function insert_at_index(&$array, $index, $val){\r\n \r\n $size = count($array); //because I am going to use this more than one time\r\n \r\n if (!is_int($index) || $index < 0 || $index > $size){\r\n return -1;\r\n }\r\n else{\r\n $temp = array_slice($array, 0, $index);\r\n $temp[] = $val;\r\n $array = array_merge($temp, array_slice($array, $index, $size));\r\n }\r\n }", "public function addAt(int $index, string $item): self\n {\n array_splice($this->items, $index, 0, $item);\n\n return $this;\n }", "public function surround($substring)\n {\n $str = implode('', array($substring, $this->str, $substring));\n\n return static::create($str, $this->encoding);\n }", "public function subString($s, $pos, $len)\r\r\n\t{\r\r\n\t\treturn \"SUBSTRING($s, $pos, $len)\";\r\r\n\t}", "private function parseSingle( $key, $value, $string, $index = null )\n\t{\n\t\tif( isset( $index ) )\n\t\t{\n\t\t\t$string = str_replace( $this->l_delim . '%index%' . $this->r_delim, $index, $string );\n\t\t}\n\t\treturn str_replace( $this->l_delim . $key . $this->r_delim, $value, $string );\n\t}", "public static function subStrTexto($string, $lenght, $start = 0) {\n\t\t$cadenaNueva = $string;\n\t\tif (strlen ( $string ) > $lenght) {\n\t\t\t$cadenaNueva = substr ( $string, $start, $lenght ) . '...';\n\t\t}\n\t\treturn $cadenaNueva;\n\t}", "public function insertElementAt($obj, $index)\n {\n $this->testTypeParameters($obj);\n if ($index > $this->elementCount) {\n throw new ArrayIndexOutOfBoundsException(\n $index . '>=' . $this->elementCount);\n }\n $this->ensureCapacityHelper($this->elementCount + 1);\n System::arraycopy($this->elementData, $index, $this->elementData,\n $this->elementCount - 1, $index);\n $this->elementData[$index] = $obj;\n $this->elementCount++;\n }", "public function insert($index, $element) {\n $this->rangeCheckForAdd($index);\n\n if ($index == 0) {\n $newElementData = array($element);\n ThinUtil::arraycopy($this->elementData, 0, $newElementData, 1, $this->size);\n $this->elementData = $newElementData;\n $this->size++;\n } else if ($index == $this->size) {\n $this->elementData[$this->size++] = $element;\n } else {\n $newElementData = array();\n ThinUtil::arraycopy($this->elementData, 0, $newElementData, 0, $index);\n $newElementData[$index] = $element;\n ThinUtil::arraycopy($this->elementData, $index, $newElementData, $index + 1, $this->size - $index);\n $this->elementData = $newElementData;\n $this->size++;\n }\n }", "public function addAt($index, $element)\n {\n $this->insertElementAt($element, $index);\n }", "public function position( $substr, $value )\n {\n $value = $this->getIdentifier( $value );\n return \"INSTR( {$value}, '{$substr}' )\";\n }", "public static function mask(string $string, string $character, int $index, ?int $length = null, string $encoding = 'UTF-8'): string\n {\n if ($character === '') {\n return $string;\n }\n\n $segment = mb_substr($string, $index, $length, $encoding);\n\n if ($segment === '') {\n return $string;\n }\n\n $strlen = mb_strlen($string, $encoding);\n $startIndex = $index;\n\n if ($index < 0) {\n $startIndex = $index < -$strlen ? 0 : $strlen + $index;\n }\n\n $start = mb_substr($string, 0, $startIndex, $encoding);\n $segmentLen = mb_strlen($segment, $encoding);\n $end = mb_substr($string, $startIndex + $segmentLen);\n\n return $start . str_repeat(mb_substr($character, 0, 1, $encoding), $segmentLen) . $end;\n }", "public static function char_at($str, $pos)\n {\n return (substr($str, $pos, 1) !== false) ? substr($str, $pos, 1) : - 1;\n }", "public function &replace($start, $end, $str) {\n $start = intval($start);\n $end = intval($end);\n\n $tmp_start = array();\n $tmp_end = array();\n\n\n if($start < 0 || $start > $this->length() || $start > $end) {\n throw new \\OutOfBoundsException(\"Start index is out of bounds.\");\n }\n\n if($end <= $this->length()) {\n $tmp_end = array_slice($this->buffer, $end);\n }\n\n if($start > 0) {\n $tmp_start = array_slice($this->buffer, 0, $start, true);\n }\n\n $this->buffer = array_merge($tmp_start, $this->split($str), $tmp_end);\n return $this;\n }", "public function apply($str)\n {\n $str = $this->parse($str);\n\n return $this->start() . $str . $this->end();\n }", "function replaceSubString(string $replace, int $offset = 0, ?int $length = null): Closure\n{\n /**\n * @param string $string\n * @return string\n */\n return function (string $string) use ($replace, $offset, $length): string {\n return $length\n ? \\substr_replace($string, $replace, $offset, $length)\n : \\substr_replace($string, $replace, $offset);\n };\n}", "public function char($index) {\n return new AdvanceStringProcesser(PortableStringProcesser::char($this->_s, $index, $this->_encoding), $this->_encoding);\n }", "function utf8_substr_replace($string, $replacement, $start, $length = 0)\n {\n $ret = '';\n if ($start > 0)\n $ret .= utf8_substr($string, 0, $start);\n $ret .= $replacement;\n $ret .= utf8_substr($string, $start + $length);\n return $ret;\n }", "public function setCharAt($idx, $chr) {\n if($idx < 0 || $idx > $this->length()) {\n throw new \\OutOfBoundsException(\"Index out of bounds.\");\n }\n\n $this->buffer[$idx] = $chr;\n }", "public function replace($offset, $replacement);", "public static function replaceNth( string $search, string $replace, string $subject, int $nth ) : string\n {\n $found = preg_match_all(\n '/'.preg_quote( $search ).'/',\n $subject,\n $matches,\n PREG_OFFSET_CAPTURE);\n if ( false !== $found && $found > $nth ) {\n return substr_replace(\n $subject,\n $replace,\n $matches[ 0 ][ $nth ][ 1 ],\n strlen( $search )\n );\n }\n return $subject;\n }", "public function replace($start, $end, $string)\n\t{\n\t\t$start = (int) $start;\n\t\t$end = (int) $end;\n\t\t$string = static::_convertString($string, $this->encoding);\n\n\t\tif ($start < 0 || $start >= $this->length() || $end < 0 || $end >= $this->length()) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\t$this->string = mb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t0,\n\t\t\t\t$start,\n\t\t\t\t$this->encoding\n\t\t\t) .\n\t\t\t$string .\n\t\t\tmb_substr(\n\t\t\t\t$this->string,\n\t\t\t\t$end + 1,\n\t\t\t\t$this->length(),\n\t\t\t\t$this->encoding\n\t\t\t);\n\t\treturn $this;\n\t}", "public function string($x, $y, $string)\n {\n $len = strlen($string);\n for ($i =0; $i < $len; $i++) {\n $pos = $x + $i;\n $this->chr($pos, $y, $string[$i]);\n }\n }", "function insert($index, $item);", "public function addAt(string $data, int $index): void\n {\n $count = $this->count;\n\n if ($index > $count) {\n throw new RuntimeException(sprintf(\n 'Data cannot be added to linked list index \"%s\" which has \"%s\" nodes.',\n $index,\n $count\n ));\n }\n\n $newNode = new Node($data);\n if ($index === 0) {\n // First node\n $this->addFirst($data);\n } elseif ($index === $count) {\n // Last node\n $this->addLast($data);\n } else {\n // Node between first and last node\n\n $node = $this->firstNode;\n $i = 0;\n\n while ($node->next !== null) {\n // If next node should be new node index\n if ($i + 1 === $index) {\n // New node needs to show where current node showed before\n $newNode->next = $node->next;\n // Current node shows to new node\n $node->next = $newNode;\n // Increment node counter and exit function\n $this->count++;\n return;\n }\n\n $node = $node->next;\n $i++;\n }\n }\n }", "protected function getOneSegmentFromText($index)\n {\n return substr($this->data, $index, 1);\n }", "public function string_shift(&$str) {\n\t\t$char = $str[0];\n\t\t$str = substr($str, 1);\n\t\treturn $char;\n\t}", "public function insert($object, int $index) : bool;", "public static function stringReplace($search, $replace, $subject, &$count = null);", "function substr_replace($string, $replacement, $start, $length = null)\n{\n return '';\n}", "public function word($index) {\n return PortableStringProcesser::word($this->_s, $index, $this->_encoding);\n }", "public function insert($index, $value)\n {\n $this->checkType($value);\n\n return parent::insert($index, $value);\n }", "function substr_replace($string,$replacement,$start,$length=NULL)\n{\n\treturn '';\n}", "public function offsetSet(mixed $idx, mixed $char): void\n {\n $this->setAt($idx, $char);\n }", "function str_start($str, $start)\n {\n if (! starts_with($str, $start)) {\n return $start . $str;\n }\n\n return $str;\n }", "static public function add($string, $location, $delimiter = '%') {\n $delimiter = self::clipDelimiter($delimiter);\n switch ($location) {\n case 'before':\n case 'start':\n $string = self::doBefore($string, $delimiter);\n break;\n case 'after':\n case 'end':\n $string = self::doAfter($string, $delimiter);\n break;\n case 'both':\n case 'wrap':\n $string = self::doWrap($string, $delimiter);\n break;\n }\n return $string;\n }", "public static function sliceTo($string, $slice)\n {\n $slice = strpos($string, $slice);\n\n return substr($string, 0, $slice);\n }", "public function func_substring($fieldname, $startat = 0, $length = 0)\n {\n return \"SUBSTRING($fieldname, $startat\".($length != 0 ? \", $length\" : '').')';\n }", "static function replaceNth(string $search, string $replace, string $subject, int $occurrence)\n\t{\n\t\t$search = preg_quote($search);\n\t\treturn preg_replace(\"/^((?:(?:.*?$search){\".--$occurrence.\"}.*?))$search/\", \"$1$replace\", $subject);\n\t}", "function biagiotti_mikado_strafter( $string, $substring ) {\n\t\t$pos = strpos( $string, $substring );\n\t\tif ( $pos === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ( substr( $string, $pos + strlen( $substring ) ) );\n\t}", "function str_cut_start(\n string $str,\n string $subString = ' ',\n bool $repeat = false,\n bool $caseSensitive = false\n ) : string {\n return Str::cutStart($str, $subString, $repeat, $caseSensitive);\n }", "public function charAt($index)\n\t{\n\t\t$index = (int) $index;\n\n\t\tif ($index < 0 || $index >= $this->length()) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\treturn mb_substr($this->string, $index, 1, $this->encoding);\n\t}", "function str_shift($separ, &$str)\n{\n\t$pos = strpos($str, $separ);\n\tif ($pos === false) return '';\n\t$beg = substr($str, 0, $pos);\n\t$str = substr($str, $pos + strlen($separ));\n\treturn $beg;\n}", "public function swap_char_position($str, $pos_start, $pos_finish) {\n\n\t\tif ($pos_start>=$pos_finish){\n\t\t\t$tmp = $pos_start;\n\t\t\t$pos_start = $pos_finish;\n\t\t\t$pos_finish = $tmp;\n\t\t}\n\n\t\t$char1 = substr($str, $pos_start, 1);\n\t\t$char2 = substr($str, $pos_finish, 1);\n\n\t\t$str = substr_replace($str, $char2, $pos_start, 1);\n\t\t$str = substr_replace($str, $char1, $pos_finish, 1);\n\n\t\treturn $str;\n\t}", "public function update ($substring) {\n \n if (!empty($substring)){\n $query = \"UPDATE `\". config\\vacancies_data::$db_table .\"` SET \".$substring.\" WHERE `id`=\".$this->item_id;\n\n if ($this->error_messenger() === FALSE) {\n if ( DataBase\\DB::q($query)) {\n @$_SESSION['action_result'] .= \"<br>updated successfully.\";\n header (\"Location: /admin/vacancies/select\");\n exit();\n } else {\n @$_SESSION['action_result'] .= \"<br>An error occured while trying to update vacancy \".$this->set_properties['title'.$this->selected_language];\n\n }\n }\n }\n }", "function xcut($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n}", "function insertSimpleString( $object, $objectVersion, $objectLanguage,\n $objectAttribute, $string,\n &$result )\n {\n $result = array( 'errors' => array(),\n 'require_storage' => true );\n $objectAttribute->setContent( $string );\n $objectAttribute->setAttribute( 'data_text', $string );\n return true;\n }", "public function charAt($index){\n\t\treturn $this->getCharset()->getCharAt($this->string, (int) $index);\n\t}", "public function fill( $str );", "function replaceRepeatedChars($string, $char, $replacement)\r\n\t{\r\n\t\t$pos = strpos($string, $char);\r\n\t\tif ($pos !== false) {\r\n\t\t\t$string = str_replace($char, $replacement, $string);\r\n\t\t\t$string = UrlControllerStrings::replaceRepeatedChars($string, $char, $replacement);\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "protected function replace_s(int $c_bra, int $c_ket, string $sequence): int\n {\n $s = preg_split('//u', $sequence, -1, PREG_SPLIT_NO_EMPTY);\n $adjustment = count($s) - ($c_ket - $c_bra);\n $newLength = $this->limit + $adjustment;\n //resize if necessary\n if ($newLength > count($this->current)) {\n// $newBuffer = [];//new char[ArrayUtil.oversize(newLength, Character.BYTES)];\n $newBuffer = array_slice($this->current, 0, $this->limit);\n $this->current = $newBuffer;\n }\n // if the substring being replaced is longer or shorter than the\n // replacement, need to shift things around\n if ($adjustment != 0 && $c_ket < $this->limit) {\n $dstOffset = $c_bra + count($s);\n for ($srcOffset = $c_ket; $srcOffset < $this->limit - $c_ket; $srcOffset++, $dstOffset++) {\n $this->current[$dstOffset] = $this->current[$srcOffset];\n }\n// System.arraycopy($this->current, $c_ket, $this->current, $c_bra + count($s), $this->limit - $c_ket);\n }\n // insert the replacement text\n // Note, faster is s.getChars(0, s.length(), current, c_bra);\n // but would have to duplicate this method for both String and StringBuilder\n for ($i = 0; $i < count($s); $i++)\n $this->current[$c_bra + $i] = $s[$i];\n\n $this->limit += $adjustment;\n if ($this->cursor >= $c_ket) {\n $this->cursor += $adjustment;\n } elseif ($this->cursor > $c_bra) {\n $this->cursor = $c_bra;\n }\n return $adjustment;\n }", "public function addSubStrReplacement($value, $replacement): void\n {\n $this->subStrReplacements[$value] = $replacement;\n }", "protected static function extractChar($index)\n {\n return self::CHARS[intval($index)];\n }", "public function swap_char_position_ref(&$str,$i,$j) {\n\t $temp = $str[$i];\n\t $str[$i] = $str[$j];\n\t $str[$j] = $temp;\n\t}", "public static function getSubstring($str, $start, ...$args)\n\t{\n\t\treturn substr($str, $start, ...$args);\n\t}", "public function addAt($index, $element) {\n\t\t$this->testTypeParameters( $element );\n\t\t$index = (int) $index;\n\t\t$this->rangeCheckForAdd( $index );\n\t\t\n\t\t$this->ensureCapacityInternal( $this->size + 1 );\n\t\tSystem::arraycopy( $this->elementData, $index, $this->elementData, $index + 1, $this->size - $index );\n\t\t$this->elementData[$index] = $element;\n\t\t$this->size++;\n\t}", "function insertSimpleString( &$object, $objectVersion, $objectLanguage,\r\n &$objectAttribute, $string,\r\n &$result )\r\n {\r\n $result = array( 'errors' => array(),\r\n 'require_storage' => true );\r\n $objectAttribute->setContent( $string );\r\n $objectAttribute->setAttribute( 'data_text', $string );\r\n return true;\r\n }" ]
[ "0.8356925", "0.7071323", "0.6721981", "0.6681043", "0.6539327", "0.6497638", "0.6349469", "0.63334835", "0.6204705", "0.6152164", "0.61364967", "0.61113966", "0.59516156", "0.5908027", "0.58643603", "0.5822336", "0.5591978", "0.55495864", "0.544056", "0.54311", "0.5341146", "0.53368694", "0.5319291", "0.5289133", "0.5242144", "0.51731884", "0.514537", "0.5124342", "0.51119554", "0.5080697", "0.50735253", "0.50649965", "0.5020415", "0.49914163", "0.4952572", "0.49468026", "0.49425945", "0.49274573", "0.49173525", "0.49168348", "0.48909214", "0.48907977", "0.48690766", "0.4866156", "0.4839906", "0.48378897", "0.48351154", "0.48184803", "0.48112857", "0.48096997", "0.4808256", "0.4802385", "0.47920734", "0.47908312", "0.4770343", "0.4706452", "0.47035605", "0.46937665", "0.46869504", "0.46842244", "0.46813047", "0.4679253", "0.467337", "0.46678793", "0.46630114", "0.46581683", "0.46385986", "0.4633952", "0.46104464", "0.4594765", "0.45946884", "0.4545253", "0.45446584", "0.4528671", "0.45272243", "0.4525518", "0.45197895", "0.44950795", "0.44926095", "0.44852096", "0.44807804", "0.44804007", "0.44748855", "0.44735026", "0.4471883", "0.4462563", "0.44567108", "0.44565094", "0.4450231", "0.44411433", "0.4435728", "0.44325894", "0.44229478", "0.4397379", "0.43904522", "0.43819386", "0.4381505", "0.4366954", "0.43571207", "0.4345803" ]
0.8330285
1
TODO: Implement Discount() method.
TODO: Реализовать метод Discount().
public function Discount() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function discounts();", "protected function calculate_discounts()\n {\n }", "public function getDiscount();", "public function getDiscount();", "public function getDiscount();", "public function getDiscount()\n {\n }", "public function discount(){\n return $this->total() - $this->bill();\n }", "function calcuateDiscount() {\n\t\treturn 10 ;\t\n\t}", "public function getDiscounted();", "public function getDiscounted();", "public function getDiscountedAmount();", "private function discountItem()\n {\n\n }", "public function getCalcDiscount();", "public function discount()\n {\n $product = $this->getProduct();\n\n $discount = $this->money($product);\n// dd()\n\n if ($product->discount) {\n// $discount = $product->discount->product($product);\n $discount = $discount->multiply($this->qt);\n }\n return $discount;\n }", "public function getDiscount(){\r\n return $this->discount;\r\n }", "public function getDiscount()\n\t{\n\t\treturn $this->getKeyValue('discount'); \n\n\t}", "public function getDiscount(){\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function calcDiscounts()\n {\n $discounts = 0;\n $products = $this->getProducts();\n foreach ($products as $product) {\n $discounts += $this->formatPrice($product->priceWas) - $this->formatPrice($product->price);\n }\n return $discounts;\n }", "public function get_total_discount()\n {\n }", "public function makeDiscount($data);", "public function DiscountAmount() {\n $total = 0;\n $subtotal = 0;\n $discount = $this->discount;\n\n if($discount) {\n // Are we using a whitelist\n $whitelist = $discount->WhiteList()->exists();\n\n // Now get the total of any allowed items\n foreach($this->items as $item) {\n $allow = false;\n\n // If item is in our whitelist, then allow discount\n if($whitelist && $discount->WhiteList()->filter(\"ID\", $item->ProductID)->first())\n $allow = true;\n\n // If item is NOT in our blacklist, all adding discount\n if(!$whitelist && !$discount->BlackList()->filter(\"ID\", $item->ProductID)->first())\n $allow = true;\n\n if($allow) $subtotal = $subtotal + ($item->Quantity * $item->Price);\n }\n\n // If subtotal amount it greater than discount, use discount\n if($subtotal && $discount->Type == \"Fixed\")\n $total = ($subtotal > $discount->Amount) ? $discount->Amount : $subtotal;\n // Else, calculate a percentage\n elseif($subtotal && $discount->Type == \"Percentage\" && $discount->Amount)\n $total = (($discount->Amount / 100) * $subtotal);\n }\n\n return number_format($total,2);\n }", "public function getDiscount(): DiscountContract;", "public function getPriceAfterDiscount(){\n //return $this->price * (1- Article::$remise/100);\n //on peut remplacer Article par self\n //si je rename la class article par produit en métant self on n'a plus besoin de la rename \n //a la main\n return $this->price * (1 - self::$remise/100);\n }", "function getDiscountPercent() ;", "function get_discount(int $disc)\n {\n\n return $this->price * (1 - ($disc / 100));\n }", "public function discount()\n {\n return config('shopping.discount') * static::subtotal();\n }", "public function testTotalDiscounts()\n {\n $purchase = new Purchase('foo', Money::fromAmount(50));\n $discountA = new Discount('bar', Money::fromAmount(-35));\n $discountB = new Discount('bar', Money::fromAmount(-15));\n\n $receipt = new Receipt();\n $receipt->addPurchase($purchase);\n $receipt->addDiscount($discountA);\n $receipt->addDiscount($discountB);\n\n $this->assertEquals(-50, $receipt->totalDiscounts()->amount());\n }", "public function calcDiscAmount($amount)\n {\n }", "public function getBaseDiscountAmount();", "function getdiscount();", "public function getDiscountpercentage()\n {\n return $this->discountpercentage;\n }", "function cart_discount()\n\t{\n\t\treturn $this->view_formatted_number($this->_calculate_discount());\n\t}", "public function Discount($model) {\r\n\r\n if ($model->discount_rate != 0) {\r\n $today_deal_products = DealProducts::model()->findByAttributes(array('date' => date('Y-m-d')));\r\n if (!empty($today_deal_products)) {\r\n $HiddenProducts = explode(',', $today_deal_products->deal_products);\r\n if (in_array($model->id, $HiddenProducts)) {\r\n// if ($product->discount_type == 1) {\r\n// $discountRate = $product->price - $product->discount_rate;\r\n// } else {\r\n// $discountRate = $product->price - ( $product->price * ($product->discount_rate / 100));\r\n// }\r\n $value = $this->DiscountType($model);\r\n return Yii::app()->Currency->convert($value);\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n\r\n //check date for special price //\r\n //no date limitation//\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n }", "public function discount()\n {\n setlocale(LC_MONETARY, $this->billable->getCurrencyLocale());\n\n return round(money_format('%!i', ($this->subtotal / 100) - ($this->total / 100)), 2);\n }", "public function getTotaldiscount()\n {\n return $this->totaldiscount;\n }", "public function getRewardpointsDiscount(){\n return -$this->getData(OrderInterface::REWARDPOINTS_DISCOUNT);\n }", "public function get_discount() {\n\t\t$result = new VaseDiscount($this->parent);\n\t\treturn $result;\n\t}", "public function calculateVdDiscount()\n {\n $profilesArr =$this->fetchVdPoolProfiles();\n $mTongueArr =$this->fetchMtongue();\n if(count($profilesArr)>0){\n foreach($profilesArr as $keyProfileid=>$profileid){\n $discountArr =$this->fetchVdDiscount($profileid,$mTongueArr);\n if($discountArr)\n $this->setVdDiscount($discountArr,$profileid);\n }\n }\n }", "public function getDiscountValue()\n {\n return $this->discountValue;\n }", "function testTotalDiscount()\n{\n $t_shirt=new Product(1,'T_Shirt' , 10.99 ,0);\n $jacket=new Product(3,'jacket' ,19.99 , 0);\n $shoes=new Product(4,'shoes' ,24.99 , 10 );\n $cart=new Cart();\n $cartItem2=$cart->addProduct($t_shirt,1);\n $cartItem3=$cart->addProduct($jacket,1);\n //$cartItem4=$cart->addProduct($shoes,1);\n if($cart->TotalDiscount())\n echo \"Success Get Discount <br>\";\n else\n echo \"Success without Discount <br> \" ;\n}", "public function discount(): int {\n return (int)(new Manager\\SiteOption)->findValueByName('bonus-discount') ?? 0;\n }", "public function getDiscountAmount()\n {\n return $this->getData(self::DISCOUNT_AMOUNT);\n }", "public function getGiftVoucherDiscount(){\n return -$this->getData(OrderInterface::GIFT_VOUCHER_DISCOUNT);\n }", "public function getRewardpointsBaseDiscount(){\n return -$this->getData(OrderInterface::REWARDPOINTS_BASE_DISCOUNT);\n }", "public function getDiscountSumPayPalBasket()\n {\n }", "public function totalDiscounts(): Money\n {\n return $this->discounts()->reduce(\n function (Money $total, Discount $discount) {\n return $total->add($discount->amount());\n },\n Money::fromAmount(0, $this->currency())\n );\n }", "public function getDiscountRates();", "public function getDiscountAmount()\n {\n return $this->getData(self::KEY_DISCOUNT_AMOUNT);\n }", "public function get()\n {\n return $this->discounts;\n }", "private\n function getDiscountItem()\n {\n $product_reference = array();\n $name = array();\n $unit_price = 0;\n $discount_description = array();\n $total_amount = 0;\n\n foreach ($this->discounts as $disc) {\n $cartRule = new CartRule($disc[\"id_cart_rule\"]);\n $name[] = $disc[\"name\"];\n $product_reference[] = $this->getOriginalDiscount($disc[\"name\"])[\"product_reference\"];\n $unit_price += -1 * Tools::ps_round($disc[\"value\"], 2);\n $tax_rate = 0.00;\n $discount = 0.00;\n $discount_description[] = $cartRule->description;\n $total_amount += -1 * Tools::ps_round($disc[\"value\"], 2);\n }\n\n $product_reference = join(\"/\", $product_reference);\n $name = join(\"/\", $name);\n $discount_description = join(\"/\", $discount_description);\n\n $item = HiPay\\Fullservice\\Gateway\\Model\\Cart\\Item::buildItemTypeDiscount(\n $product_reference,\n $name,\n $unit_price,\n $tax_rate,\n $discount,\n $discount_description,\n $total_amount\n );\n // forced category\n $item->setProductCategory(1);\n\n //save capture items and quantity in prestashop\n if ($this->maintenanceData) {\n $captureData = array(\n \"hp_ps_order_id\" => $this->order->id,\n \"hp_ps_product_id\" => 0,\n \"operation\" => $this->operation,\n \"type\" => 'discount',\n \"attempt_number\" => $this->transactionAttempt + 1,\n \"quantity\" => 1,\n \"amount\" => $total_amount\n );\n $this->maintenanceData->addItem($captureData);\n }\n\n return $item;\n }", "public function dislikesCounter()\n {\n return $this->morphOne(app(LikeCounterContract::class), 'likeable')\n ->where('type_id', LikeType::DISLIKE);\n }", "public function get_cart_discount_total()\n {\n }", "public function decrease_coupon_usage_counts()\n {\n }", "public function getDiscountPercent()\n {\n return $this->discountPercent;\n }", "public function discounts()\n {\n return $this->hasMany(Discount::class);\n }", "public function getDiscountprice()\n {\n return $this->discountprice;\n }", "public function getProductQuantityDiscount()\n\t{\n\t\treturn $this->product_quantity_discount;\n\t}", "public function discountPrice()\n {\n return $this->get('discount_price');\n }", "public function getDisplayDiscountAttribute();", "public function getDiscountPercentage()\n {\n return $this->discount_percentage;\n }", "public function getDiscountPercentage()\n {\n return $this->discount_percentage;\n }", "public function get_discount_amount()\n\t{\n\t\treturn $this->discount_amount;\n\t}", "public function DiscountAmount($model) {\r\n if ($model->discount_rate != 0) {\r\n $today_deal_products = DealProducts::model()->findByAttributes(array('date' => date('Y-m-d')));\r\n if (!empty($today_deal_products)) {\r\n $HiddenProducts = explode(',', $today_deal_products->deal_products);\r\n if (in_array($model->id, $HiddenProducts)) {\r\n// if ($product->discount_type == 1) {\r\n// $discountRate = $product->price - $product->discount_rate;\r\n// } else {\r\n// $discountRate = $product->price - ( $product->price * ($product->discount_rate / 100));\r\n// }\r\n $value = $this->DiscountType($model);\r\n return $value;\r\n } else {\r\n return $model->price;\r\n }\r\n } else {\r\n return $model->price;\r\n }\r\n\r\n //check date for special price //\r\n //no date limitation//\r\n } else {\r\n return $model->price;\r\n }\r\n }", "public function getDiscountCode();", "public function get_order_discount_total()\n {\n }", "public function getCount() {}", "public function getCount() {}", "public function getDiscounts()\n {\n return number_format($this->order->getDiscountAmount(), 2, '.', '');\n }", "public function getArInvoicesTotalDiscMemosPayments() {\n\t\t$col = ArInvoice::aliasproperty('discount');\n\t\t$q = ArInvoiceQuery::create();\n\t\t$q->withColumn(\"SUM($col)\", \"discount\");\n\t\t$q->select('discount');\n\t\t$q->filterByCustid($this->custid);\n\t\t$q->filterByType([ArInvoice::TYPE_MEMO, ArInvoice::TYPE_PAYMENT]);\n\t\treturn $q->findOne();\n\t}", "public function getDiscountAttribute()\n {\n return $this->items->sum('discount');\n }", "public function testDiscountTotals()\n {\n $item = $this->addItem(1, 10);\n\n $fixedCoupon = new LukePOLO\\LaraCart\\Coupons\\Fixed('10OFF', 10);\n\n $this->laracart->addCoupon($fixedCoupon);\n\n $coupon = $this->laracart->findCoupon('10OFF');\n\n $coupon->setDiscountOnItem($item);\n\n $this->assertEquals('10OFF', $item->coupon->code);\n\n $this->assertEquals(0, $this->laracart->total(false));\n $this->assertEquals(10, $this->laracart->discountTotal(false));\n }", "public function getTotalDiscountAttribute()\n {\n return $this->discount * $this->quantity;\n }", "public function discounts()\n {\n return $this->hasMany(Discount::class); \n }", "public function getCustomercreditDiscount(){\n return -$this->getData(OrderInterface::CUSTOMERCREDIT_DISCOUNT);\n }", "public function getRemainingTotal();", "public function discount()\n {\n $customer = $this->customer();\n\n if ($customer !== null) {\n return Billing::retrieveCustomerDiscount($customer['id']);\n } else {\n return null;\n }\n }", "public function get_discount() {\n\t\t$result = new BalloonDiscount($this->parent);\n\t\treturn $result;\n\t}", "public function testRemoveDiscount()\n {\n $this->invoice->addDiscount($this->flatDiscount);\n $this->assertInstanceOf(FlatDiscount::class, $this->invoice->discount);\n }", "public function getTotal()\n {\n $price=$this->getPrice();\n $subtotal=$price*$this->quantity;\n \n // we will see if a dicount is available for this product with this quantity\n $discount = Discounts::find()->select(['Discount_percentage'])->where(\"Product_id = $this->product and Minimum_items <= $this->quantity\")->orderBy(['Minimum_items'=> SORT_DESC])->asArray()->one();\n if(isset($discount['Discount_percentage']) && $discount['Discount_percentage']!=''){\n $percentage=$discount['Discount_percentage']; \n $total=$subtotal-($subtotal*$percentage/100);\n return $total;\n }else{\n return $subtotal;\n }\n }", "public function testGetDiscount()\n {\n $this->invoice->addDiscount($this->flatDiscount);\n $this->assertEquals($this->invoice->getDiscount(), 0.0);\n }", "protected function processDiscount()\n\t{\n\t\t$totals = $this->quote->getTotals();\n\t\t$baseDiscount = $this->quote->getShippingAddress()->getBaseDiscountAmount();\n\n\t\tif(abs($baseDiscount) - $this->discounted > 0.001){\n\t\t\t$discount = $totals['discount'];\n\t\t\t$diff = abs($baseDiscount) - $this->discounted;\n\n\t\t\t$this->cart[] = array(\n\t\t\t\t'type' => 'discount',\n\t\t\t\t'reference' => $discount->getcode(),\n\t\t\t\t'name' => $discount->getTitle(),\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'unit_price' => $this->helper->formatPriceForKlarna($diff),\n\t\t\t\t'tax_rate' => 0\n\t\t\t);\n\t\t}\n\t}", "private function updateCartDiscounts()\n {\n // reset discounts cart paramenters\n $this->hasCartPriceRuleNotCombinable = false;\n $this->hasFreeShipping = false;\n\n foreach($this->cartPriceRules as &$cartPriceRule)\n {\n // discount by percentage\n if($cartPriceRule->discountType == PriceRule::DISCOUNT_SUBTOTAL_PERCENTAGE)\n {\n // check if discount is with shipping amount\n if($cartPriceRule->applyShippingAmount && $this->hasShipping && ! $this->hasFreeShipping)\n {\n $discountAmount = (($this->subtotal + $this->shippingAmount) * $cartPriceRule->discountPercentage) / 100;\n }\n else\n {\n $discountAmount = ($this->subtotal * $cartPriceRule->discountPercentage) / 100;\n }\n\n\n\n\n // check if discount is lower that maximum discount allowed\n if($cartPriceRule->maximumDiscountAmount != null && $discountAmount > $cartPriceRule->maximumDiscountAmount)\n {\n $discountAmount = $cartPriceRule->maximumDiscountAmount;\n }\n\n\n\n\n $cartPriceRule->discountAmount = $discountAmount;\n }\n\n // discount by fixed amount\n if($cartPriceRule->discountType == PriceRule::DISCOUNT_SUBTOTAL_FIXED_AMOUNT)\n {\n $cartPriceRule->discountAmount = $cartPriceRule->discountFixed;\n }\n\n\n\n\n\n // check if price rule is combinable\n if(! $cartPriceRule->combinable)\n $this->hasCartPriceRuleNotCombinable = true;\n\n // check if price rule has free shipping\n if($cartPriceRule->freeShipping)\n $this->hasFreeShipping = true;\n }\n }", "function displayDisc() {\n\t\t\t\t\t\t\tglobal $prods, $servs, $mons, $item, $mem;\n\t\t\t\t\t\t\t$disc = 0;\n\n\t\t\t\t\t\t\t// Checks what the total discount would be\n\t\t\t\t\t\t\t// 10% and 20% discounts applies for all customers \n\t\t\t\t\t\t\tif ($item == \"prod\") {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tswitch($prods) {\n\t\t\t\t\t\t\t\t\tcase \"Networking Dev Kit\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.03 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Networking Dev Kit Pro\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.10 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Network Creation Center\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.15 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net Developer Tools\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.20 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net Developer Tools Pro\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.35 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Netware\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.45 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Netsoft\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.45 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.55 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Social Network\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.65 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($item == \"serv\") {\n\t\t\t\t\t\t\t\tif ($servs == \"Safety Net\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.02 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.09 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.20 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} elseif ($servs == \"Network Manager\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (0 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.01 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.07 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} elseif ($servs == \"Network Generator\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (0 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.05 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.15 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Checks if the Membership discount should apply or not\n\t\t\t\t\t\t\tif ($mem == \"on\") {\t// if Membership checkbox was checked\n\t\t\t\t\t\t\t\t$disc += 3;\t// 3% discount for being a member\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $disc;\n\t\t\t\t\t\t}", "public static function clearDiscountsNew()\n {\n if(\\Bitrix\\Main\\Loader::includeModule('sale')){\n $dbDiscounts = \\CSaleDiscount::GetList([],['%NAME' => '[AUTO]']);\n while($ob = $dbDiscounts->GetNext())\n \\CSaleDiscount::Delete($ob['ID']);\n } \n if(\\Bitrix\\Main\\Loader::includeModule('iblock')){\n $elRes = \\CIblockElement::GetList([], ['IBLOCK_ID' => self::$catalogIblockId, '!PROPERTY_' . self::$propSaleStick => false], false, false, ['ID']);\n //$elWithProp = [];\n while($obEl = $elRes->Fetch()){\n \\CIBlockElement::SetPropertyValuesEx($obEl['ID'], self::$catalogIblockId, [self::$propSaleStick => false]);\n }\n \n $elRes = \\CIblockElement::GetList([], ['IBLOCK_ID' => self::$catalogIblockId, '!PROPERTY_' . self::$propSaleStickMsk => false], false, false, ['ID']);\n //$elWithProp = [];\n while($obEl = $elRes->Fetch()){\n \\CIBlockElement::SetPropertyValuesEx($obEl['ID'], self::$catalogIblockId, [self::$propSaleStickMsk => false]);\n }\n } \n }", "function quantity_discounts($product_id='')\n\t{\n\t\tinclude_once(APPPATH.'modules/channel/mod.channel.php');\n\n\t\t$product_id = $this->EE->TMPL->fetch_param('product_id');\n\t\t$products \t= $this->_get_product($product_id);\n\t\t$templatedata = $this->EE->TMPL->tagdata;\n\n\t\t$products_options = $products[0]['options'];\n\n\t\t$count = 0;\n\t\t$output = '';\n\t\tif( count($products_options) > 0 )\n\t\t{\n\t\t\tforeach($products_options AS $products_option)\n\t\t\t{\n\t\t\t\tif( $products_option['title'] == 'Quantity Discount')\n\t\t\t\t{\n\t\t\t\t\t$total = count($products_option['opts']);\n\n\t\t\t\t\tforeach($products_option['opts'] AS $products_option_opts)\n\t\t\t\t\t{\n\t\t\t\t\t\tif( $products_option_opts['title'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'options_total' => $total,\n\t\t\t\t\t\t\t\t'options_count' => $count,\n\t\t\t\t\t\t\t\t'options_title' => $products_option_opts['title'],\n\t\t\t\t\t\t\t\t'options_price' => str_replace('-','-£',$products_option_opts['price'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$output .= $this->EE->TMPL->parse_variables_row($templatedata, $options);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn $output;\n\t\t}\n\n\n\t}" ]
[ "0.7899227", "0.7684584", "0.73636353", "0.73636353", "0.73636353", "0.73250574", "0.7240581", "0.72076166", "0.7131383", "0.7131383", "0.7058492", "0.70041907", "0.6970868", "0.69196653", "0.6874878", "0.68359894", "0.68103033", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.6621988", "0.66159976", "0.65840393", "0.6573872", "0.6551701", "0.65155673", "0.64979684", "0.6495697", "0.64666885", "0.6454967", "0.6438713", "0.6340651", "0.63401777", "0.6333766", "0.6269379", "0.6260203", "0.6257008", "0.62369", "0.6206396", "0.6196613", "0.61955583", "0.6192307", "0.61863244", "0.6154774", "0.61515665", "0.61474705", "0.61196893", "0.6114677", "0.6103972", "0.6078004", "0.6077226", "0.607297", "0.6072247", "0.6063698", "0.6037044", "0.6034455", "0.60289454", "0.60107815", "0.59973365", "0.5996174", "0.59901905", "0.5982258", "0.5980174", "0.5980174", "0.5966124", "0.59559274", "0.59481037", "0.594719", "0.5943949", "0.5943949", "0.59413826", "0.5939881", "0.5938621", "0.5937484", "0.5926566", "0.59162885", "0.59115404", "0.5910906", "0.5910823", "0.5903947", "0.58968425", "0.58956355", "0.5887488", "0.588349", "0.58830863", "0.5878376", "0.587028", "0.5866686" ]
0.8241107
0
TODO: Implement Discount() method.
TODO: Реализовать метод Discount().
public function Discount() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function discounts();", "protected function calculate_discounts()\n {\n }", "public function getDiscount();", "public function getDiscount();", "public function getDiscount();", "public function getDiscount()\n {\n }", "public function discount(){\n return $this->total() - $this->bill();\n }", "function calcuateDiscount() {\n\t\treturn 10 ;\t\n\t}", "public function getDiscounted();", "public function getDiscounted();", "public function getDiscountedAmount();", "private function discountItem()\n {\n\n }", "public function getCalcDiscount();", "public function discount()\n {\n $product = $this->getProduct();\n\n $discount = $this->money($product);\n// dd()\n\n if ($product->discount) {\n// $discount = $product->discount->product($product);\n $discount = $discount->multiply($this->qt);\n }\n return $discount;\n }", "public function getDiscount(){\r\n return $this->discount;\r\n }", "public function getDiscount()\n\t{\n\t\treturn $this->getKeyValue('discount'); \n\n\t}", "public function getDiscount(){\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function calcDiscounts()\n {\n $discounts = 0;\n $products = $this->getProducts();\n foreach ($products as $product) {\n $discounts += $this->formatPrice($product->priceWas) - $this->formatPrice($product->price);\n }\n return $discounts;\n }", "public function get_total_discount()\n {\n }", "public function makeDiscount($data);", "public function DiscountAmount() {\n $total = 0;\n $subtotal = 0;\n $discount = $this->discount;\n\n if($discount) {\n // Are we using a whitelist\n $whitelist = $discount->WhiteList()->exists();\n\n // Now get the total of any allowed items\n foreach($this->items as $item) {\n $allow = false;\n\n // If item is in our whitelist, then allow discount\n if($whitelist && $discount->WhiteList()->filter(\"ID\", $item->ProductID)->first())\n $allow = true;\n\n // If item is NOT in our blacklist, all adding discount\n if(!$whitelist && !$discount->BlackList()->filter(\"ID\", $item->ProductID)->first())\n $allow = true;\n\n if($allow) $subtotal = $subtotal + ($item->Quantity * $item->Price);\n }\n\n // If subtotal amount it greater than discount, use discount\n if($subtotal && $discount->Type == \"Fixed\")\n $total = ($subtotal > $discount->Amount) ? $discount->Amount : $subtotal;\n // Else, calculate a percentage\n elseif($subtotal && $discount->Type == \"Percentage\" && $discount->Amount)\n $total = (($discount->Amount / 100) * $subtotal);\n }\n\n return number_format($total,2);\n }", "public function getDiscount(): DiscountContract;", "public function getPriceAfterDiscount(){\n //return $this->price * (1- Article::$remise/100);\n //on peut remplacer Article par self\n //si je rename la class article par produit en métant self on n'a plus besoin de la rename \n //a la main\n return $this->price * (1 - self::$remise/100);\n }", "function getDiscountPercent() ;", "function get_discount(int $disc)\n {\n\n return $this->price * (1 - ($disc / 100));\n }", "public function discount()\n {\n return config('shopping.discount') * static::subtotal();\n }", "public function testTotalDiscounts()\n {\n $purchase = new Purchase('foo', Money::fromAmount(50));\n $discountA = new Discount('bar', Money::fromAmount(-35));\n $discountB = new Discount('bar', Money::fromAmount(-15));\n\n $receipt = new Receipt();\n $receipt->addPurchase($purchase);\n $receipt->addDiscount($discountA);\n $receipt->addDiscount($discountB);\n\n $this->assertEquals(-50, $receipt->totalDiscounts()->amount());\n }", "public function calcDiscAmount($amount)\n {\n }", "public function getBaseDiscountAmount();", "function getdiscount();", "public function getDiscountpercentage()\n {\n return $this->discountpercentage;\n }", "function cart_discount()\n\t{\n\t\treturn $this->view_formatted_number($this->_calculate_discount());\n\t}", "public function Discount($model) {\r\n\r\n if ($model->discount_rate != 0) {\r\n $today_deal_products = DealProducts::model()->findByAttributes(array('date' => date('Y-m-d')));\r\n if (!empty($today_deal_products)) {\r\n $HiddenProducts = explode(',', $today_deal_products->deal_products);\r\n if (in_array($model->id, $HiddenProducts)) {\r\n// if ($product->discount_type == 1) {\r\n// $discountRate = $product->price - $product->discount_rate;\r\n// } else {\r\n// $discountRate = $product->price - ( $product->price * ($product->discount_rate / 100));\r\n// }\r\n $value = $this->DiscountType($model);\r\n return Yii::app()->Currency->convert($value);\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n\r\n //check date for special price //\r\n //no date limitation//\r\n } else {\r\n return Yii::app()->Currency->convert($model->price);\r\n }\r\n }", "public function discount()\n {\n setlocale(LC_MONETARY, $this->billable->getCurrencyLocale());\n\n return round(money_format('%!i', ($this->subtotal / 100) - ($this->total / 100)), 2);\n }", "public function getTotaldiscount()\n {\n return $this->totaldiscount;\n }", "public function getRewardpointsDiscount(){\n return -$this->getData(OrderInterface::REWARDPOINTS_DISCOUNT);\n }", "public function get_discount() {\n\t\t$result = new VaseDiscount($this->parent);\n\t\treturn $result;\n\t}", "public function calculateVdDiscount()\n {\n $profilesArr =$this->fetchVdPoolProfiles();\n $mTongueArr =$this->fetchMtongue();\n if(count($profilesArr)>0){\n foreach($profilesArr as $keyProfileid=>$profileid){\n $discountArr =$this->fetchVdDiscount($profileid,$mTongueArr);\n if($discountArr)\n $this->setVdDiscount($discountArr,$profileid);\n }\n }\n }", "public function getDiscountValue()\n {\n return $this->discountValue;\n }", "function testTotalDiscount()\n{\n $t_shirt=new Product(1,'T_Shirt' , 10.99 ,0);\n $jacket=new Product(3,'jacket' ,19.99 , 0);\n $shoes=new Product(4,'shoes' ,24.99 , 10 );\n $cart=new Cart();\n $cartItem2=$cart->addProduct($t_shirt,1);\n $cartItem3=$cart->addProduct($jacket,1);\n //$cartItem4=$cart->addProduct($shoes,1);\n if($cart->TotalDiscount())\n echo \"Success Get Discount <br>\";\n else\n echo \"Success without Discount <br> \" ;\n}", "public function discount(): int {\n return (int)(new Manager\\SiteOption)->findValueByName('bonus-discount') ?? 0;\n }", "public function getDiscountAmount()\n {\n return $this->getData(self::DISCOUNT_AMOUNT);\n }", "public function getGiftVoucherDiscount(){\n return -$this->getData(OrderInterface::GIFT_VOUCHER_DISCOUNT);\n }", "public function getRewardpointsBaseDiscount(){\n return -$this->getData(OrderInterface::REWARDPOINTS_BASE_DISCOUNT);\n }", "public function getDiscountSumPayPalBasket()\n {\n }", "public function totalDiscounts(): Money\n {\n return $this->discounts()->reduce(\n function (Money $total, Discount $discount) {\n return $total->add($discount->amount());\n },\n Money::fromAmount(0, $this->currency())\n );\n }", "public function getDiscountRates();", "public function getDiscountAmount()\n {\n return $this->getData(self::KEY_DISCOUNT_AMOUNT);\n }", "public function get()\n {\n return $this->discounts;\n }", "private\n function getDiscountItem()\n {\n $product_reference = array();\n $name = array();\n $unit_price = 0;\n $discount_description = array();\n $total_amount = 0;\n\n foreach ($this->discounts as $disc) {\n $cartRule = new CartRule($disc[\"id_cart_rule\"]);\n $name[] = $disc[\"name\"];\n $product_reference[] = $this->getOriginalDiscount($disc[\"name\"])[\"product_reference\"];\n $unit_price += -1 * Tools::ps_round($disc[\"value\"], 2);\n $tax_rate = 0.00;\n $discount = 0.00;\n $discount_description[] = $cartRule->description;\n $total_amount += -1 * Tools::ps_round($disc[\"value\"], 2);\n }\n\n $product_reference = join(\"/\", $product_reference);\n $name = join(\"/\", $name);\n $discount_description = join(\"/\", $discount_description);\n\n $item = HiPay\\Fullservice\\Gateway\\Model\\Cart\\Item::buildItemTypeDiscount(\n $product_reference,\n $name,\n $unit_price,\n $tax_rate,\n $discount,\n $discount_description,\n $total_amount\n );\n // forced category\n $item->setProductCategory(1);\n\n //save capture items and quantity in prestashop\n if ($this->maintenanceData) {\n $captureData = array(\n \"hp_ps_order_id\" => $this->order->id,\n \"hp_ps_product_id\" => 0,\n \"operation\" => $this->operation,\n \"type\" => 'discount',\n \"attempt_number\" => $this->transactionAttempt + 1,\n \"quantity\" => 1,\n \"amount\" => $total_amount\n );\n $this->maintenanceData->addItem($captureData);\n }\n\n return $item;\n }", "public function dislikesCounter()\n {\n return $this->morphOne(app(LikeCounterContract::class), 'likeable')\n ->where('type_id', LikeType::DISLIKE);\n }", "public function get_cart_discount_total()\n {\n }", "public function decrease_coupon_usage_counts()\n {\n }", "public function getDiscountPercent()\n {\n return $this->discountPercent;\n }", "public function discounts()\n {\n return $this->hasMany(Discount::class);\n }", "public function getDiscountprice()\n {\n return $this->discountprice;\n }", "public function getProductQuantityDiscount()\n\t{\n\t\treturn $this->product_quantity_discount;\n\t}", "public function discountPrice()\n {\n return $this->get('discount_price');\n }", "public function getDisplayDiscountAttribute();", "public function getDiscountPercentage()\n {\n return $this->discount_percentage;\n }", "public function getDiscountPercentage()\n {\n return $this->discount_percentage;\n }", "public function get_discount_amount()\n\t{\n\t\treturn $this->discount_amount;\n\t}", "public function DiscountAmount($model) {\r\n if ($model->discount_rate != 0) {\r\n $today_deal_products = DealProducts::model()->findByAttributes(array('date' => date('Y-m-d')));\r\n if (!empty($today_deal_products)) {\r\n $HiddenProducts = explode(',', $today_deal_products->deal_products);\r\n if (in_array($model->id, $HiddenProducts)) {\r\n// if ($product->discount_type == 1) {\r\n// $discountRate = $product->price - $product->discount_rate;\r\n// } else {\r\n// $discountRate = $product->price - ( $product->price * ($product->discount_rate / 100));\r\n// }\r\n $value = $this->DiscountType($model);\r\n return $value;\r\n } else {\r\n return $model->price;\r\n }\r\n } else {\r\n return $model->price;\r\n }\r\n\r\n //check date for special price //\r\n //no date limitation//\r\n } else {\r\n return $model->price;\r\n }\r\n }", "public function getDiscountCode();", "public function get_order_discount_total()\n {\n }", "public function getCount() {}", "public function getCount() {}", "public function getDiscounts()\n {\n return number_format($this->order->getDiscountAmount(), 2, '.', '');\n }", "public function getArInvoicesTotalDiscMemosPayments() {\n\t\t$col = ArInvoice::aliasproperty('discount');\n\t\t$q = ArInvoiceQuery::create();\n\t\t$q->withColumn(\"SUM($col)\", \"discount\");\n\t\t$q->select('discount');\n\t\t$q->filterByCustid($this->custid);\n\t\t$q->filterByType([ArInvoice::TYPE_MEMO, ArInvoice::TYPE_PAYMENT]);\n\t\treturn $q->findOne();\n\t}", "public function getDiscountAttribute()\n {\n return $this->items->sum('discount');\n }", "public function testDiscountTotals()\n {\n $item = $this->addItem(1, 10);\n\n $fixedCoupon = new LukePOLO\\LaraCart\\Coupons\\Fixed('10OFF', 10);\n\n $this->laracart->addCoupon($fixedCoupon);\n\n $coupon = $this->laracart->findCoupon('10OFF');\n\n $coupon->setDiscountOnItem($item);\n\n $this->assertEquals('10OFF', $item->coupon->code);\n\n $this->assertEquals(0, $this->laracart->total(false));\n $this->assertEquals(10, $this->laracart->discountTotal(false));\n }", "public function getTotalDiscountAttribute()\n {\n return $this->discount * $this->quantity;\n }", "public function discounts()\n {\n return $this->hasMany(Discount::class); \n }", "public function getCustomercreditDiscount(){\n return -$this->getData(OrderInterface::CUSTOMERCREDIT_DISCOUNT);\n }", "public function getRemainingTotal();", "public function discount()\n {\n $customer = $this->customer();\n\n if ($customer !== null) {\n return Billing::retrieveCustomerDiscount($customer['id']);\n } else {\n return null;\n }\n }", "public function get_discount() {\n\t\t$result = new BalloonDiscount($this->parent);\n\t\treturn $result;\n\t}", "public function testRemoveDiscount()\n {\n $this->invoice->addDiscount($this->flatDiscount);\n $this->assertInstanceOf(FlatDiscount::class, $this->invoice->discount);\n }", "public function getTotal()\n {\n $price=$this->getPrice();\n $subtotal=$price*$this->quantity;\n \n // we will see if a dicount is available for this product with this quantity\n $discount = Discounts::find()->select(['Discount_percentage'])->where(\"Product_id = $this->product and Minimum_items <= $this->quantity\")->orderBy(['Minimum_items'=> SORT_DESC])->asArray()->one();\n if(isset($discount['Discount_percentage']) && $discount['Discount_percentage']!=''){\n $percentage=$discount['Discount_percentage']; \n $total=$subtotal-($subtotal*$percentage/100);\n return $total;\n }else{\n return $subtotal;\n }\n }", "public function testGetDiscount()\n {\n $this->invoice->addDiscount($this->flatDiscount);\n $this->assertEquals($this->invoice->getDiscount(), 0.0);\n }", "protected function processDiscount()\n\t{\n\t\t$totals = $this->quote->getTotals();\n\t\t$baseDiscount = $this->quote->getShippingAddress()->getBaseDiscountAmount();\n\n\t\tif(abs($baseDiscount) - $this->discounted > 0.001){\n\t\t\t$discount = $totals['discount'];\n\t\t\t$diff = abs($baseDiscount) - $this->discounted;\n\n\t\t\t$this->cart[] = array(\n\t\t\t\t'type' => 'discount',\n\t\t\t\t'reference' => $discount->getcode(),\n\t\t\t\t'name' => $discount->getTitle(),\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'unit_price' => $this->helper->formatPriceForKlarna($diff),\n\t\t\t\t'tax_rate' => 0\n\t\t\t);\n\t\t}\n\t}", "private function updateCartDiscounts()\n {\n // reset discounts cart paramenters\n $this->hasCartPriceRuleNotCombinable = false;\n $this->hasFreeShipping = false;\n\n foreach($this->cartPriceRules as &$cartPriceRule)\n {\n // discount by percentage\n if($cartPriceRule->discountType == PriceRule::DISCOUNT_SUBTOTAL_PERCENTAGE)\n {\n // check if discount is with shipping amount\n if($cartPriceRule->applyShippingAmount && $this->hasShipping && ! $this->hasFreeShipping)\n {\n $discountAmount = (($this->subtotal + $this->shippingAmount) * $cartPriceRule->discountPercentage) / 100;\n }\n else\n {\n $discountAmount = ($this->subtotal * $cartPriceRule->discountPercentage) / 100;\n }\n\n\n\n\n // check if discount is lower that maximum discount allowed\n if($cartPriceRule->maximumDiscountAmount != null && $discountAmount > $cartPriceRule->maximumDiscountAmount)\n {\n $discountAmount = $cartPriceRule->maximumDiscountAmount;\n }\n\n\n\n\n $cartPriceRule->discountAmount = $discountAmount;\n }\n\n // discount by fixed amount\n if($cartPriceRule->discountType == PriceRule::DISCOUNT_SUBTOTAL_FIXED_AMOUNT)\n {\n $cartPriceRule->discountAmount = $cartPriceRule->discountFixed;\n }\n\n\n\n\n\n // check if price rule is combinable\n if(! $cartPriceRule->combinable)\n $this->hasCartPriceRuleNotCombinable = true;\n\n // check if price rule has free shipping\n if($cartPriceRule->freeShipping)\n $this->hasFreeShipping = true;\n }\n }", "function displayDisc() {\n\t\t\t\t\t\t\tglobal $prods, $servs, $mons, $item, $mem;\n\t\t\t\t\t\t\t$disc = 0;\n\n\t\t\t\t\t\t\t// Checks what the total discount would be\n\t\t\t\t\t\t\t// 10% and 20% discounts applies for all customers \n\t\t\t\t\t\t\tif ($item == \"prod\") {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tswitch($prods) {\n\t\t\t\t\t\t\t\t\tcase \"Networking Dev Kit\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.03 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Networking Dev Kit Pro\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.10 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Network Creation Center\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.15 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net Developer Tools\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.20 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net Developer Tools Pro\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.35 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Netware\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.45 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Netsoft\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.45 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Net\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.55 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"Social Network\":\n\t\t\t\t\t\t\t\t\t\t$disc = (.65 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($item == \"serv\") {\n\t\t\t\t\t\t\t\tif ($servs == \"Safety Net\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.02 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.09 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.20 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} elseif ($servs == \"Network Manager\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (0 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.01 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.07 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} elseif ($servs == \"Network Generator\") {\n\t\t\t\t\t\t\t\t\tif ($mons == \"2\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (0 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"6\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.05 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t} elseif ($mons == \"12\") {\n\t\t\t\t\t\t\t\t\t\t$disc = (.15 + .10 + .20) * 100;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Checks if the Membership discount should apply or not\n\t\t\t\t\t\t\tif ($mem == \"on\") {\t// if Membership checkbox was checked\n\t\t\t\t\t\t\t\t$disc += 3;\t// 3% discount for being a member\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $disc;\n\t\t\t\t\t\t}", "public static function clearDiscountsNew()\n {\n if(\\Bitrix\\Main\\Loader::includeModule('sale')){\n $dbDiscounts = \\CSaleDiscount::GetList([],['%NAME' => '[AUTO]']);\n while($ob = $dbDiscounts->GetNext())\n \\CSaleDiscount::Delete($ob['ID']);\n } \n if(\\Bitrix\\Main\\Loader::includeModule('iblock')){\n $elRes = \\CIblockElement::GetList([], ['IBLOCK_ID' => self::$catalogIblockId, '!PROPERTY_' . self::$propSaleStick => false], false, false, ['ID']);\n //$elWithProp = [];\n while($obEl = $elRes->Fetch()){\n \\CIBlockElement::SetPropertyValuesEx($obEl['ID'], self::$catalogIblockId, [self::$propSaleStick => false]);\n }\n \n $elRes = \\CIblockElement::GetList([], ['IBLOCK_ID' => self::$catalogIblockId, '!PROPERTY_' . self::$propSaleStickMsk => false], false, false, ['ID']);\n //$elWithProp = [];\n while($obEl = $elRes->Fetch()){\n \\CIBlockElement::SetPropertyValuesEx($obEl['ID'], self::$catalogIblockId, [self::$propSaleStickMsk => false]);\n }\n } \n }", "function quantity_discounts($product_id='')\n\t{\n\t\tinclude_once(APPPATH.'modules/channel/mod.channel.php');\n\n\t\t$product_id = $this->EE->TMPL->fetch_param('product_id');\n\t\t$products \t= $this->_get_product($product_id);\n\t\t$templatedata = $this->EE->TMPL->tagdata;\n\n\t\t$products_options = $products[0]['options'];\n\n\t\t$count = 0;\n\t\t$output = '';\n\t\tif( count($products_options) > 0 )\n\t\t{\n\t\t\tforeach($products_options AS $products_option)\n\t\t\t{\n\t\t\t\tif( $products_option['title'] == 'Quantity Discount')\n\t\t\t\t{\n\t\t\t\t\t$total = count($products_option['opts']);\n\n\t\t\t\t\tforeach($products_option['opts'] AS $products_option_opts)\n\t\t\t\t\t{\n\t\t\t\t\t\tif( $products_option_opts['title'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'options_total' => $total,\n\t\t\t\t\t\t\t\t'options_count' => $count,\n\t\t\t\t\t\t\t\t'options_title' => $products_option_opts['title'],\n\t\t\t\t\t\t\t\t'options_price' => str_replace('-','-£',$products_option_opts['price'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$output .= $this->EE->TMPL->parse_variables_row($templatedata, $options);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn $output;\n\t\t}\n\n\n\t}" ]
[ "0.7899227", "0.7684584", "0.73636353", "0.73636353", "0.73636353", "0.73250574", "0.7240581", "0.72076166", "0.7131383", "0.7131383", "0.7058492", "0.70041907", "0.6970868", "0.69196653", "0.6874878", "0.68359894", "0.68103033", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.67722154", "0.6621988", "0.66159976", "0.65840393", "0.6573872", "0.6551701", "0.65155673", "0.64979684", "0.6495697", "0.64666885", "0.6454967", "0.6438713", "0.6340651", "0.63401777", "0.6333766", "0.6269379", "0.6260203", "0.6257008", "0.62369", "0.6206396", "0.6196613", "0.61955583", "0.6192307", "0.61863244", "0.6154774", "0.61515665", "0.61474705", "0.61196893", "0.6114677", "0.6103972", "0.6078004", "0.6077226", "0.607297", "0.6072247", "0.6063698", "0.6037044", "0.6034455", "0.60289454", "0.60107815", "0.59973365", "0.5996174", "0.59901905", "0.5982258", "0.5980174", "0.5980174", "0.5966124", "0.59559274", "0.59481037", "0.594719", "0.5943949", "0.5943949", "0.59413826", "0.5939881", "0.5938621", "0.5937484", "0.5926566", "0.59162885", "0.59115404", "0.5910906", "0.5910823", "0.5903947", "0.58968425", "0.58956355", "0.5887488", "0.588349", "0.58830863", "0.5878376", "0.587028", "0.5866686" ]
0.8241107
1
Tests Phalcon\Assets\Filters\Jsmin :: filter()
Тесты Phalcon\Assets\Filters\Jsmin :: filter()
public function assetsFiltersJsminFilter(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter()'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $actual = $jsmin->filter('{}}'); $I->assertEquals( "\n" . '{}}', $actual ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function assetsFiltersJsminFilterComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('/** this is a comment */')\n );\n }", "function minify_js($js)\n{\n $minifier = new Minify\\JS($js);\n return $minifier->minify();\n}", "public function getCompressJavascript() {}", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function assetsInlineJsConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter set');\n\n $asset = new Js('<script>alert(\"Hello\");</script>', false);\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "protected function jsPipeline()\n\t{\n\t\t// If a custom minifier has been set use it, otherwise fallback to default\n\t\t$minifier = (isset($this->js_minifier)) ? $this->js_minifier : function ($buffer) {\n\t\t\treturn \\JSMin::minify($buffer);\n\t\t};\n\n\t\treturn $this->pipeline($this->js, '.js', $this->js_dir, $minifier);\n\t}", "public function filter();", "public function filters();", "public function enableCompressJavascript() {}", "public function disableCompressJavascript() {}", "protected function doCompressJavaScript() {}", "function filters()\n {\n }", "function minifyJS($js,$simple=true) {\n if($simple)\n {\n return(minifyWhitespace($js));\n }\n else\n {\n return JSMin::minify($js); //requires php5 +\n }\n }", "public function filters()\n {\n }", "public function getFilter ();", "public function filters()\n {\n //\n }", "function optimizejs()\n\t{\n\t\t$_body = JResponse::getBody();\n\t\t$_body = explode(\"</head>\", $_body, 2);\n\t\t// Replace CSS library\n\t\t$avoid = $this->gzip_js_exclude;\n\t\t$avoid = ($avoid != '') ? (is_array($avoid) ? $avoid : array($avoid)) : array();\n\t\t\n\t\tif(is_array($avoid)) {\n\t\t\t$avoid = array_merge($avoid, $this->getExcludeJSByCondition($_body[0]));\n\t\t}\n\t\t\n\t\t$_body[0] \t= $this->replaceWithLibrary($_body[0], \"js\", $avoid, $this->merge);\n\t\t$_body \t\t= $_body[0].\"</head>\".$_body[1];\n\t\t\n\t\tif($_body) {\n\t\t\tJResponse::setBody($_body);\n\t\t}\n\t\treturn true;\n\t}", "public function filter(Asset $asset);", "public function applyFilter();", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "public function getPluginFilters(){\n\t\t\treturn \"/[^\\\\.]/\";\n\t\t}", "public function ShouldCompressJavascript(){\n\t\treturn MagratheaConfig::Instance()->GetConfigFromDefault(\"compress_js\");\n\t}", "public function filter()\n {\n \n }", "public function getFilters()\n\t{\n\t\treturn array('minimee' => new \\Twig_Filter_Method($this, 'minimeeFilter'));\n\t}", "function CheckFilter() {}", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "private function _jsmin($data)\n\t{\n\t\trequire_once('JSMin.php');\n\n\t\treturn JSMin::minify($data);\n\t}", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function filters() \n\t{\n\t\treturn array();\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters() \n {\n return array();\n }", "public function getFilters()\n {\n return array(\n 'asset' => new Twig_Filter_Function('twig_asset_filter'), \n );\n }", "public static function filterJS($str){\n $pattern = array('#<script([^>]*)>#i','#</script([^>]*)>#i');\n $replacement = array('<pre>&lt;script\\\\1&gt;','&lt;/script\\\\1&gt;</pre>');\n $subject = $str;\n return preg_replace($pattern,$replacement,$subject);\n }", "public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs newlines');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $expected = \"\\n\" . 'a=100;';\n $actual = $jsmin->filter(\"\\t\\ta\\t\\r\\n= \\n \\r\\n100;\\t\");\n $I->assertEquals($expected, $actual);\n }", "public function assetsManagerOutputCssFilterChainCustomFilterWithCssmin(UnitTester $I)\n {\n $I->wantToTest(\n 'Assets\\Manager - outputCss() - filter chain custom filter with cssmin'\n );\n\n $fileName = $I->getNewFileName('assets_', 'css');\n $fileName = outputDir('tests/assets/' . $fileName);\n $cssFile = dataDir('assets/assets/1198.css');\n $manager = new Manager(new TagFactory(new Escaper()));\n\n $manager->useImplicitOutput(false);\n\n $css = $manager->collection('css');\n\n $css\n ->setTargetPath($fileName)\n ->addCss($cssFile)\n ->addFilter(new UppercaseFilter())\n ->addFilter(new TrimFilter())\n ->join(true)\n ;\n\n $manager->outputCss('css');\n\n $I->openFile($fileName);\n\n $I->seeFileContentsEqual(\n 'A{TEXT-DECORATION:NONE;}B{FONT-WEIGHT:BOLD;}'\n );\n\n $I->safeDeleteFile($fileName);\n }", "public function assetsFiltersJsminFilterTabsComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"/** this is a comment */ if ( a == b ) { document . writeln('\\t') ; /** this is a comment */ }\"\n );\n\n $I->assertEquals(\n \"\\nif(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "function beforeFilter() {\n\n }", "function is_filtered()\n {\n }", "function filter() {\r\n return null;\r\n }", "public function getFilters()\n {\n return array(\n 'product_img_url' => new Twig_Filter_Function('ombi60ProductImgUrl'),\n\t 'money_with_currency' => new Twig_Filter_Function('ombi60MoneyWithCurrency'),\n\t 'money' => new Twig_Filter_Function('ombi60Money'),\n\t 'asset_url' => new Twig_Filter_Function('ombi60AssetUrl'),\n\t 'img_tag' => new Twig_Filter_Function('ombi60ImgTag'),\n\t 'script_tag' => new Twig_Filter_Function('ombi60ScriptTag'),\n\t 'css_tag' => new Twig_Filter_Function('ombi60CssTag'),\n\t 'link_to' => new Twig_Filter_Function('ombi60LinkTo'),\n\t 'camelize' => new Twig_Filter_Function('ombi60Camelize'),\n\t 'handleize' => new Twig_Filter_Function('ombi60Handle'),\n\t 'implode' => new Twig_Filter_Function('ombi60Implode'),\n\t 'pluralize' => new Twig_Filter_Function('ombi60Pluralize'),\n\t 'truncate' => new Twig_Filter_Function('ombi60TruncateString'),\n\t 'truncatewords' => new Twig_Filter_Function('ombi60TruncateWords'),\n\t 'weight_with_unit' => new Twig_Filter_Function('ombi60WeightWithUnit'),\n\t 'strip_newlines' => new Twig_Filter_Function('ombi60StripNewlines'),\n\t 'strip_html' => new Twig_Filter_Function('ombi60StripHtml'),\n\t 'json' => new Twig_Filter_Function('json_encode'), // this is for converting data for use in JS see http://wiki.shopify.com/Json\n\t 'within' => new Twig_Filter_Function('ombi60PutProductUrlWithinCollection'),\n\t 'snippets_url' => new Twig_Filter_Function('ombi60SnippetsUrl'),\n );\n }", "public function getFilters()\n {\n return array(\n 'strr' => new \\Twig_Filter_Method($this, 'stringReplace', array('needs_environment' => true)),\n );\n }", "function add_filters()\n {\n }", "public function filters(){\n\t\treturn array(\n\t\t\tarray( 'application.filters.StringFilter'),\n\t\t);\n\t}", "function beforeFilter() {\n\t}", "function smarty_outputfilter_group_js($tpl_output, &$smarty){\n\n\trequire($_SERVER[\"DOCUMENT_ROOT\"].'/application/third_party/JavaScriptPacker.php');\n\t\n\t$cache_dir = '/cache/js';\n\t\n\t$html_output = preg_replace('/\\<!--\\/\\/(.*?)\\-->/is', '', $tpl_output);\n\tpreg_match_all('/\\<!--(.*?)\\-->/is', $tpl_output, $comment);\n\tforeach($comment[0] as $k => $v){\n\t\t$array_comment_replace[$k] = \"!@@COMMENT\".$k.\"@@!\";\n\t\t$array_comment[$k] = $v;\n\t\t\n\t\t// replace all comments\n\t\t$tpl_output = str_replace($v, \"!@@COMMENT\".$k.\"@@!\", $tpl_output);\n\t}\n\t\n\t// grab all js\n preg_match_all('/<script (src=\")(.*\\.js)(.*)/i', $tpl_output, $patterns);\n \n $url_js = array_unique($patterns[0]);\n foreach($url_js as $k => $v){\n \t/* if($k==0){\n \t\t// creat a maker on the first js\n \t\t$marker_js = \"!@@COMBINEJS@@!\";\n \t\t// set where all js will be put together || replace / for \\/ to avoid reg-exp bug\n \t\t$tpl_output = preg_replace('/'.str_replace('/', '\\/', $v).'/', $marker_js, $tpl_output, 1);\n \t\t// if have some other js like the first one, remove it\n\t\t\t$tpl_output = str_replace($v, '', $tpl_output);\n \t}\n \telse{*/\n \t\t// remove all js from source\n\t\t\t$tpl_output = str_replace($v, '', $tpl_output);\n \t/*}*/\n }\n \n $all_js = array_unique($patterns[2]);\n $lastmodified = 0;\n $body_js = '';\n foreach($all_js as $k => $v){\n\t\t$file_js = $_SERVER[\"DOCUMENT_ROOT\"].\"\".$v;\n\t\t$lastmodified = max($lastmodified, filemtime($file_js));\n \t$body_js .= file_get_contents($file_js); \n }\n \n // minify our js\n $body_js = smarty_outputfilter_group_js_minify($body_js);\n \n $group_js = implode(\",\", $all_js);\n $hash = $lastmodified.\"-\".md5($group_js);\n $cache_file = \"js-cache-\".$hash.\".js\";\n \n /* obfuscate */\n $packer = new JavaScriptPacker($body_js, 'Normal', true, false);\n $packed = $packer->pack();\n $body_js = $packed; \n \n $full_path_file = $_SERVER[\"DOCUMENT_ROOT\"].\"\".$cache_dir.\"/\".$cache_file;\n \n if(!file_exists($full_path_file)){\n\t\tif(!is_dir(dirname($full_path_file))) mkdir(dirname($full_path_file), 0775, true); \n\t\tfile_put_contents($full_path_file, $body_js);\n }\n \n\t// our new js file\n $group_js = \"<script src=\\\"\".$cache_dir.\"/\".$cache_file.\"\\\"></script>\";\n\n // give back all comments\n $tpl_output = str_replace($array_comment_replace, $array_comment, $tpl_output);\n\t\n\treturn str_replace('</body>', $group_js.\"\\n</body>\", $tpl_output); \n}", "function filter_method_name() {\n\t // TODO:\tDefine your filter method here\n\t}", "abstract public function filters(): array;", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }", "function rocket_minify_inline_js( $js ) {\n\t// Check if JSMin is enabled.\n\tif ( ! class_exists( 'JSMin' ) ) {\n\t\trequire( WP_ROCKET_PATH . 'min/lib/JSMin.php' );\n\t}\n\n\treturn JSMin::minify( $js );\n}", "function minifyJS($arra){\n\t\tminify_js_data($arra, 'https://javascript-minifier.com/raw');\n\t}", "public function filters()\n {\n return array(\n );\n }", "public function filters() {\n return array();\n }", "final protected function Filters() {\n\n return $this->\n Framework()->\n Filters();\n }", "public function get_filters() {\t\t\n\t\treturn false;\n\t}", "public function filters()\n {\n return [\n //\n ];\n }", "public function filters()\n {\n return [];\n }", "public function filters()\n {\n return [];\n }", "public function filters()\n {\n return [];\n }", "final public static function filter()\n\t{\n\t\treturn Filter::getInstance();\n\t}", "public function buildFilters();", "public function getFilters()\n {\n return 'spout';\n }", "public function testFilterCssminEmptyString()\n {\n $this->specify(\n \"The cssmin filter with empty parameter does not return empty back\",\n function () {\n $cssmin = new Cssmin();\n\n expect($cssmin->filter(''))->isEmpty();\n }\n );\n }", "public static function getCompressedJs(){\n \n ksort(self::$js); \n if (conf::getMainIni('cached_assets')) {\n self::setJsAsSingleFile();\n }\n return self::getJs(); \n \n }", "public function filter($filter)\n {\n }", "public function js()\n {\n }", "function _minify()\n{\n\trequire_once(dirname(__FILE__).'/php/minify.php');\n\trequire_once(dirname(__FILE__).'/php/cssmin.php');\n\trequire_once(dirname(__FILE__).'/php/jsmin.php');\n}", "function compress($content) {\n\t\tApp::import('Vendor', 'CaracolePacker.jsmin/jsmin');\n\t\treturn JSMin::minify($content);\n\t}", "function rocket_minify_js( $buffer ) {\n\t$home_host = parse_url( home_url(), PHP_URL_HOST );\n\t$internal_files = array();\n\t$external_tags = array();\n\t$excluded_tags = '';\n\t$excluded_js\t\t = implode( '|', get_rocket_exclude_js() );\n\t$excluded_js \t\t = str_replace( '//' . $home_host , '', $excluded_js );\n\t$excluded_js = str_replace( '+', '\\+', $excluded_js );\n\t$js_in_footer\t\t = get_rocket_minify_js_in_footer();\n\t$wp_content_dirname = ltrim( str_replace( home_url(), '', WP_CONTENT_URL ), '/' ) . '/';\n\t$excluded_external_js = get_rocket_minify_excluded_external_js();\n\n\t// Get all JS files with this regex.\n\tpreg_match_all( apply_filters( 'rocket_minify_js_regex_pattern', '#<script[^>]+?src=[\\'|\"]([^\\'|\"]+\\.js?.+)[\\'|\"].*>(?:<\\/script>)#i' ), $buffer, $tags_match );\n\n\t$i = 0;\n\tforeach ( $tags_match[0] as $tag ) {\n\n\t\t// Check if the file is already minify by get_rocket_minify_files.\n\t\t// or the file is rejected to the process.\n\t\tif ( ! strpos( $tag, 'data-minify=' ) && ! strpos( $tag, 'data-no-minify=' ) ) {\n\n\t\t\t// To check if a tag is to exclude of the minify process.\n\t\t\t$excluded_tag = false;\n\n\t\t\t// Get JS URL with scheme.\n\t\t\t$js_url_with_scheme = set_url_scheme( $tags_match[1][ $i ] );\n\n\t // Get URL infos.\n\t $js_url = parse_url( $js_url_with_scheme );\n\n\t\t\t// Get host for all langs.\n\t\t\t$langs_host = array();\n\t\t\tif ( $langs = get_rocket_i18n_uri() ) {\n\t\t\t\tforeach ( $langs as $lang ) {\n\t\t\t\t\t$langs_host[] = parse_url( $lang, PHP_URL_HOST );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get host of CNAMES.\n\t\t\t$cnames_host = get_rocket_cnames_host( array( 'all', 'css_and_js', 'js' ) );\n\n\t // Check if the link isn't external.\n\t // Insert the relative path to the array without query string.\n\t if ( ( isset( $js_url['host'] ) && ( $js_url['host'] === $home_host || in_array( $js_url['host'], $cnames_host, true ) || in_array( $js_url['host'], $langs_host, true ) ) ) || ( ! isset( $js_url['host'] ) && preg_match( '#(' . $wp_content_dirname . '|wp-includes)#', $js_url['path'] ) ) ) {\n\n\t\t // Check if it isn't a file to exclude.\n\t\t if ( preg_match( '#^(' . $excluded_js . ')$#', $js_url['path'] ) && pathinfo( $js_url['path'], PATHINFO_EXTENSION ) === 'js' ) {\n\t\t\t global $wp_scripts;\n\n\t\t\t if ( get_rocket_option( 'defer_all_js', 0 ) && get_rocket_option( 'defer_all_js_safe', 0 ) && false !== strpos( $js_url['path'], $wp_scripts->registered['jquery-core']->src ) ) {\n\t\t\t\t if ( get_rocket_option( 'remove_query_strings', 0 ) ) {\n\t\t\t\t\t $tag_cache_busting = str_replace( $tags_match[1][ $i ], get_rocket_browser_cache_busting( $tags_match[1][ $i ], 'script_loader_src' ), $tag );\n\t\t\t\t\t $external_tags[] = $tag_cache_busting;\n\t\t\t\t } else {\n\t\t\t\t\t $external_tags[] = $tag;\n\t\t\t\t }\n\t\t\t\t\t} else {\n\t\t\t\t $excluded_tag = true;\n\t\t\t\t\t}\n\t\t\t } else {\n\t\t\t \t$internal_files[] = $js_url['path'];\n\t\t\t }\n\t\t\t\t// If it's an excluded external file.\n\t\t\t} elseif ( isset( $js_url['host'] ) && in_array( $js_url['host'], $excluded_external_js, true ) ) {\n\n\t\t\t\t$excluded_tag = true;\n\n\t\t\t\t// If it's an external file.\n\t\t\t} else {\n\t\t\t\tif ( ! in_array( $tags_match[1][ $i ], $js_in_footer, true ) && ! in_array( $js_url_with_scheme, $js_in_footer, true ) ) {\n\t\t\t\t\t$external_tags[] = $tag;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the tag.\n\t\t\tif ( ! $excluded_tag ) {\n\t\t\t\t$buffer = str_replace( $tag, '', $buffer );\n\t\t\t}\n\n if ( $excluded_tag && get_rocket_option( 'remove_query_strings' ) ) {\n $tag_cache_busting = str_replace( $tags_match[1][ $i ], get_rocket_browser_cache_busting( $tags_match[1][ $i ], 'script_loader_src' ), $tag );\n $buffer = str_replace( $tag, $tag_cache_busting, $buffer );\n }\n\t\t}\n\t\t$i++;\n\t}\n\n\t// Get external JS tags and remove duplicate scripts.\n\t$external_tags = implode( '', array_unique( $external_tags ) );\n\n\t// Remove domain on all JS in footer.\n\t$js_in_footer = array_map( 'rocket_clean_exclude_file', $js_in_footer );\n\n\t// Exclude JS files to insert in footer.\n\tforeach ( $internal_files as $k => $url ) {\n\t\tif ( in_array( $url, $js_in_footer, true ) ) {\n\t\t\tunset( $internal_files[ $k ] );\n\t\t}\n\t}\n\n\t// Insert the minify JS file.\n\treturn array( $buffer, $external_tags . get_rocket_minify_files( $internal_files ) );\n}", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "public static function get_filters()\n {\n }", "public function getFilters()\r\n {\r\n return [\r\n new TwigFilter('GreenUpText', [$this, 'GreenUpTextFilter'], ['is_safe' => ['html']]),\r\n new TwigFilter('TextFilter', [$this, 'TextFilter'], ['is_safe' => ['html']]),\r\n new TwigFilter('ArticleBeginning', [$this, 'ArticleBeginning'], ['is_safe' => ['html']]) \r\n ];\r\n\r\n }", "public function filter()\n {\n return array(\n 'name' => array(\n 'required' => true,\n 'filters' => array(\n array(\n 'name' => 'Zend\\Filter\\StringTrim'\n )\n )\n )\n );\n }", "private function remove_filters()\n\t{\n\t\t// remove_filter('filter_name', 'function_name', 'priority); !\n\n\t}", "function minify_js($file = '../public/js/script.min.js') {\n $js = file_get_contents($file);\n\n $js = preg_replace_callback(\n '/(?<=\\(\\\"\\.)[a-zA-Z].+?(?=\\\"\\))/', \n function($matches) {\n return 'ab';\n }, $js\n );\n\n file_put_contents($file, $js);\n}", "public function getFilters() {\n return GessoExtensionLoader::getFilters();\n }", "public function filters()\n {\n return [\n\n ];\n }", "public function get_js() {\n\t}", "public function getFilters() : array\n {\n return [\n new Twig_Filter('slugify', [$this, 'slugifyFilter']),\n ];\n }", "function filterJadwal(){\n\t\t$res = $this->LogistikTransModel->getFilterKodeDetailKursus($_GET['q']);\n\t\techo json_encode($res);\n\t}", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "final static public function getStaticFilters()\n {\n return [ 'price_min', 'price_max' ];\n }", "abstract protected function getFilters();", "public function getFilters() {}", "public function getFilters()\n {\n return [\n new TwigFilter('json_decode', [$this, 'jsonDecode']),\n ];\n }", "function filter($in)\n{\n $out = str_replace(\"script\",\"\",$in);\n $out = str_replace(\"svg\",\"\",$out);\n $out = str_replace(\"img\",\"\",$out);\n return $out;\n}", "function current_filter()\n{\n}", "public function getFilters() {\n return array(\n //'getcontext' => new Twig_Filter_Method($this, 'getcontext'),\n 'removesettings' => new Twig_Filter_Method($this, 'removesettings'),\n 'removeclasses' => new Twig_Filter_Method($this, 'removeclasses'),\n 'escapecode' => new Twig_Filter_Method($this, 'escapecode'),\n 'addprotocol' => new Twig_Filter_Method($this, 'addprotocol'),\n 'setpath' => new Twig_Filter_Method($this, 'setpath'),\n 'getfontstring' => new Twig_Filter_Method($this, 'getfontstring'),\n 'dirname' => new Twig_Filter_Method($this, 'dirname'),\n 'removeExtension' => new Twig_Filter_Method($this, 'removeExtension'),\n 'minify' => new Twig_Filter_Method($this, 'minify'),\n 'removeComments' => new Twig_Filter_Method($this, 'removeComments'),\n 'textAlign' => new Twig_Filter_Method($this, 'textAlign'),\n 'cleanData' => new Twig_Filter_Method($this, 'cleanData'),\n 'attribute_friendly' => new Twig_Filter_Method($this, 'attribute_friendly')\n );\n }", "abstract public function getFilters() ;", "public function getFilters() {\n return [\n new \\Twig_SimpleFilter('int', [$this, 'parseInt']),\n new \\Twig_SimpleFilter('crc32', [$this, 'cohCrc32']),\n new \\Twig_SimpleFilter('clean', [$this, 'clean']),\n new \\Twig_SimpleFilter('coh_raw', [$this, 'cohRaw']),\n ];\n }" ]
[ "0.72109973", "0.7187771", "0.7026181", "0.6986969", "0.65791684", "0.6499963", "0.6441841", "0.64266086", "0.63932157", "0.63058984", "0.6282437", "0.62725234", "0.6266899", "0.6229356", "0.6164945", "0.6107088", "0.60713786", "0.60541826", "0.6020263", "0.5953483", "0.5936027", "0.59282666", "0.59080946", "0.5907295", "0.59021425", "0.5879831", "0.58677125", "0.5862856", "0.5845218", "0.5818809", "0.58123094", "0.5786812", "0.5781633", "0.5762844", "0.5762844", "0.5762844", "0.5762844", "0.57558316", "0.57386994", "0.57386994", "0.57339746", "0.56828266", "0.56332123", "0.5621202", "0.561612", "0.561246", "0.5607915", "0.5604359", "0.5594984", "0.55940956", "0.5592515", "0.559167", "0.5568233", "0.5544583", "0.55437005", "0.5531178", "0.5531163", "0.5517232", "0.5517135", "0.5514673", "0.55076987", "0.5490566", "0.5486967", "0.54862005", "0.54858917", "0.54689753", "0.54689753", "0.54689753", "0.5467718", "0.5463054", "0.5462479", "0.5460035", "0.5442251", "0.54420984", "0.5428947", "0.5424711", "0.54212326", "0.54131633", "0.5392926", "0.5392926", "0.53916305", "0.5383248", "0.5382631", "0.5381159", "0.53774077", "0.53760356", "0.5358901", "0.5358504", "0.5356157", "0.53336304", "0.5330925", "0.53287977", "0.5327006", "0.5324801", "0.5321621", "0.53070927", "0.53042436", "0.5303736", "0.52992564", "0.5293514" ]
0.7808333
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() spaces
Тесты Phalcon\Assets\Filters\Jsmin :: filter() пробелов
public function assetsFiltersJsminFilterSpaces(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - spaces'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $actual = $jsmin->filter( 'if ( a == b ) { document . writeln("hello") ; }' ); $I->assertEquals( "\n" . 'if(a==b){document.writeln("hello");}', $actual ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }", "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs newlines');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $expected = \"\\n\" . 'a=100;';\n $actual = $jsmin->filter(\"\\t\\ta\\t\\r\\n= \\n \\r\\n100;\\t\");\n $I->assertEquals($expected, $actual);\n }", "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "function get_space_allowed()\n{\n}", "function getFilter() {\n return \"&nbsp;\";\n }", "public function filter()\n {\n return array(\n 'name' => array(\n 'required' => true,\n 'filters' => array(\n array(\n 'name' => 'Zend\\Filter\\StringTrim'\n )\n )\n )\n );\n }", "public function filters()\n {\n return [\n 'confirmation_number' => 'trim',\n ];\n }", "public function assetsFiltersJsminFilterTabsComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"/** this is a comment */ if ( a == b ) { document . writeln('\\t') ; /** this is a comment */ }\"\n );\n\n $I->assertEquals(\n \"\\nif(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function testRepeatedWhitespaceReplacementNoReplace()\n {\n $string = ' Remove all repeated ws';\n $this->assertSame($string, $this->_filter2->filter($string));\n }", "function filter_for_js($str)\r\n{\r\n $str=str_replace(\"\\n\",\"\",$str);\r\n $str=str_replace(\"\\r\",\"\",$str);\r\n $str=str_replace(\"'\",\"\",$str);\r\n $str=str_replace('\"',\"\",$str);\r\n $str=htmlentities($str,ENT_QUOTES,\"utf-8\");\r\n return $str;\r\n}", "public function filters()\n {\n return [\n 'name' => 'trim|escape|capitalize',\n ];\n }", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function filters()\n {\n return [\n 'name' => 'trim|escape',\n 'email' => 'trim|escape',\n 'website' => 'trim|escape',\n ];\n }", "public function assetsFiltersJsminFilterComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('/** this is a comment */')\n );\n }", "public function getPluginFilters(){\n\t\t\treturn \"/[^\\\\.]/\";\n\t\t}", "public function filter($value)\n {\n return str_ireplace(' ', '', $value);\n }", "public function registerNoWhiteSpacesRule(){\n Validator::extend('no_white_spaces',function($attribute, $value, $parameters, $validator){\n if(preg_match('/\\s/', $value))\n {\n return false;\n }\n return true;\n });\n }", "function filtrele($val){\n return $val . ' -';\n}", "public function testCleanUndetectedUnspacedWord()\n {\n $filter = new LeoProfanity();\n\n $this->assertEquals($filter->clean('Buy classic watches online'), 'Buy classic watches online');\n }", "public function testFilterCssminEmptyString()\n {\n $this->specify(\n \"The cssmin filter with empty parameter does not return empty back\",\n function () {\n $cssmin = new Cssmin();\n\n expect($cssmin->filter(''))->isEmpty();\n }\n );\n }", "function smarty_postfilter_trimwhitespace($source, &$smarty)\n{\n preg_match_all(\"!<script[^>]+>.*?</script>!is\", $source, $match);\n $_script_blocks = $match[0];\n $source = preg_replace(\"!<script[^>]+>.*?</script>!is\",\n '@@@SMARTY:TRIM:SCRIPT@@@', $source);\n\n // Pull out the pre blocks\n preg_match_all(\"!<pre>.*?</pre>!is\", $source, $match);\n $_pre_blocks = $match[0];\n $source = preg_replace(\"!<pre>.*?</pre>!is\",\n '@@@SMARTY:TRIM:PRE@@@', $source);\n\n // Pull out the textarea blocks\n preg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $source, $match);\n $_textarea_blocks = $match[0];\n $source = preg_replace(\"!<textarea[^>]+>.*?</textarea>!is\",\n '@@@SMARTY:TRIM:TEXTAREA@@@', $source);\n\n // Pull out the input blocks\n preg_match_all(\"!<input[^>]+?/>!is\", $source, $match);\n $_input_blocks = $match[0];\n $source = preg_replace(\"!<input[^>]+?/>!is\",\n '@@@SMARTY:TRIM:INPUT@@@', $source);\n\n // Pull out the select blocks\n preg_match_all(\"!<select[^>]+>.*?</select>!is\", $source, $match);\n $_input_select = $match[0];\n $source = preg_replace(\"!<select[^>]+>.*?</select>!is\",\n '@@@SMARTY:TRIM:SELECT@@@', $source);\n\n // Pull out the php blocks\n preg_match_all(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\", $source, $match);\n $_Code_Php_blocks = $match[0];\n $source = preg_replace(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\",\n '@@@SMARTY:TRIM:PHP@@@', $source);\n\n // remove all leading spaces, tabs and carriage returns\n $source = trim(preg_replace(array('/[\\n\\r]+/m', '/[\\s]{2,}/m'), array('', ' '), $source));\n\n // replace php blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PHP@@@\", $_Code_Php_blocks, $source);\n\n // replace select blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SELECT@@@\", $_input_select, $source);\n\n // replace input blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:INPUT@@@\", $_input_blocks, $source);\n\n // replace textarea blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:TEXTAREA@@@\", $_textarea_blocks, $source);\n\n // replace pre blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PRE@@@\", $_pre_blocks, $source);\n\n // replace script blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SCRIPT@@@\", $_script_blocks, $source);\n\n return $source;\n}", "function setFilter($val)\n{\n $step1 = trim($val);\n $step2 = strip_tags($step1);\n $step3 = htmlspecialchars($step2, ENT_QUOTES);\n $result = $step3;\n return $result;\n}", "public function filters()\n {\n return [\n 'email' => 'trim|lowercase',\n 'name' => 'trim|capitalize|escape'\n ];\n }", "public function filters()\n {\n return [\n 'email' => 'trim|lowercase',\n 'title' => 'trim|capitalize|escape'\n ];\n }", "public function testCleanMultiSpace()\n {\n $filter = new LeoProfanity();\n\n $this->assertEquals($filter->clean('I hav ,e BoOb, '), 'I hav ,e ****, ');\n $this->assertEquals($filter->clean(',I h a. v e BoOb.'), ',I h a. v e ****.');\n }", "public function skip_whitespace()\n {\n }", "function wp_spaces_regexp()\n{\n}", "function filter($source)\n{\n $source = str_replace(\"<\", \"\", $source);\n $source = str_replace(\">\", \"\", $source);\n return $source;\n}", "function filter( $search ){\n\t\tforeach ($this->_def['regex']['filter'] as $regex){\n\t\t\t$search = preg_replace($regex,\"\",$search);\n\t\t\t//if($this->_debug) printf( \"query during: %s - regex:%s \\n\", $query,$catregex );\n\t\t}\n\t\treturn trim( str_replace( $this->ed_def['strip'], ' ', $search ) );\n\t}", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "private function processFilter(){\n $result = '&filter=';\n foreach($this->filterArray as $key=>$value){\n $result .= $key.'::'.$value.'|';\n }\n $result = substr( $result, 0, -1 );\n return $result;\n }", "public function doTrim();", "function stripJavaScript($code) {\n preg_match_all('/([\"\\'])(.*?)\\\\1/', $code, $matches);\n $stripped = '';\n foreach ($matches[2] as $match) {\n $string = trim($match);\n if ($string) {\n $stripped .= $string . \"\\n\";\n }\n }\n return $stripped;\n}", "public function filter($input){ //Filter input from all user, filtered from sqli,and xss\n $filter = addslashes(trim(stripslashes(strip_tags($input))));\n return $filter;\n }", "private function minifyKeepSpaces($element)\n {\n return preg_replace('!\\s+!', ' ', $element);\n }", "function filter( $text ) {\n\t\t$lc = $this->legalSearchChars();\n\t\treturn trim( preg_replace( \"/[^{$lc}]/\", \" \", $text ) );\n\t}", "public function filter( $value )\n\t{\n\t\t$whiteSpace = $this->allowWhiteSpace ? '\\s' : '';\n\t\t\n\t\tif (!self::$_unicodeEnabled)\n\t\t\t$pattern = '/[^a-zA-Z' . $whiteSpace . ']/';\n\t\telse\n\t\t\t$pattern = '/[^a-zA-Z' . $whiteSpace . ']/u';\n\t\t\n\t\treturn preg_replace($pattern, '', (string) $value);\n\t}", "function filterInput($str){ return sanitize($str, array('full' => true)); }", "public static function fixFilter($filter)\r\n {\r\n return str_replace('|', ' ', $filter);\r\n }", "public function filter();", "public function testRepeatedWhitespaceReplacementDefault()\n {\n $string = ' Remove all repeated whitespace';\n $expected = 'Remove all repeated whitespace';\n $this->assertSame($expected, $this->_filter1->filter($string));\n }", "function filter($word) { \r\n\t\t$word = (string)myMagic(stripslashes(trim($word))); \r\n\t\t$word = (string)nl2br($word); \r\n\t\t$word = (string)htmlentities($word); \r\n\t\treturn $word ; \r\n\t}", "protected function convertWhitespaces()\n {\n $this->slug = str_replace($this->to_replace,\n $this->separator, $this->slug);\n }", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "public function filter($code)\n {\n $elements = (array) $this->elements($code);\n\n foreach ((array) $elements as $element)\n {\n $original = (string) $element->nodeValue;\n\n $minified = $this->minify($original);\n\n $minified = preg_replace('/\\s+/', ' ', $minified);\n\n $minified = $this->minify($minified);\n\n $code = str_replace($original, $minified, $code);\n }\n\n return $code;\n }", "public function filters(){\n\t\treturn array(\n\t\t\tarray( 'application.filters.StringFilter'),\n\t\t);\n\t}", "function minify_js($js)\n{\n $minifier = new Minify\\JS($js);\n return $minifier->minify();\n}", "function filter( $search ){\n\t\tforeach ($this->_def['regex']['filter'] as $regex){\n\t\t\t$search = preg_replace($regex,\"\",$search);\n\t\t\t//if($this->_debug) printf( \"query during: %s - regex:%s \\n\", $query,$catregex );\n\t\t}\n\t\t$search = trim(str_replace( $this->ed_def['strip'], ' ', $search ));\n\t\treturn $search;\n\t}", "function anti_injection($data){\n\t\t\t\t\t\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\t\t\t\t\treturn $filter;\n\t\t\t\t\t\t}", "public function testOnlySpaces()\r\n {\r\n // a varaiable that stores the results from the cleaner\r\n $result = $this->cleaner->cleanSearchQuery(' ');\r\n\r\n // an array with the values we expect it to have\r\n $queryStrings = array('');\r\n\r\n // assert that the two arrays are equal\r\n $this->assertEquals($queryStrings, $result);\r\n }", "function twig_raw_filter($string) {}", "public function testSanitizeArrayFilterValidString()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$source = 'abcdefghijklmnopqrstuvwzyx1234567890!@#$%^&*()_ `~=+';\n\n\t\t$expected = $source;\n\t\t$actual = $filter->sanitize($source, array('string'));\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'String filter with latin does not return correct data'\n\t\t);\n\t}", "function filter($word) { \r\n\t\t\t$word = (string)$this->myMagic(stripslashes(trim($word))); \r\n\t\t\t$word = (string)nl2br($word); \r\n\t\t\t$word = (string)htmlentities($word); \r\n\t\t\treturn $word ; \r\n\t\t}", "public static function trim()\n\t{\n\t}", "public function compressSpaces(): Strink\n {\n return new static(preg_replace('/\\s\\s+/', ' ', $this->string));\n }", "protected function filter_string($input){\n\t\treturn filter_var(trim($input),FILTER_SANITIZE_STRING);\n\t}", "private function sanitizeSource( string $source )\n {\n return trim(\n strtolower( $source )\n );\n }", "function filterCharsAndNormalize($data)\n{\n return strtolower(preg_replace(\"/[\\W_]+/\", ' ', $data));\n}", "public function filter($var) {\n\t\treturn preg_replace('/[^-a-zA-Z0-9@. \\/]/', '', $var);\n }", "function filter($data) {\n\t$data = trim(htmlentities(strip_tags($data)));\n\tif (get_magic_quotes_gpc())\n\t\t$data = stripslashes($data);\n\treturn $data;\n}", "function template_prefilter_jstrip($tpl_source, &$template_object)\r\n{\r\n\treturn preg_replace_callback(\"/\\{jstrip\\}(.*?)\\{\\/jstrip\\}/s\",\"template_prefilter_jstrip_cb\", $tpl_source);\r\n}", "function filter_strict($str){\n\n\t\t$filter = new lib_filter();\n\t\t$filter->allowed = array();\n\t\treturn $filter->go($str);\n\t}", "public function filters();", "function minify_callback($buffer)\n{\n\n\n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n $buffer = preg_replace($search, $replace, $buffer);\n\n return $buffer;\n\n}", "protected function _filter ($value, $property = '') {\n\t\treturn trim($value);\n\t}", "function minifyJS($js,$simple=true) {\n if($simple)\n {\n return(minifyWhitespace($js));\n }\n else\n {\n return JSMin::minify($js); //requires php5 +\n }\n }", "function smarty_modifier_strip( $text, $replace = \" \" )\r\n{\r\n return preg_replace( \"!\\\\s+!\", $replace, $text );\r\n}", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "public function testSanitizeStringArrayFilter()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$source = 'abcdefghijklmnopqrstuvwzyx1234567890!@#$%^&*()_ `~=+<>';\n\n\t\t$expected = 'abcdefghijklmnopqrstuvwzyx1234567890!@#$%^&*()_ `~=+';\n\t\t$actual = $filter->sanitize($source, array('string'));\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'String filter with latin does not return correct data'\n\t\t);\n\t}", "function filter( $str ){\n\t\treturn addslashes( $str );\n\t}", "function twig_lower_filter(Twig_Environment $env, $string) {}", "function filter_any_data($data){\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "public function min_whitespace($string)\n {\n }", "function coindev_property_shortcode_search_filter() {\n\tob_start();\n\tcoindev_property_search_filter();\n\treturn ob_get_clean();\n}", "protected function _filterParam($param) {\n\t\t// For security reasons\n\t\t$param = stripslashes(strip_tags($param));\n\n\t\t$notAllowed = array('\\'', '*', '/', ' ',);\n\t\t$param = str_replace($notAllowed, '', $param);\n\n\t\treturn $param;\n\t}", "public function testProcessFilter()\n {\n $oAdminList = oxNew('oxAdminList');\n $this->assertEquals('test string', $oAdminList->UNITprocessFilter('%test string%'));\n }", "public abstract function minify($input);", "public abstract function minify($input);", "public static function unfixFilter($filter)\r\n {\r\n return str_replace(' ', '|', $filter);\r\n }", "function strip_debugging($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (preg_match(\"/^\\s*log\\(/\", $line)) continue;\r\n\t\t$newjs[] = $line;\r\n\t}\r\n\treturn $newjs;\r\n}", "private function compress_white_space( $code ) {\n // Tabs to space, no more than 1 consecutive space\n $code = preg_replace( '!\\t!m', ' ', $code );\n $code = preg_replace( '![ ]{2,}!m', ' ', $code );\n \n // Remove uneccessary white space around operators, braces and brackets.\n // \\xHH sequence is: !%&()*+,-/:;<=>?[]\\{|}~\n $code = preg_replace( '/\\s([\\x21\\x25\\x26\\x28\\x29\\x2a\\x2b\\x2c\\x2d\\x2f\\x3a\\x3b\\x3c\\x3d\\x3e\\x3f\\x5b\\x5d\\x5c\\x7b\\x7c\\x7d\\x7e])/m', \"$1\", $code );\n $code = preg_replace( '/([\\x21\\x25\\x26\\x28\\x29\\x2a\\x2b\\x2c\\x2d\\x2f\\x3a\\x3b\\x3c\\x3d\\x3e\\x3f\\x5b\\x5d\\x5c\\x7b\\x7c\\x7d\\x7e])\\s/m', \"$1\", $code );\n \n // Split on each line, trim leading/trailing white space, kill empty lines, combine everything in one line\n $code = preg_split( '/\\r\\n|\\r|\\n/', $code );\n foreach( $code as $i => $line ) {\n $code[ $i ] = trim( $line );\n }\n $code = implode( '', $code );\n\n return $code;\n }", "function prepare_words($filter)\n {\n $words = (strpos(trim($filter['words']), 0x20) !== false) ? $filter['words'] : $filter['words'] . '*';\n if ($words != '*') {\n $words = (strpos(trim($filter['wordsin']), 0x20) !== false) ? $words . ' ' . $filter['wordsin'] : $words . ' ' . $filter['wordsin'] . '*';\n } else {\n $words = (strpos(trim($filter['wordsin']), 0x20) !== false) ? $filter['wordsin'] : $filter['wordsin'] . '*';\n }\n $words = $this->db->escape(preg_replace('/ +/', ' ', trim($words)));\n\n if (!empty($filter['search_mode'])) {\n switch ($filter['search_mode']) {\n case 1:\n $words = \"'+\" . str_replace(' ', ' +', substr($words, 1));\n break;\n case 2:\n $words = '\\'\"' . substr($words, 1, -1) . '\"\\'';\n break;\n }\n }\n\n return $words;\n }", "protected function processFilter($filter)\n {\n $valid_operators = '(!~|=~|==|!=|>|<|>=|<=|=@|!@)';\n\n $filter = preg_replace('/\\s\\s+/',' ',trim($filter)); //Clean duplicate whitespace\n $filter = str_replace(array(',',';'),array('\\,','\\;'),$filter); //Escape Google Analytics reserved characters\n $filter = preg_replace('/(&&\\s*|\\|\\|\\s*|^)([a-z]+)(\\s*' . $valid_operators . ')/i','$1ga:$2$3',$filter); //Prefix ga: to metrics and dimensions\n $filter = preg_replace('/[\\'\\\"]/i','',$filter); //Clear invalid quote characters\n $filter = preg_replace(array('/\\s*&&\\s*/','/\\s*\\|\\|\\s*/','/\\s*' . $valid_operators . '\\s*/'),array(';',',','$1'),$filter); //Clean up operators\n\n if(strlen($filter)>0)\n {\n return urlencode($filter);\n }\n else\n {\n return false;\n }\n }", "function filters()\n {\n }", "public function filter($string)\n {\n $string = preg_replace('#[^' . preg_quote($this->_allow . $this->_space, '#') . '\\s]+#', '', $string);\n\n // many space next to each other replace to one space\n if (isset($this->_space)) {\n $string = preg_replace('#[' . preg_quote($this->_space, '#') . '\\s]+#', $this->_space, $string);\n }\n\n return $string;\n }", "function filter( $search ){\n\t\tforeach ($this->_regex as $regex){\n\t\t\t$search = preg_replace($regex,\"\",$search);\n\t\t\t//printf( \"query during: %s - regex:%s \\n\", $search,$regex );\n\t\t}\n\t\t$search = trim( str_replace( $this->_def['strip'], ' ', $search ) );\n\t\t//printf( \"Search: %s\\nFiltered: %s\\n\", $old,$search );\n\t\treturn $search;\n\t}", "public function testSanitizeUTF8ArrayFilterValidStringNoFilter()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$source = 'buenos días123καλημέρα!@#$%^&*早安()_ `~=+';\n\n\t\t$expected = $source;\n\t\t$actual = $filter->sanitize($source, array('string'));\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'String filter with UTF8 does not return correct data'\n\t\t);\n\t}", "protected function linear_whitespace()\n {\n }", "function stripJunk($string){\n $string = str_replace(\" \", \"-\", trim($string));\n $string = preg_replace(\"/[^a-zA-Z0-9-.]/\", \"\", $string);\n $string = strtolower($string);\n return $string;\n }", "public function Filter($val,$tf=false)\r\n{\r\n\tif($tf==false)\r\n\t{\r\n\t\t$val=strip_tags($val);\r\n\t}\r\n\t$val=addslashes(trim($val));\r\n\treturn $val;\r\n}", "public function filtros_ValidadoresAction($filtro = \"\", $validador = \"\")\n {\n $htmlEntities = new Zend_Filter_HtmlEntities();\n //exemplo 1\n var_dump($htmlEntities->filter('&'), // string '&amp;'\n $htmlEntities->filter('\"') // string '&quot;'\n );\n\n // Se preferir em alguns caso pode-se utilizar o metodo estático da classe Zend_Filter.\n var_dump(Zend_Filter::filterStatic('&', //1° arg: o valor da entrada de dados\n 'HtmlEntities' //2° arg.: string que corresponde ao nome da classe de filtro\n //em relacao ao Zend_Filter\n )\n );\n //$filter = new Zend_Filter_Int;\n var_dump(Zend_Filter::filterStatic('0234', //1° arg: o valor da entrada de dados\n 'Int' //2° arg.: string que corresponde ao nome da classe de filtro\n //em relacao ao Zend_Filter\n ), 0234\n );\n \n //Pode-se também passar um array de argumentos do construtor, se forem necessários para a classe d\n //e filtro em questao\n var_dump(Zend_Filter::filterStatic('\"', 'HtmlEntities',\n array('quotestyle' => ENT_QUOTES)));\n\n //Filtro que retorna só digitos numéricos\n $filter = new Zend_Filter_Digits();\n //exemplo 2\n var_dump($filter->filter('Valor com Números 123')); // 123\n\n var_dump(Zend_Filter::filterStatic('Valor com números 123', //1° arg: o valor da entrada de dados\n 'Digits' //2° arg.: string que corresponde ao nome da classe de filtro\n //em relacao ao Zend_Filter\n )\n );\n\n $filter = new Zend_Filter_Alnum();\n $return = $filter->filter('This is (my) content: 123');\n // returns 'Thisismycontent123'\n var_dump(\"original: 'This is (my) content: 123'\", $return);\n //retornando com espaços\n $filter = new Zend_Filter_Alnum(array('allowwhitespace' => true));\n $return = $filter->filter('This is (my) content: 123');\n // returns 'This is my content 123'\n var_dump($return);\n\n\n $filter = new Zend_Filter_BaseName();\n var_dump('Diretorio = /vol/tmp/filename',\n $filter->filter('/vol/tmp/filename'));\n var_dump('Diretorio = /vol/tmp/filename.txt',\n $filter->filter('/vol/tmp/filename.txt'));\n\n $filter = new Zend_Filter_Boolean();\n $value = '';\n // returns false\n $result = $filter->filter($value);\n var_dump('', $result);\n\n $filter = new Zend_Filter_Callback('strrev');\n // returns \"!olleH\"\n print $filter->filter('Hello!');\n\n\n /**\n * Ao usar 2 filtros após tem que ter em mente que muitas vezes não eh possivel obter o resultado original\n * usando o filtro oposto. ex:\n\n $original = \"my_original_content\";\n // Attach a filter\n $filter = new Zend_Filter_Word_UnderscoreToCamelCase();\n $filtered = $filter->filter($original);\n var_dump($original, //valor original\n $filtered// valor convertido\n );\n // Use it's opposite\n $filter2 = new Zend_Filter_Word_CamelCaseToUnderscore();\n $filtered = $filter2->filter($filtered);\n var_dump($original, //valor original\n $filtered //valor aplicado o 2° filtro\n );\n */\n //Exemplo de Filtros em Cascata\n $string = \"&palavra&\";\n $cascata = new Zend_Filter();\n //repare que sera aplicado o filtro em ordem que esta add as classes de filtros\n $cascata->addFilter(new Zend_Filter_Alpha())//retorna dados alfabéticos de determinado localidade\n ->addFilter(new Zend_Filter_StringToUpper()); //retorna texto convertido para maiúscula\n\n $stringFiltrada = $cascata->filter($string);\n\n var_dump($string, // valor original\n $stringFiltrada //valor retornado pelo filtro em cascata\n );\n\n //Converte caracters \"especiais\" em entidades HTML\n $cep = new FiltraCep();\n //exemplo 1\n var_dump($cep->filter('20725000') // string '&amp;'\n );\n\n\n return die();\n }", "public function filter($value)\n {\n return preg_replace(\n $this->unicode ? '/[^\\p{L}\\p{N}]+/u' : '/[^\\w]+/',\n ' ',\n $value\n );\n }", "private function minifyHard($element)\n {\n $element = preg_replace('!\\s+!', ' ', $element);\n $element = trim($element);\n return trim($element);\n }", "function filter($entry) {\n //Filter user input to safeguard against XXS and SQL injections.\n $entry = htmlspecialchars($entry); //Against any XSS and SQL injections\n $entry = trim($entry); //Against SQL injections\n $entry = stripslashes($entry);\n return $entry; //Sanitized input\n}", "public function testSanitizeStringStringFilterValidString()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$source = 'abcdefghijklmnopqrstuvwzyx1234567890!@#$%^&*()_ `~=+';\n\n\t\t$expected = $source;\n\t\t$actual = $filter->sanitize($source, 'string');\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'String filter with latin does not return correct data'\n\t\t);\n\t}", "private function _filterText( $var ) {\r\n // Need to call addslashes again as COM_checkHTML strips it out\r\n if ($this->_checkhtml) $var = COM_checkHTML($var);\r\n if ($this->_checkwords) $var = COM_checkWords($var);\r\n $var = COM_killJS($var);\r\n if ($this->_maxlength > 0) {\r\n $var = substr($var, 0, $this->_maxlength);\r\n }\r\n if ($this->_prepfordb) {\r\n $var = addslashes($var);\r\n } elseif ($this->_prepforweb) {\r\n $var = stripslashes($var);\r\n }\r\n return $var;\r\n }", "function anti_injection($data){\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter;\n}" ]
[ "0.6804732", "0.65502536", "0.65337485", "0.6378568", "0.628673", "0.61391556", "0.6027081", "0.60150486", "0.587814", "0.5864158", "0.5856852", "0.5791838", "0.5780579", "0.5708625", "0.5707746", "0.5706118", "0.5688838", "0.5679266", "0.56765056", "0.5655444", "0.56406593", "0.56312996", "0.56116307", "0.5607302", "0.5593269", "0.5570483", "0.55445915", "0.5537875", "0.5505963", "0.54990494", "0.5484986", "0.5478495", "0.5465183", "0.54427564", "0.5430716", "0.5424729", "0.5418034", "0.54148114", "0.5409298", "0.53981113", "0.53869677", "0.5368777", "0.53623104", "0.53618795", "0.5325804", "0.5325193", "0.5317801", "0.5315283", "0.5308796", "0.5307853", "0.53001624", "0.52978414", "0.5296711", "0.52733266", "0.5273104", "0.5271951", "0.5269921", "0.5265444", "0.52587706", "0.5253795", "0.52473944", "0.5247032", "0.5234719", "0.52341545", "0.52272886", "0.5218121", "0.5211726", "0.5206535", "0.5206441", "0.5204054", "0.5203437", "0.5197673", "0.5195952", "0.5193078", "0.51897544", "0.5183762", "0.51810855", "0.51745814", "0.5171359", "0.51706845", "0.51706845", "0.51697177", "0.5169222", "0.514988", "0.514835", "0.514765", "0.5145738", "0.51421344", "0.5141719", "0.51411563", "0.514069", "0.5130218", "0.51178205", "0.51142716", "0.5107858", "0.5101936", "0.50852895", "0.5082316", "0.50756294", "0.5070518" ]
0.83130956
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() tabs
Тесты Phalcon\Assets\Filters\Jsmin :: filter() вкладок
public function assetsFiltersJsminFilterTabs(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - tabs'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $actual = $jsmin->filter( "\n" . "if ( a == b ) { document . writeln('\t') ; }" ); $I->assertEquals( "\n" . "if(a==b){document.writeln('\t');}", $actual ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilterTabsComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"/** this is a comment */ if ( a == b ) { document . writeln('\\t') ; /** this is a comment */ }\"\n );\n\n $I->assertEquals(\n \"\\nif(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function beforeFilter() { \n\t\t$this->show_tabs();\n\t}", "public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs newlines');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $expected = \"\\n\" . 'a=100;';\n $actual = $jsmin->filter(\"\\t\\ta\\t\\r\\n= \\n \\r\\n100;\\t\");\n $I->assertEquals($expected, $actual);\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(86);\n\t}", "public function filterAdminNavigationMain($tabs)\n {\n $tabs[] = array('label' => 'TEI', 'uri' => url('tei/stylesheets'));\n return $tabs;\n }", "function education_base_widgets_tab($tabs){\n $tabs[] = array(\n 'title' => __('AT Education Base Widgets', 'education-base'),\n 'filter' => array(\n 'groups' => array('education-base')\n )\n );\n return $tabs;\n}", "public function tabs()\r\n {\r\n $this->tools();\r\n $this->js('jbassets:js/widget/tabs.js');\r\n $this->less('jbassets:less/widget/tabs.less');\r\n }", "public function filterAdminNavigationMain($tabs) {\n $tabs[] = array(\n 'label' => 'BagIt',\n 'uri' => url('bag-it/collections')\n );\n\n return $tabs;\n }", "public function filterAdminNavigationMain($tabs)\n {\n $tabs[] = array('label' => 'Neatline Record Import', 'uri' => url('record-import'));\n return $tabs;\n }", "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "public function filterAdminItemsFormTabs($tabs, $args)\r\n {\r\n // Insert the Segmenting Video tab before the Miscellaneous tab.\r\n $item = $args['item'];\r\n if (get_option('videostream_display_tuning')) {\r\n $tabs['Segment Tuning'] = get_view()->segmentTuningForm($item);\r\n }\r\n return $tabs;\r\n }", "public static function tabs() {\n\t\treturn apply_filters( 'wpjsfsp_settings_tabs', array(\n\t\t\t'features' => __( 'Features', 'wp-js-form-sample-plugin' ),\n\t\t\t'fields' => __( 'Field Types', 'wp-js-form-sample-plugin' ),\n\t\t) );\n\t}", "protected function get_tabs() {\r\n\t\treturn apply_filters( 'wphb_admin_page_tabs_' . $this->slug, $this->tabs );\r\n\t}", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "function filters()\n {\n }", "public function filters();", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "public static function tabs() {\n return array(\n 'overview' => static::index(),\n 'target_set' => static::list_target_sets(),\n 'product_set' => static::list_product_sets(),\n 'allocation' => static::list_allocations(),\n 'distribution' => static::list_distributions(),\n );\n }", "public static function filterAdminItemsFormTabs($tabs, $args)\n {\n\n \t$item = $args['item'];\n\n $formSelectProperties = self::getFormSelectProperties();\n $subjectRelations = self::prepareSubjectRelations($item);\n $objectRelations = self::prepareObjectRelations($item);\n \n ob_start();\n include 'item_relations_form.php';\n $content = ob_get_contents();\n ob_end_clean();\n \n $tabs['Item Relations'] = $content;\n return $tabs;\n }", "function __tabs($v){\n $s='<div class=\"tabber\" id=\"mytabber1\" >';\n //outer array\n foreach ($v as $key=>$val1){ \n if(is_array($val1)){ \n //to skip type \n //echo $val; \n $s.='<div class=\"tabbertab\" style=\"padding:5px\">'.\"\\n\";\n\t $s.=' <h2>'.$val1['name'].'</h2>'.\"\\n\";\n\t $s.=' <div style=\"width:50%;\">'.$val1['content'].'</div>'.\"\\n\";\n $s.='</div>';\n }\n }\n \n $s.='</div>';\n //$this->html_text[]=$s;\n $file_prefix='ex';\n $img='load-graphic';\n //loads javascript\n $s.=$this->tabsJS($img,$file_prefix);\n //echo $s;\n return $s;\n //$this->load->view('tabber_view');\n}", "public function filterAdminItemsFormTabs($tabs, $args)\n {\n $item = $args['item'];\n\n $formSelectProperties = get_table_options('ItemRelationsProperty');\n $subjectRelations = self::prepareSubjectRelations($item);\n $objectRelations = self::prepareObjectRelations($item);\n\n ob_start();\n include 'item_relations_form.php';\n $content = ob_get_contents();\n ob_end_clean();\n\n $tabs['Item Relations'] = $content;\n return $tabs;\n }", "function ShowFilterList() {}", "function get_tab_in_view( $current_filter, $filter_base ) {\n\t\t\treturn str_replace( $filter_base, '', $current_filter );\n\t\t}", "public function browseTabs()\n\t{\n\t\tif($this->slug == 'all') {\n\t\t\treturn [\n\t\t\t\t[\"all\", trans('people.criteria.actives')],\n\t\t\t\t['bin', trans('manage.tabs.bin'), '0'],\n\t\t\t\t['search', trans('forms.button.search')],\n\t\t\t];\n\t\t}\n\n\t\t/*-----------------------------------------------\n\t\t| When a particular valid role is being browsed ...\n\t\t*/\n\t\t$array[] = ['all', trans('people.criteria.all')];\n\n\t\tforeach($this->status_rule_array as $key => $string) {\n\t\t\t$array[] = [$key, trans(\"people.criteria.$string\")];\n\t\t}\n\t\t$array[] = ['bin', trans('people.criteria.banned')];\n\t\t$array[] = ['search', trans('forms.button.search')];\n\n\t\treturn $array;\n\t}", "function get_tab_in_view( $current_filter, $filter_base ) {\n\t\treturn str_replace( $filter_base, '', $current_filter );\n\t}", "public function filter();", "function thim_widget_group($tabs)\n{\n $tabs[] = array(\n 'title' => esc_html__('Thim Widget', 'themeplate'),\n 'filter' => array(\n 'groups' => array('thim_widget_group')\n )\n );\n\n return $tabs;\n}", "public function filters()\n {\n //\n }", "function wordpoints_woocommerce_points_coupon_tabs_filter( $tabs ) {\n\n\t$tabs['wordpoints_points'] = array(\n\t\t'label' => __( 'Points', 'wordpoints-woocommerce' ),\n\t\t'target' => 'wordpoints_points_coupon_data',\n\t\t'class' => '',\n\t);\n\n\treturn $tabs;\n}", "function ctabs_content_filter( $content ) {\n\n\t\t// Check single case page\n\t\tif ( get_post_type() === 'cases' && is_single() && isset( $_GET['tab'] ) )\n\t\t\t$content = ( function_exists( 'cases_tab_content_' . $_GET['tab'] ) ) ? call_user_func( 'cases_tab_content_' . $_GET['tab'] ) : '';\n\n\t\treturn $content;\n\t}", "public static function product_data_tabs($tabs)\n {\n }", "public function filters()\n {\n }", "public function test_listTabs() {\n\n }", "public function test_listTabs() {\n\n }", "function ds_log_viewer_unsavable_tabs() {\n\t$tabs = array( 'log-viewer' );\n\n\treturn $tabs;\n}", "function getAllTabs()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_sidebar_tabs');\n\t\t$this->db->where('status', '1');\n\t\t$this->db->order_by('tab_number', 'ASC');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function assetsInlineJsConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter set');\n\n $asset = new Js('<script>alert(\"Hello\");</script>', false);\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "function yz_custom_youzer_tabs_slugs() {\r\n\r\n\t// Init Array.\r\n\t$tabs_slugs = array();\r\n\r\n\t// Get Youzer Custom Tabs\r\n\t$custom_tabs = yz_custom_youzer_tabs();\r\n\r\n\tif ( empty( $custom_tabs ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tforeach ( $custom_tabs as $tab ) {\r\n\t\t$tabs_slugs[] = $tab['tab_slug'];\r\n\t}\r\n\r\n\t// Filter Tabs Slugs\r\n\t$tabs_slugs = apply_filters( 'yz_custom_youzer_tabs_slugs', $tabs_slugs );\r\n\r\n\treturn $tabs_slugs;\r\n\r\n}", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function filters() {\n return array(\n 'controlAcceso - login',\n 'ajax + indexAjax',\n );\n }", "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "function woocommerce_sort_product_tabs($tabs = array())\n {\n }", "function extra_tablenav( $which ) {\n\t\t\n\t\tif( $which == 'top' ) {\n\t\t\t\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"alignleft actions bdpp-shrt-tmpl-list-act\">';\n\t\t\t\n\t\t\t// Action for third party filter\n\t\t\tob_start();\n\t\t\tdo_action( 'bdpp_shrt_tmpl_list_filter' );\n\t\t\t$html .=ob_get_clean();\n\t\t\t\n\t\t\t$html .= '</div><!-- end .bdpp-shrt-tmpl-list-act -->';\n\t\t\t\n\t\t\techo $html;\n \t}\n }", "function fields_map_listing_tabs() {\n\n\t\treturn array(\n\t\t\t'tabs_group' => array(\n\t\t\t\t'name' => __( 'Multi Tabs', 'publisher' ),\n\t\t\t\t'type' => 'group',\n\t\t\t\t'id' => 'tabs_group',\n\t\t\t\t'state' => 'close',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Tabs', 'publisher' ),\n\t\t\t\t'id' => 'tabs',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'' => __( 'No Tab', 'publisher' ),\n\t\t\t\t\t'cat_filter' => __( 'Categories as Tab', 'publisher' ),\n\t\t\t\t\t'sub_cat_filter' => __( 'Sub Categories as Tab', 'publisher' ),\n\t\t\t\t\t'tax_filter' => __( 'Taxonomies as Tab', 'publisher' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Selected Categories as Tab', 'publisher' ),\n\t\t\t\t'id' => 'tabs_cat_filter',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'category_walker' => 'category_walker'\n\t\t\t\t),\n\t\t\t\t'multiple' => true,\n\t\t\t\t'desc' => __( 'Select multiple categories with holding \"Control\" button. this will create multi tab header.', 'publisher' ),\n\t\t\t\t'filter-field' => 'tabs',\n\t\t\t\t'filter-field-value' => 'cat_filter',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Taxonomies as Tab', 'publisher' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'tabs_tax_filter',\n\t\t\t\t'desc' => __( 'Enter here custom taxonomies with \"taxonomy:term_id\" pattern also you can separate multiple with commas. ( ex: genre:200,genre:212,writer:120 )', 'publisher' ),\n\t\t\t\t'filter-field' => 'tabs',\n\t\t\t\t'filter-field-value' => 'tax_filter',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Tabs content type', 'publisher' ),\n\t\t\t\t'id' => 'tabs_content_type',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'deferred' => __( 'Deferred Content', 'publisher' ),\n\t\t\t\t\t'preloaded' => __( 'Preloaded Content', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t'desc' => __( '<strong>Recommended</strong>: Deferred. <br> Use deferred content type to make site loading faster, There is no need to load content\\'s in tabs that maybe users didn\\'t see them.', 'publisher' ),\n\t\t\t),\n\t\t);\n\t}", "public function tabs()\n {\n\n // Check for fade\n if ($this->getSetting('fade') == true)\n {\n\n $fade = 'fade';\n\n } else {\n\n $fade = null;\n\n }\n\n // Save settings\n $this->saveSet('tabs');\n\n // Declare variables\n $lis = null;\n $divs = null;\n $count = 1;\n $return = null;\n\n // Get tabs\n $tabs = $this->getSave('tabs');\n\n // Check tabs\n if (!is_null($tabs))\n {\n\n // Check for array\n if (is_array($tabs))\n {\n\n // Cycle through tabs\n foreach($tabs as $tab)\n {\n\n // Check for name\n if (is_null($tab['name']))\n {\n\n $tab['name'] = 'Tab - ' . $count;\n\n }\n\n // Set class\n $this->class('nav-link');\n\n // Check for active\n if ($tab['active'] == true)\n {\n\n $this->class('active');\n $page = true;\n\n } else {\n\n $page = null;\n\n }\n\n // Check for disabled\n if ($tab['disabled'] == true)\n {\n\n $this->class('disabled');\n\n }\n\n // Check name class\n if (!is_null($tab['nameClass']))\n {\n\n // Check if an array\n if (is_array($tab['nameClass']))\n {\n\n foreach ($tab['nameClass'] as $class)\n {\n\n $this->class($class);\n\n }\n\n } else {\n\n $this->class($tab['nameClass']);\n\n }\n\n }\n\n // Check name attributes\n if (!is_null($tab['nameAtt']))\n {\n\n // Check if an array\n if (is_array($tab['nameAtt']))\n {\n\n foreach ($tab['nameAtt'] as $att)\n {\n\n $this->attribute($att);\n\n }\n\n } else {\n\n $this->attribute($tab['nameAtt']);\n\n }\n\n }\n\n // Check for href\n $href = null;\n if (is_array($tab['divAtt']))\n {\n\n foreach ($tab['divAtt'] as $attribute)\n {\n\n // Get key and value of attribute\n foreach ($attribute as $att => $value)\n {\n\n if ($att == 'href')\n {\n\n $href = $value;\n\n }\n\n }\n\n }\n\n }\n\n // Create button\n if (is_null($href))\n {\n\n // Set unique ID\n $id = $this->setID();\n $this->id($id . '-tab');\n\n // Set attributes\n $this->data('bs-toggle', 'tab');\n $this->data('bs-target', '#' . $id);\n $this->type('button');\n $this->role('tab');\n $this->aria('controls', $id);\n $this->aria('selected', 'true');\n\n $button = $this->button($tab['name']);\n $this->role('presentation');\n\n } else {\n\n // Check for current page\n if (!is_null($page))\n {\n\n $this->aria('current', 'page');\n\n }\n\n // Check for dropdown\n if (!is_null($tab['dropdown']))\n {\n\n $this->class('dropdown-toggle');\n $this->data('bs-toggle', 'dropdown');\n $this->role('button');\n $this->aria('expanded', 'false');\n\n }\n\n $button = $this->a($tab['name'], $href);\n\n // Check for dropdown\n if (!is_null($tab['dropdown']))\n {\n\n $button .= $tab['dropdown'];\n\n $this->class('dropdown');\n\n }\n\n }\n\n // Set class and attribute for list item\n $this->class('nav-item');\n\n // Create list item\n $lis .= $this->tag('li', $button);\n\n // Check if div is set\n if (!is_null($tab['div']))\n {\n\n // Set div class\n $this->class('tab-pane');\n $this->class($fade);\n\n // Check if active\n if ($tab['active'] == true)\n {\n\n $this->class('show active');\n\n }\n\n // Set id\n $this->id($id);\n\n // Set attributes\n $this->role('tabpanel');\n $this->aria('labelledby', $id . '-tab');\n\n // Check div class\n if (!is_null($tab['divClass']))\n {\n\n // Check if an array\n if (is_array($tab['divClass']))\n {\n\n foreach ($tab['divClass'] as $class)\n {\n\n $this->class($class);\n\n }\n\n } else {\n\n $this->class($tab['divClass']);\n\n }\n\n }\n\n // Check div attributes\n if (!is_null($tab['divAtt']))\n {\n\n // Check if an array\n if (is_array($tab['divAtt']))\n {\n\n foreach ($tab['divAtt'] as $att)\n {\n\n $this->attribute($att);\n\n }\n\n } else {\n\n $this->attribute($tab['divAtt']);\n\n }\n\n }\n\n // Create div element\n $divs .= $this->adiv($tab['div']);\n\n }\n\n // Increase count\n $count++;\n\n }\n\n }\n\n }\n\n // Reset tabs\n $this->reset('tabs');\n\n // Restore settings\n $this->restore('tabs');\n\n // Set new id\n $id = $this->setID();\n\n // Check for list items\n if (!is_null($lis))\n {\n\n // Set class\n $this->class('nav nav-tabs');\n\n // Set attributes\n $this->id($id . 'Tabs');\n $this->role('tablist');\n\n $return .= $this->tag('ul', $lis);\n\n }\n\n // Check for divs\n if (!is_null($divs))\n {\n\n // Set class\n $this->class('tab-content');\n\n // Set attribute\n $this->id($id . 'Content');\n\n $return .= $this->adiv($divs);\n\n }\n\n // Return element\n return $return;\n\n }", "function beforeFilter() {\n\n }", "function test_tab( $tabs ) {\n\n\t\t$ns = 'uniquetoyourshit';\n\n\t $tabs[$ns] = 'Balls Awesome';\n\n\t return $tabs;\n\t}", "public function getTabs()\n {\n return $this->tabs;\n }", "function beforeFilter() {\n parent::beforeFilter();\n \n // Sets tab to open for redirects\n $this->redirectTab = 'id';\n }", "function current_filter()\n{\n}", "public function registerTabs()\n\t\t{\n\t\t\t$tabs = array();\n\t\t\t$out = array();\n\t\t\t\n\t\t\t$tabs = apply_filters('cn_register_settings_tabs', $tabs);\n\t\t\t$tabs = apply_filters('cn_filter_settings_tabs', $tabs);\n\t\t\t//var_dump($tabs);\n\t\t\t\n\t\t\tif ( empty($tabs) ) return array();\n\t\t\t\n\t\t\tforeach ( $tabs as $key => $tab )\n\t\t\t{\n\t\t\t\t$out[$tab['page_hook']][] = $tab;\n\t\t\t}\n\t\t\t\n\t\t\t$this->tabs = $out;\n\t\t}", "public function getTabs(array $params)\n {\n return array(\n 0 => array(\n 'name' => __('High Low', true),\n 'active' => $params['action'] == 'admin_highlow',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_highlow'\n )\n ),\n 1 => array(\n 'name' => __('BlackJack', true),\n 'active' => $params['action'] == 'admin_blackjack',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_blackjack'\n )\n ),\n 2 => array(\n 'name' => __('Roulettes', true),\n 'active' => $params['action'] == 'admin_roulette',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_roulette'\n )\n ),\n\t\t\t3 => array(\n 'name' => __('Baccarat', true),\n 'active' => $params['action'] == 'admin_baccarat',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_baccarat'\n )\n ),\n\t\t\t4 => array(\n 'name' => __('Caribbean Stud', true),\n 'active' => $params['action'] == 'admin_stud',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_stud'\n )\n ),\n\t\t\t5 => array(\n 'name' => __('Scratch fruit', true),\n 'active' => $params['action'] == 'admin_scratch',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_scratch'\n )\n ),\n\t\t\t6 => array(\n 'name' => __('Slot Christmas', true),\n 'active' => $params['action'] == 'admin_slot_christmas',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_christmas'\n )\n ),\n\t\t\t7 => array(\n 'name' => __('Slot chicken', true),\n 'active' => $params['action'] == 'admin_slot_chicken',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_chicken'\n )\n ),\n\t\t\t8 => array(\n 'name' => __('Slot ramses', true),\n 'active' => $params['action'] == 'admin_slot_ramses',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_ramses'\n )\n ),\n\t\t\t9 => array(\n 'name' => __('Slot space', true),\n 'active' => $params['action'] == 'admin_slot_space',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_space'\n )\n ),\n\t\t\t10 => array(\n 'name' => __('Slot fruits', true),\n 'active' => $params['action'] == 'admin_slot_fruits',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_fruits'\n )\n ),\n 11 => array(\n 'name' => __('Keno', true),\n 'active' => $params['action'] == 'admin_keno',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_keno'\n )\n ),\n 12 => array(\n 'name' => __('Bingo', true),\n 'active' => $params['action'] == 'admin_bingo',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_bingo'\n )\n ),\n 13 => array(\n 'name' => __('Greyhound Racing', true),\n 'active' => $params['action'] == 'admin_greyhound',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_greyhound'\n )\n ),\n 14 => array(\n 'name' => __('Horse Racing', true),\n 'active' => $params['action'] == 'admin_horse',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_horse'\n )\n ),\n 15 => array(\n 'name' => __('Soccer slots', true),\n 'active' => $params['action'] == 'admin_slot_soccer',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_soccer'\n )\n ),\n 16 => array(\n 'name' => __('Soccer slots 3D', true),\n 'active' => $params['action'] == 'admin_slot_soccer3d',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_soccer3d'\n )\n ),\n 17 => array(\n 'name' => __('Arabian slots', true),\n 'active' => $params['action'] == 'admin_slot_arabian',\n 'url' => array(\n 'plugin' => 'casino',\n 'controller' => 'GameLogs',\n 'action' => 'admin_slot_arabian'\n )\n )\n );\n }", "function beforeFilter() {\n\t}", "public function filters() \n\t{\n\t\treturn array();\n\t}", "function tabs($data, $ulOptions = array()) { \n $out = array(); \n $points = array(); \n $here = Router::parse($this->here); \n $checks = array('controller', 'action'); \n \n //normalize urls \n foreach($data as $name => $options) { \n $points[$name] = 0; \n \n if (!isset($options['match'])) { \n continue; \n } \n \n $url = Router::parse(Router::normalize($options['match'])); \n \n foreach($checks as $check) { \n if ($url[$check] == $here[$check]) { \n $points[$name]++; \n } else { \n continue 2; \n } \n } \n \n foreach($url['pass'] as $key => $value) { \n if (isset($here['pass'][$key]) && $value == $here['pass'][$key]) { \n $points[$name]++; \n } \n } \n } \n \n arsort($points); \n $activeKey = array_shift(array_flip($points)); \n \n foreach($data as $name => $options) { \n $link = $options['link']; \n $out[] = $this->Html->tag('li', $this->Html->link($this->Html->tag('span', $name), $link, array(), null, false), ife($name == $activeKey, array('class' => 'active'))); \n } \n \n return $this->Html->tag('ul', join(\"\\n\", $out), $ulOptions); \n }", "public function testJavaScriptOrdering() {\n $this->drupalGet('form_test/vertical-tabs');\n $content = $this->getSession()->getPage()->getContent();\n $position1 = strpos($content, 'core/misc/vertical-tabs.js');\n $position2 = strpos($content, 'core/misc/collapse.js');\n $this->assertNotFalse($position1);\n $this->assertNotFalse($position2);\n $this->assertGreaterThan($position1, $position2, 'vertical-tabs.js is included before collapse.js');\n }", "function sigma_processor_settings_tabs(){\r\n if ( isset ( $_GET['tab'] ) ) :\r\n $current = $_GET['tab'];\r\n else:\r\n $current = 'decidir';\r\n endif;\r\n\r\n $links = array();\r\n foreach( $this->tabs as $tab => $name ) :\r\n if ( $tab == $current ) :\r\n $links[] = '<a class=\"nav-tab nav-tab-active\"\r\n href=\"?page=manage-sigma-processors&tab=' .\r\n $tab . '\" > ' . $name . '</a>';\r\n else :\r\n $links[] = '<a class=\"nav-tab\"\r\n href=\"?page=manage-sigma-processors&tab=' .\r\n $tab . '\" >' . $name . '</a>';\r\n endif;\r\n endforeach;\r\n\r\n echo '<h2 class=\"nav-tab-wrapper\">';\r\n foreach ( $links as $link ):\r\n echo $link;\r\n endforeach;\r\n echo '</h2>';\r\n }", "public function onAllowedItemsFilter(LinkBrowserAllowedTabsFilterEvent $event): void\n {\n $allowedTabs = $event->getAllowedTabs();\n $config = $event->getFieldConfig();\n \n // All link sets are allowed in rte fields\n if (isset($config['richtextConfigurationName'])) {\n return;\n }\n \n // Extract the \"@linkSets:\" key from the blindLinkOptions parameter\n $blindOptions = Arrays::makeFromStringList($config['params']['blindLinkOptions'] ?? '');\n $linkSetOptions = null;\n foreach ($blindOptions as $option) {\n if (strpos($option, '@linkSets:') === 0) {\n $linkSetOptions = $option;\n break;\n }\n }\n \n if ($linkSetOptions === null) {\n $linkSetOptions = false;\n } else {\n $linkSetOptions = \\GuzzleHttp\\json_decode(urldecode(substr($linkSetOptions, 10)));\n }\n \n // Filter out the link sets, either none (TRUE), all (FALSE) or just keep some (ARRAY)\n $event->setAllowedTabs(\n array_filter($allowedTabs, static function (string $v) use ($linkSetOptions): bool {\n if ($linkSetOptions === true) {\n return true;\n }\n \n if (strpos($v, 'linkSet_') === 0) {\n if ($linkSetOptions === false) {\n return false;\n }\n \n return is_array($linkSetOptions) && in_array(substr($v, 8), $linkSetOptions, true);\n }\n \n return true;\n })\n );\n }", "public function filters() \n {\n return array();\n }", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function getTab();", "public function printNeededJSFunctions() {}", "private static function get_product_data_tabs()\n {\n }", "public function getTabs()\n {\n return [\n [\n 'name' => 'Training',\n 'ParentClassName' => 'AdminParentModulesSf',\n 'class_name' => self::CONTROLLER_PARENT,\n 'visible' => false,\n ],\n [\n 'name' => 'Configuration',\n 'ParentClassName' => self::CONTROLLER_PARENT,\n 'class_name' => self::CONTROLLER_CONFIG,\n ],\n [\n 'name' => 'Article',\n 'ParentClassName' => self::CONTROLLER_PARENT,\n 'class_name' => self::CONTROLLER_ARTICLE,\n ]\n ];\n }", "function joints_woo_product_data_tabs( $tabs )\n{\n\t// Other default values for 'attribute' are; general, inventory, shipping, linked_product, variations, advanced\n\t$tabs['attribute']['class'][] = 'hide_if_simple';\n\t$tabs['advanced']['class'][] = 'hide_if_simple hide_if_variable';\n\n\treturn $tabs;\n}", "function tabs() {\n $tabs = array(\n 'security' => array(\n 'title' => __( 'Security', WPXTREME_TEXTDOMAIN ),\n 'view' => 'users-settings-security-view'\n ),\n 'extrafields' => array(\n 'title' => __( 'Extra Fields', WPXTREME_TEXTDOMAIN ),\n 'view' => 'users-settings-extrafields-view'\n ),\n 'registration' => array(\n 'title' => __( 'Registration', WPXTREME_TEXTDOMAIN ),\n 'view' => 'users-settings-registration-view'\n ),\n );\n return $tabs;\n }", "public function filterSuite(\\PHPUnit_Framework_TestSuite $testSuite);", "public function Tabs()\r\n {\r\n return $this->arrTabs;\r\n }", "function getTabs(){\n\t\treturn array_keys($this->tabs());\n\t}", "private function getFilterScript(){\n //DataTable Filtern Allgemein\n $ausgabe = \"$( '.filter' ).on( 'keyup change', function () {\\n\";\n $ausgabe .= \" let i = $(this).attr('data-column')-1\\n\";\n //$ausgabe .= \" console.log(i + ' - ' + this.value)\\n\";\n $ausgabe .= \" if ( table.column(i).search() !== this.value ) {\\n\";\n $ausgabe .= \" table\\n\";\n $ausgabe .= \" .column(i)\\n\";\n $ausgabe .= \" .search( this.value )\\n\";\n $ausgabe .= \" .draw();\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \"} );\\n\";\n\n //DataTable Filtern Exact\n $ausgabe .= \"$( '.filterExact' ).on( 'keyup change', function () {\\n\";\n $ausgabe .= \" let i = $(this).attr('data-column')-1\\n\";\n //$ausgabe .= \" console.log(i + ' - ' + this.value)\\n\";\n $ausgabe .= \" if ( table.column(i).search() !== this.value ) {\\n\";\n $ausgabe .= \" if ( this.value == '' ) {\\n\";\n $ausgabe .= \" regex = '';\\n\";\n $ausgabe .= \" }else{\\n\";\n $ausgabe .= \" regex = '^' + this.value + '$';\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \" table\\n\";\n $ausgabe .= \" .column(i)\\n\";\n $ausgabe .= \" .search( regex, true, false )\\n\";\n $ausgabe .= \" .draw();\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \"} );\\n\";\n\n\n //Filter zurücksetzen\n $ausgabe .= \"$('.filterclear').on('click', function(){\\n\";\n $ausgabe .= \" $('.filter').val('').change();\\n\";\n $ausgabe .= \" $('.filterExact').val('').change();\\n\";\n $ausgabe .= \"});\\n\";\n\n return $ausgabe;\n }", "public function aw_critic_ratings_settings_tabs( $tabs ){\n\n \t$tabs['critic_rating'] = array(\n \t\t'label' => 'Critic Rating',\n \t\t'target' => 'critic_rating_data',\n \t\t'priority' => 21,\n \t);\n \treturn $tabs;\n\n }", "private function tabs()\n\t{\n\t\treturn array\n\t\t(\n\t\t\t$this->addon_id => array\n\t\t\t(\n\t\t\t\t\"preview\" => array(\n\t\t\t\t\t'visible'\t\t=> 'true',\n\t\t\t\t\t'collapse'\t\t=> 'false',\n\t\t\t\t\t'htmlbuttons'\t=> 'false',\n\t\t\t\t\t'width'\t\t\t=> '100%'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function parseTabs($text){\n\n$attributes=self::parseAll($text);\n//echo_array($attributes);\nforeach ($attributes as $key=>$val){\n $keys[$key]=split(',',$val);\n }\n \n //echo_array($keys);\n $number=count($keys['name']);\n foreach($keys as $key=>$value){\n for ($i=0;$i<$number;$i++){\n $controls[$i][$key]=$value[$i];\n //handles repetitive attributes gets value from [0]\n if ($controls[$i][$key]==''){$controls[$i][$key]=$controls[0][$key];}\n } \n } \n //echo 'CONTROLS';\n //echo_array($controls);\n\n $i=0;\n $s='<div class=\"tabber\" id=\"mytabber1\" >';\n for ($i=0;$i<count($controls);$i++){ //needs correction\n $s.='<div class=\"tabbertab\" style=\"padding:5px\">';\n\t $s.='<h2>'.$controls[$i]['name'].'</h2>';\n\t $s.='<div style=\"width:98%;\">'.$controls[$i]['content'].'</div>';\n $s.='</div>';\n \n }\n $s.='</div>';\n $this->html_text[]=$s;\n $file_prefix=$attributes['fileprefix'];\n $img=$attributes['loadgraphic'];\n //loads javascript\n $this->html_text[]=self::tabsJS($img,$file_prefix);\n \n\n}", "function remove_product_tabs( $tabs ) {\n unset( $tabs['additional_information'] );\n return $tabs;\n}", "function filterJadwal(){\n\t\t$res = $this->LogistikTransModel->getFilterKodeDetailKursus($_GET['q']);\n\t\techo json_encode($res);\n\t}", "public function getFilters()\n\t{\n\t\treturn array('minimee' => new \\Twig_Filter_Method($this, 'minimeeFilter'));\n\t}", "function sigma_settings_tabs(){\r\n if ( isset ( $_GET['tab'] ) ) :\r\n $current = $_GET['tab'];\r\n else:\r\n $current = 'utilities';\r\n endif;\r\n\r\n $links = array();\r\n foreach( $this->tabs as $tab => $name ) :\r\n if ( $tab == $current ) :\r\n $links[] = '<a class=\"nav-tab nav-tab-active\"\r\n href=\"?post_type=events&page=manage-sigma-events&tab=' .\r\n $tab . '\" > ' . $name . '</a>';\r\n else :\r\n $links[] = '<a class=\"nav-tab\"\r\n href=\"?post_type=events&page=manage-sigma-events&tab=' .\r\n $tab . '\" >' . $name . '</a>';\r\n endif;\r\n endforeach;\r\n\r\n echo '<h2 class=\"nav-tab-wrapper\">';\r\n foreach ( $links as $link ):\r\n echo $link;\r\n endforeach;\r\n echo '</h2>';\r\n }", "public function filters()\n {\n return array(\n );\n }", "public function renderToTab(): array\n {\n $this->renderAll();\n\n return [\n 'atkjs' => $this->getJsRenderActions(),\n 'html' => $this->renderTemplateToHtml(),\n ];\n }", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function getTableTabs ()\r\n\t\t{\r\n\t\t\t$items[0] = array('name' => 'COM_COSTBENEFITPROJECTION_TABLES_WORK_DAYS_LOST_SUMMARY_TITLE', 'view' => 'wdls', 'img' => 'media/com_costbenefitprojection/images/tables-48.png');\r\n\t\t\t\r\n\t\t\t// Cost Summary\r\n\t\t\t$items[1] = array('name' => 'COM_COSTBENEFITPROJECTION_TABLES_COST_SUMMARY_TITLE', 'view' => 'cs', 'img' => 'media/com_costbenefitprojection/images/tables-48.png');\r\n\t\t\t\r\n\t\t\t// Calculated Costs in Detail\r\n\t\t\t$items[2] = array('name' => 'COM_COSTBENEFITPROJECTION_TABLES_CALCULATED_COST_IN_DETAIL_TITLE', 'view' => 'ccid', 'img' => 'media/com_costbenefitprojection/images/tables-48.png');\r\n\t\t\t\r\n\t\t\t// Intervention Net Benefit\r\n\t\t\t$items[3] = array('name' => 'COM_COSTBENEFITPROJECTION_TABLES_INTERVENTION_NET_BENEFIT_TITLE', 'view' => 'inb', 'img' => 'media/com_costbenefitprojection/images/tables-48.png');\r\n\t\t\t\r\n\t\t\treturn $items;\r\n\t\t}", "public function getTabTitle()\n {\n return Mage::helper('layeredlanding')->__('Conditions');\n }", "public function _filter_fw_ext_social_tabs( $tabs ) {\n\t\t$twitter_tab = array(\n\t\t\t'twitter-tab' => array(\n\t\t\t\t'title' => __( 'Twitter', 'fw' ),\n\t\t\t\t'type' => 'tab',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'general-box' => array(\n\t\t\t\t\t\t'title' => __( 'API Settings', 'fw' ),\n\t\t\t\t\t\t'type' => 'box',\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'twitter-consumer-key' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Consumer Key', 'fw' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Enter Twitter Consumer Key.', 'fw' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'twitter-consumer-secret' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Consumer Secret', 'fw' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Enter Twitter App Secret.', 'fw' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'twitter-access-token' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Access Token', 'fw' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Enter Twitter Access Token.', 'fw' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'twitter-access-token-secret' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Access Token Secret', 'fw' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Enter Twitter Access Token Secret.', 'fw' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tapply_filters( 'fw_ext_social_twitter_general_box_options', array() )\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tapply_filters( 'fw_ext_social_twitter_boxes_options', array() )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\treturn array_merge( $tabs, $twitter_tab );\n\t}", "public function actionIndex()\n {\n $this->can('viewSort');\n $tabs = Tabs::find()->orderBy('position')->asArray()->all();\n $tabs_sorted = [];\n foreach ($tabs as $tab) {\n $tabs_sorted[$tab['parent']][] = ['content' => \"<div id=\\\"$tab[id]\\\" data-pos=\\\"$tab[position]\\\">$tab[name]</div>\", 'disabled' => !Yii::$app->user->can('modifySort')];\n }\n return $this->render('index', ['tabs' => $tabs_sorted]);\n }", "public function filter()\n {\n \n }", "function yz_wc_tab_filter_bar() { ?>\n\n\t<div class=\"item-list-tabs yz-default-subnav no-ajax\" id=\"subnav\" aria-label=\"<?php esc_attr_e( 'Member secondary navigation', 'youzer' ); ?>\" role=\"navigation\">\n\t <ul>\n\n\t <?php bp_get_options_nav(); ?>\n\n\t </ul>\n\t</div><!-- .item-list-tabs -->\n\n\t<?php\n}", "public function run() {\n if ($this->filters) {\n // Filter tabs allowed\n $historyTabs = array(\n 'all' => Yii::t('app', 'All'),\n 'action' => Yii::t('app', '{actions}', array(\n '{actions}' => Modules::displayName(true, 'Actions'),\n )),\n 'overdueActions' => Yii::t('app', 'Overdue {actions}', array(\n '{actions}' => Modules::displayName(true, 'Actions'),\n )),\n 'incompleteActions' => Yii::t('app', 'Incomplete {actions}', array(\n '{actions}' => Modules::displayName(true, 'Actions'),\n )),\n 'attachments' => Yii::t('app', 'Attachments'),\n 'call' => Yii::t('app', 'Calls'),\n 'note' => Yii::t('app', 'Comments'),\n 'email' => Yii::t('app', 'Emails'),\n 'event' => Yii::t('app', 'Events'),\n 'marketing' => Yii::t('app', 'Marketing'),\n 'time' => Yii::t('app', 'Logged Time'),\n 'products' => Yii::t('app', '{products}', array(\n '{products}' => Modules::displayName(true, 'Products'),\n )), \n 'quotes' => Yii::t('app', 'Quotes'),\n 'webactivity' => Yii::t('app', 'Web Activity'),\n 'workflow' => Yii::t('app', '{process}', array(\n '{process}' => Modules::displayName(true, 'Workflow'),\n )),\n );\n $profile = Yii::app()->params->profile;\n if (isset($profile)) { // Load their saved preferences from the profile\n // No way to give truly infinite pagination, fudge it by making it 10,000\n $this->pageSize = $profile->historyShowAll ? 10000 : 10;\n $this->relationships = $profile->historyShowRels;\n }\n // See if we can filter for what they wanted\n if (isset($_GET['history']) && array_key_exists($_GET['history'], $historyTabs)) {\n $this->historyType = $_GET['history'];\n }\n if (isset($_GET['pageSize'])) {\n $this->pageSize = $_GET['pageSize'];\n if (isset($profile)) {\n // Save profile preferences\n $profile->historyShowAll = $this->pageSize > 10 ? 1 : 0;\n $profile->update(array('historyShowAll'));\n }\n }\n if (isset($_GET['relationships'])) {\n $this->relationships = $_GET['relationships'];\n if (isset($profile)) {\n $profile->historyShowRels = $this->relationships; // Save profile preferences\n $profile->update(array('historyShowRels'));\n }\n }\n } else {\n $historyTabs = array();\n }\n // Register JS to make the history tabs update the history when selected.\n Yii::app()->clientScript->registerScriptFile(\n Yii::app()->getBaseUrl() . '/js/ActionHistory.js');\n Yii::app()->clientScript->registerScriptFile(\n Yii::app()->getBaseUrl() . '/js/EnlargeableImage.js',\n CClientScript::POS_END);\n Yii::app()->clientScript->registerScript('history-tabs', \"\n x2.actionHistory = new x2.ActionHistory ({\n relationshipFlag: {$this->relationships}\n });\n \", CClientScript::POS_END);\n\n Yii::app()->clientScript->registerCssFile(\n Yii::app()->theme->baseUrl.'/css/actionHistory.css'); \n\n $this->widget('application.components.X2ListView', array(\n 'pager' => array(\n 'class' => 'CLinkPager',\n 'header' => '',\n 'firstPageCssClass' => '',\n 'lastPageCssClass' => '',\n 'prevPageLabel' => '<',\n 'nextPageLabel' => '>',\n 'firstPageLabel' => '<<',\n 'lastPageLabel' => '>>',\n ),\n 'id' => 'history',\n 'dataProvider' => $this->getHistory(),\n 'viewData' => array(\n // Pass relationship flag to the views so they can modify their layout slightly\n 'relationshipFlag' => $this->relationships,\n ),\n 'itemView' => 'application.modules.actions.views.actions._historyView',\n 'htmlOptions' => array('class' => 'action list-view'),\n 'template' =>\n '<div class=\"form action-history-controls\">' .\n CHtml::dropDownList(\n 'history-selector', $this->historyType, $historyTabs, array(\n 'class' => 'x2-select'\n )\n ) .\n '<span style=\"margin-top:5px;\" class=\"right\">' .\n CHtml::link(\n Yii::t('app', 'Toggle Text'), '#', array(\n 'id' => 'history-collapse', 'class' => 'x2-hint',\n 'title' =>\n Yii::t('app', 'Click to toggle showing the full text of History items.')\n )\n )\n . ' | ' . CHtml::link(\n Yii::t('app', 'Show All'), '#', array(\n 'id' => 'show-history-link', 'class' => 'x2-hint',\n 'title' =>\n Yii::t('app', 'Click to increase the number of History items shown.'),\n 'style' => $this->pageSize > 10 ? 'display:none;' : ''\n )\n )\n . CHtml::link(\n Yii::t('app', 'Show Less'), '#', array(\n 'id' => 'hide-history-link', 'class' => 'x2-hint', '\n title' =>\n Yii::t('app', 'Click to decrease the number of History items shown.'),\n 'style' => $this->pageSize > 10 ? '' : 'display:none;'\n )\n )\n . ((!Yii::app()->user->isGuest) ?\n ' | ' . CHtml::link(\n Yii::t('app', 'Relationships'), '#', array(\n 'id' => 'show-relationships-link', 'class' => 'x2-hint',\n 'title' =>\n Yii::t('app', 'Click to toggle showing actions associated with related records.'))) : '')\n . '</span></div> {sorter}{items}{pager}',\n ));\n }", "public function filterAdminItemsFormTabs($tabs)\n {\n\n // Construct the form.\n $item = get_current_record('item');\n $form = new TeiDisplay_Form_Text(array('item' => $item));\n $form->removeDecorator('form');\n\n // If the item exists.\n if ($item->exists()) {\n\n // Try to get a text.\n $text = $this->_texts->findByItem($item);\n\n // Populate fields.\n if ($text) $form->populate(array(\n 'teitext' => $text->file_id,\n 'teistylesheet' => $text->sheet_id\n ));\n\n }\n\n // Add tab.\n $tabs['TEI'] = $form;\n return $tabs;\n\n }", "function admin_validate_tab () {\n\t\t\t$tab = filter_input (INPUT_GET, 'tab', FILTER_SANITIZE_STRING);\n\t\t\tif ($tab !== FALSE && $tab !== null) {\n\t\t\t\tif (array_key_exists ($tab, self::$tab_names)) {\n\t\t\t\t\treturn $tab;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tab = 'maps';\n\t\t\treturn $tab;\n\t\t}", "public function filter($content){ }", "public function getFilter ();", "public function onCreate()\r\n {\r\n //avoid double creation\r\n if ($this->isCreated())\r\n {\r\n return $this->getContent();\r\n }\r\n\r\n $tab = new \\View\\Ext\\Tab('tab-holder-search-field');\r\n $tab->add('tab-list', 'Listagem', '', true, 'list');\r\n\r\n $this->createTabFilter($tab);\r\n $this->createTabColumn($tab);\r\n $this->createTabGroup($tab);\r\n $this->createTabSave($tab);\r\n $this->setContent($tab);\r\n\r\n $filterSmart = new \\Filter\\Smart();\r\n\r\n $this->byId('tab-holder-search-fieldHead')->append($filterSmart->getInput());\r\n\r\n $content = [];\r\n $content[] = new \\View\\Div('filters-tooltip', null, 'filters-tooltip');\r\n $content[] = $this->createTable();\r\n $this->byId('tab-list')->append($content);\r\n\r\n //visualize hidden tab head if only has one tab\r\n if ($tab->getTabCount() == 1)\r\n {\r\n $this->byId('tab-listLabel')->css('visibility', 'hidden');\r\n }\r\n\r\n \\App::addJs(\"mountExtraFiltersLabel();\");\r\n\r\n return $this->content;\r\n }", "public function getFilters() {}", "public function test_filters()\n {\n //Visit page\n // Test filters: completed, all, pending etc...\n\n }", "public function filters()\n {\n return [\n //\n ];\n }", "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['quienes_titulo'] = $this->_getSanitizedParam(\"quienes_titulo\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }" ]
[ "0.70840365", "0.6618463", "0.6575623", "0.6345057", "0.62372077", "0.6130491", "0.59630924", "0.5941107", "0.5904445", "0.5872205", "0.5857564", "0.58514863", "0.57932603", "0.5770417", "0.5751963", "0.5680263", "0.5676364", "0.56520945", "0.5584399", "0.5581894", "0.5553898", "0.5465618", "0.53785324", "0.5353018", "0.53516763", "0.53378266", "0.53326756", "0.5331219", "0.52712345", "0.5261226", "0.52563345", "0.52456003", "0.522668", "0.5225195", "0.52149314", "0.52149314", "0.521491", "0.52124447", "0.5212103", "0.5208027", "0.5207544", "0.51844764", "0.51835334", "0.51662236", "0.51654404", "0.51632243", "0.5159454", "0.5158689", "0.51524186", "0.5137641", "0.51352614", "0.5132494", "0.513116", "0.5122192", "0.51100034", "0.509591", "0.5094358", "0.50752836", "0.50715274", "0.50704217", "0.5069578", "0.5065446", "0.5065446", "0.5057268", "0.50548464", "0.50466573", "0.5042997", "0.5032205", "0.50316036", "0.5025951", "0.50003415", "0.49930584", "0.49876574", "0.4986257", "0.49803293", "0.49740455", "0.49696392", "0.4962705", "0.49561578", "0.4952172", "0.49444777", "0.49436513", "0.49430907", "0.49418706", "0.49384937", "0.49352995", "0.49342617", "0.4933098", "0.49194467", "0.4916813", "0.49164745", "0.49112022", "0.49102905", "0.4903449", "0.48943168", "0.48899698", "0.48873776", "0.48835924", "0.48818782", "0.48789617" ]
0.83355975
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() tabs comment
Тесты Phalcon\Assets\Filters\Jsmin :: filter() вкладка комментарий
public function assetsFiltersJsminFilterTabsComment(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - tabs comment'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $actual = $jsmin->filter( "/** this is a comment */ if ( a == b ) { document . writeln('\t') ; /** this is a comment */ }" ); $I->assertEquals( "\nif(a==b){document.writeln('\t');}", $actual ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs newlines');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $expected = \"\\n\" . 'a=100;';\n $actual = $jsmin->filter(\"\\t\\ta\\t\\r\\n= \\n \\r\\n100;\\t\");\n $I->assertEquals($expected, $actual);\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "public function assetsFiltersJsminFilterComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('/** this is a comment */')\n );\n }", "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "public function beforeFilter() { \n\t\t$this->show_tabs();\n\t}", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(86);\n\t}", "function strip_debugging($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (preg_match(\"/^\\s*log\\(/\", $line)) continue;\r\n\t\t$newjs[] = $line;\r\n\t}\r\n\treturn $newjs;\r\n}", "public function printNeededJSFunctions() {}", "function template_prefilter_jstrip($tpl_source, &$template_object)\r\n{\r\n\treturn preg_replace_callback(\"/\\{jstrip\\}(.*?)\\{\\/jstrip\\}/s\",\"template_prefilter_jstrip_cb\", $tpl_source);\r\n}", "public function js_code()\n {\n if (count($this->page_items) == 0)\n return '';\n\n $js_code = $this->_js_code_listo().\"\\n\";\n $js_code .= $this->_js_code_tablesorter().\"\\n\";\n\n return '$(function() {\n '.$js_code.'\n });';\n }", "function preview_theme_ob_filter_callback($matches)\n{\n}", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "public function tabs()\r\n {\r\n $this->tools();\r\n $this->js('jbassets:js/widget/tabs.js');\r\n $this->less('jbassets:less/widget/tabs.less');\r\n }", "function wp_filter_comment($commentdata)\n{\n}", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "function compress($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (strpos($line, \"//\") !== false) $line = substr($line, 0, strpos($line, \"//\"));\r\n\t\t$line = trim($line);\r\n\t\tif ($line != \"\") $newjs[] = $line;\r\n\t}\r\n\t$jsstr = implode(\"\\t\\n\", $newjs);\r\n\t$jsstr = preg_replace(\"!\\s*/\\*.*?\\*/\\s*!s\", \"\\n\", $jsstr);\r\n\t$js = explode(\"\\t\", $jsstr);\r\n\treturn $js;\r\n}", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "function preview_theme_ob_filter($content)\n{\n}", "public function itKeepsNewlinesAfterJavaScriptComments()\n {\n $input = \"<script>\n//<![CDATA[\nvar skipTierPricePercentUpdate = true;\n\nif (skipTierPricePercentUpdate) {\n // leap year assumption for unknown year\n return 29;\n}\";\n $this->assertSame(\n '<script> //<![CDATA[\n var skipTierPricePercentUpdate = true; if (skipTierPricePercentUpdate) { // leap year assumption for unknown year\n return 29; }',\n $this->subject->apply($input)\n );\n }", "function bmab_add_filter_prefilter($content)\n{\n $pattern = '#</ul>\\s*<div class=\\'noFilter\\'>#ms';\n $replacement = '\n <li id=\"filter_added_by\" {if !isset($filter.added_by)}style=\"display:none\"{/if}>\n <a href=\"#\" class=\"removeFilter\" title=\"remove this filter\"><span>[x]</span></a>\n <input type=\"checkbox\" name=\"filter_added_by_use\" class=\"useFilterCheckbox\" {if isset($filter.added_by)}checked=\"checked\"{/if}>\n <p>{\\'Added by %s\\'|@translate|sprintf:\"\"}</p>\n <select name=\"filter_added_by\" size=\"1\">\n {html_options options=$added_by_options selected=$added_by_selected}\n </select>\n </li>\n </ul>\n\n <div class=\"noFilter\">';\n $content = preg_replace($pattern, $replacement, $content);\n\n // then we add the \"Added by\" in the filter selector\n $pattern = '#</div>\\s*<a id=\"removeFilters\"#ms';\n $replacement = '\n <a data-value=\"filter_added_by\" {if isset($filter.added_by)}disabled=\"disabled\"{/if}>{\\'Added by %s\\'|@translate|sprintf:\"\"}</a>\n </div>\n <a id=\"removeFilters\"';\n $content = preg_replace($pattern, $replacement, $content);\n\n // add specific CSS instructions\n $pattern = '#{footer_script}#';\n $replacement = '{combine_css path=\"plugins/batch_manager_added_by/batch_manager.css\"}\n{*\n{if $themeconf.id eq \"roma\"}{combine_css path=\"plugins/batch_manager_added_by/batch_manager_roma.css\"}{/if}\n*}\n\n{footer_script}';\n $content = preg_replace($pattern, $replacement, $content);\n\n return $content;\n}", "public function filter($content){ }", "protected function renderScriptJs(){\n return str_replace('DummyClass', $this->componentName, BladeComponentsConstants::SCRIPT_CREATION_JS_COMMENT);\n }", "function education_base_widgets_tab($tabs){\n $tabs[] = array(\n 'title' => __('AT Education Base Widgets', 'education-base'),\n 'filter' => array(\n 'groups' => array('education-base')\n )\n );\n return $tabs;\n}", "public function testJavaScriptOrdering() {\n $this->drupalGet('form_test/vertical-tabs');\n $content = $this->getSession()->getPage()->getContent();\n $position1 = strpos($content, 'core/misc/vertical-tabs.js');\n $position2 = strpos($content, 'core/misc/collapse.js');\n $this->assertNotFalse($position1);\n $this->assertNotFalse($position2);\n $this->assertGreaterThan($position1, $position2, 'vertical-tabs.js is included before collapse.js');\n }", "public function filterAdminNavigationMain($tabs)\n {\n $tabs[] = array('label' => 'TEI', 'uri' => url('tei/stylesheets'));\n return $tabs;\n }", "function qs_list_hooks_filters(){\n\n if( ! defined('WP_DEBUG') || ! WP_DEBUG || ! current_user_can('administrator')){\n return;\n }\n global $wp_filter;\n\n $comment_filters = array ();\n $h1 = '<h1>Current Filters list:</h1>';\n $out = '';\n $toc = '<ul>';\n\n foreach ( $wp_filter as $key => $val ) {\n if ( FALSE !== strpos( $key, 'comment' ) )\n {\n $comment_filters[$key][] = var_export( $val, TRUE );\n }\n }\n\n foreach ( $comment_filters as $name => $arr_vals ) {\n $out .= \"<h2 id=$name>$name</h2><pre>\" . implode( \"\\n\\n\", $arr_vals ) . '</pre>';\n $toc .= \"<li><a href='#$name'>$name</a></li>\";\n }\n\n print \"<pre style='direction:ltr; text-align:left;'>$h1$toc</ul>$out</pre>\";\n}", "function ctabs_content_filter( $content ) {\n\n\t\t// Check single case page\n\t\tif ( get_post_type() === 'cases' && is_single() && isset( $_GET['tab'] ) )\n\t\t\t$content = ( function_exists( 'cases_tab_content_' . $_GET['tab'] ) ) ? call_user_func( 'cases_tab_content_' . $_GET['tab'] ) : '';\n\n\t\treturn $content;\n\t}", "public function quickTagJS()\n\t\t{\n\t\t\techo '<script type=\"text/javascript\">/* <![CDATA[ */';\n\t\t \n\t\t\tforeach ( $this->quickTagIDs as $id ) echo 'quicktags(\"' . $id . '\");'; \n\t\t\t\n\t\t echo '/* ]]> */</script>';\n\t\t}", "function filters()\n {\n }", "function filterHead()\n{\n $patterns = array(\n \"/<!--(?!\\s*\\[).*?-->/s\" => \"\",\n \"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\" => \"\\n\",\n \"/\\n+\\s*</\" => \"\\n\" . $pOptions['spacer'] . \"<\",\n );\n ob_start();\n wp_head();\n echo preg_replace(array_keys($patterns), array_values($patterns), ob_get_clean());\n}", "function __tabs($v){\n $s='<div class=\"tabber\" id=\"mytabber1\" >';\n //outer array\n foreach ($v as $key=>$val1){ \n if(is_array($val1)){ \n //to skip type \n //echo $val; \n $s.='<div class=\"tabbertab\" style=\"padding:5px\">'.\"\\n\";\n\t $s.=' <h2>'.$val1['name'].'</h2>'.\"\\n\";\n\t $s.=' <div style=\"width:50%;\">'.$val1['content'].'</div>'.\"\\n\";\n $s.='</div>';\n }\n }\n \n $s.='</div>';\n //$this->html_text[]=$s;\n $file_prefix='ex';\n $img='load-graphic';\n //loads javascript\n $s.=$this->tabsJS($img,$file_prefix);\n //echo $s;\n return $s;\n //$this->load->view('tabber_view');\n}", "function printFooterJSIncluddes(){\n\t}", "public function assetsInlineJsConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter set');\n\n $asset = new Js('<script>alert(\"Hello\");</script>', false);\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "public function getCompressJavascript() {}", "public function filter_theme_act_clickheat_admin_js()\n\t{\n\t\theader(\"Content-Type: text/javascript\");\n\t\techo \"habari.url.clickheat='\" . URL::get('ajax', 'context=clickheat') . \"';\\n\";\n\t\trequire dirname(__FILE__) . \"/js/admin.js\";\n\t\texit();\n\t}", "function get_tab_in_view( $current_filter, $filter_base ) {\n\t\t\treturn str_replace( $filter_base, '', $current_filter );\n\t\t}", "function get_tab_in_view( $current_filter, $filter_base ) {\n\t\treturn str_replace( $filter_base, '', $current_filter );\n\t}", "function filterCode($data) {\n\t//$modifiedData = preg_replace_callback( '@(<pre.*>)(.*)(<\\/pre>)@isU', 'escapeHTML', $data );\n\t$modifiedData = preg_replace_callback( '@(<code.*>)(.*)(<\\/code>)@isU', 'escapeHTML', $data );\n\t$modifiedData = preg_replace_callback( '@(<tt.*>)(.*)(<\\/tt>)@isU', 'escapeHTML', $modifiedData );\n\treturn $modifiedData;\n}", "public function filter($content) {}", "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "function filter_for_js($str)\r\n{\r\n $str=str_replace(\"\\n\",\"\",$str);\r\n $str=str_replace(\"\\r\",\"\",$str);\r\n $str=str_replace(\"'\",\"\",$str);\r\n $str=str_replace('\"',\"\",$str);\r\n $str=htmlentities($str,ENT_QUOTES,\"utf-8\");\r\n return $str;\r\n}", "public static function filterJS($str){\n $pattern = array('#<script([^>]*)>#i','#</script([^>]*)>#i');\n $replacement = array('<pre>&lt;script\\\\1&gt;','&lt;/script\\\\1&gt;</pre>');\n $subject = $str;\n return preg_replace($pattern,$replacement,$subject);\n }", "public function getJavascriptIncludes() {}", "function extra_tablenav( $which ) {\n\t\t\n\t\tif( $which == 'top' ) {\n\t\t\t\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"alignleft actions bdpp-shrt-tmpl-list-act\">';\n\t\t\t\n\t\t\t// Action for third party filter\n\t\t\tob_start();\n\t\t\tdo_action( 'bdpp_shrt_tmpl_list_filter' );\n\t\t\t$html .=ob_get_clean();\n\t\t\t\n\t\t\t$html .= '</div><!-- end .bdpp-shrt-tmpl-list-act -->';\n\t\t\t\n\t\t\techo $html;\n \t}\n }", "function minify_callback($buffer)\n{\n\n\n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n $buffer = preg_replace($search, $replace, $buffer);\n\n return $buffer;\n\n}", "static public function _(Filter $filter)\n\t{\n $code = '\t <div class=\"box-header with-border\">\n\t\t\t <h3 class=\"box-title\">'.$filter->getTitle().'</h3>\n\t\t\t <!-- tools box -->\n\t\t\t <div class=\"pull-right box-tools\">\n\t\t\t\t<button type=\"button\" class=\"btn btn-info btn-sm\" data-widget=\"collapse\" data-toggle=\"tooltip\" title=\\'\\' data-original-title=\"Collapse\">\n\t\t\t\t <i class=\"fa fa-minus\"></i></button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-info btn-sm\" data-widget=\"remove\" data-toggle=\"tooltip\" title=\"Remove\">\n\t\t\t\t <i class=\"fa fa-times\"></i></button>\n\t\t\t </div>\t\t\t \n\t\t\t</div>';\n\n return $code;\n\t}", "function getFilter() {\n return \"&nbsp;\";\n }", "public static function tabs() {\n\t\treturn apply_filters( 'wpjsfsp_settings_tabs', array(\n\t\t\t'features' => __( 'Features', 'wp-js-form-sample-plugin' ),\n\t\t\t'fields' => __( 'Field Types', 'wp-js-form-sample-plugin' ),\n\t\t) );\n\t}", "function remove_html_comments_buffer_callback($buffer) {\n $buffer = preg_replace('/<!--[^\\[\\>\\<](.|\\s)*?-->/', '', $buffer);\n return $buffer;\n }", "function filterCode($data) {\n //$modifiedData = preg_replace_callback('@(<pre.*>)(.*)(<\\/pre>)@isU', 'escapeHTML', $data);\n $modifiedData = preg_replace_callback('@(<code.*>)(.*)(<\\/code>)@isU', 'escapeHTML', $data);\n $modifiedData = preg_replace_callback('@(<tt.*>)(.*)(<\\/tt>)@isU', 'escapeHTML', $modifiedData);\n\n return $modifiedData;\n}", "protected function doCompressJavaScript() {}", "public function js()\n {\n }", "public function js_includes()\n {\n }", "protected function stripComments()\n {\n $this->registerPattern('/\\/\\*.*?\\*\\//s', '');\n }", "function stripJavaScript($code) {\n preg_match_all('/([\"\\'])(.*?)\\\\1/', $code, $matches);\n $stripped = '';\n foreach ($matches[2] as $match) {\n $string = trim($match);\n if ($string) {\n $stripped .= $string . \"\\n\";\n }\n }\n return $stripped;\n}", "function wordpoints_woocommerce_points_coupon_tabs_filter( $tabs ) {\n\n\t$tabs['wordpoints_points'] = array(\n\t\t'label' => __( 'Points', 'wordpoints-woocommerce' ),\n\t\t'target' => 'wordpoints_points_coupon_data',\n\t\t'class' => '',\n\t);\n\n\treturn $tabs;\n}", "private function _nlMinJs()\n {\n $version = get_plugin_ini('NeatlineFeatures', 'version');\n return \"neatline-features-{$version}-min\";\n }", "function smarty_postfilter_trimwhitespace($source, &$smarty)\n{\n preg_match_all(\"!<script[^>]+>.*?</script>!is\", $source, $match);\n $_script_blocks = $match[0];\n $source = preg_replace(\"!<script[^>]+>.*?</script>!is\",\n '@@@SMARTY:TRIM:SCRIPT@@@', $source);\n\n // Pull out the pre blocks\n preg_match_all(\"!<pre>.*?</pre>!is\", $source, $match);\n $_pre_blocks = $match[0];\n $source = preg_replace(\"!<pre>.*?</pre>!is\",\n '@@@SMARTY:TRIM:PRE@@@', $source);\n\n // Pull out the textarea blocks\n preg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $source, $match);\n $_textarea_blocks = $match[0];\n $source = preg_replace(\"!<textarea[^>]+>.*?</textarea>!is\",\n '@@@SMARTY:TRIM:TEXTAREA@@@', $source);\n\n // Pull out the input blocks\n preg_match_all(\"!<input[^>]+?/>!is\", $source, $match);\n $_input_blocks = $match[0];\n $source = preg_replace(\"!<input[^>]+?/>!is\",\n '@@@SMARTY:TRIM:INPUT@@@', $source);\n\n // Pull out the select blocks\n preg_match_all(\"!<select[^>]+>.*?</select>!is\", $source, $match);\n $_input_select = $match[0];\n $source = preg_replace(\"!<select[^>]+>.*?</select>!is\",\n '@@@SMARTY:TRIM:SELECT@@@', $source);\n\n // Pull out the php blocks\n preg_match_all(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\", $source, $match);\n $_Code_Php_blocks = $match[0];\n $source = preg_replace(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\",\n '@@@SMARTY:TRIM:PHP@@@', $source);\n\n // remove all leading spaces, tabs and carriage returns\n $source = trim(preg_replace(array('/[\\n\\r]+/m', '/[\\s]{2,}/m'), array('', ' '), $source));\n\n // replace php blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PHP@@@\", $_Code_Php_blocks, $source);\n\n // replace select blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SELECT@@@\", $_input_select, $source);\n\n // replace input blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:INPUT@@@\", $_input_blocks, $source);\n\n // replace textarea blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:TEXTAREA@@@\", $_textarea_blocks, $source);\n\n // replace pre blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PRE@@@\", $_pre_blocks, $source);\n\n // replace script blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SCRIPT@@@\", $_script_blocks, $source);\n\n return $source;\n}", "function beforeFilter() {\n\n }", "function hyperlight_before_filter($content) {\n return preg_replace_callback(\n '#<pre(.*?)>(.*?)</pre>#is',\n 'hyperlight_highlight_block',\n $content\n );\n}", "function lim_process_comment(&$vars) {}", "function editor_tabs_function() {\n\t\n\t/** WordPress Administration Bootstrap */\n?>\n\n\t\n<?php\t\n}", "public function filters();", "public function test_listTabs() {\n\n }", "public function test_listTabs() {\n\n }", "function ShowFilterList() {}", "public function filterAdminNavigationMain($tabs)\n {\n $tabs[] = array('label' => 'Neatline Record Import', 'uri' => url('record-import'));\n return $tabs;\n }", "function acf_allow_unfiltered_html() {}", "function ffeeeedd__minification__fin( $html ) {\n $html = preg_replace( '/<!--(?!s*(?:[if [^]]+]|!|>))(?:(?!-->).)*-->/s', '', $html );\n\n // Suppression des espaces vides\n $html = str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\", \"\\t\" ), '', $html );\n while ( stristr( $html, ' ' ) ) {\n $html = str_replace( ' ', ' ', $html );\n }\n return $html;\n }", "public function getTabTitle()\n {\n return Mage::helper('layeredlanding')->__('Conditions');\n }", "function current_filter()\n{\n}", "private function getFilterScript(){\n //DataTable Filtern Allgemein\n $ausgabe = \"$( '.filter' ).on( 'keyup change', function () {\\n\";\n $ausgabe .= \" let i = $(this).attr('data-column')-1\\n\";\n //$ausgabe .= \" console.log(i + ' - ' + this.value)\\n\";\n $ausgabe .= \" if ( table.column(i).search() !== this.value ) {\\n\";\n $ausgabe .= \" table\\n\";\n $ausgabe .= \" .column(i)\\n\";\n $ausgabe .= \" .search( this.value )\\n\";\n $ausgabe .= \" .draw();\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \"} );\\n\";\n\n //DataTable Filtern Exact\n $ausgabe .= \"$( '.filterExact' ).on( 'keyup change', function () {\\n\";\n $ausgabe .= \" let i = $(this).attr('data-column')-1\\n\";\n //$ausgabe .= \" console.log(i + ' - ' + this.value)\\n\";\n $ausgabe .= \" if ( table.column(i).search() !== this.value ) {\\n\";\n $ausgabe .= \" if ( this.value == '' ) {\\n\";\n $ausgabe .= \" regex = '';\\n\";\n $ausgabe .= \" }else{\\n\";\n $ausgabe .= \" regex = '^' + this.value + '$';\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \" table\\n\";\n $ausgabe .= \" .column(i)\\n\";\n $ausgabe .= \" .search( regex, true, false )\\n\";\n $ausgabe .= \" .draw();\\n\";\n $ausgabe .= \" }\\n\";\n $ausgabe .= \"} );\\n\";\n\n\n //Filter zurücksetzen\n $ausgabe .= \"$('.filterclear').on('click', function(){\\n\";\n $ausgabe .= \" $('.filter').val('').change();\\n\";\n $ausgabe .= \" $('.filterExact').val('').change();\\n\";\n $ausgabe .= \"});\\n\";\n\n return $ausgabe;\n }", "public function js_stripOneLineComments ($content) {\n\t$content = $content[0];\n\n\t// strip on-line comments\n\t$content = $this->stripOneLineComments($content, false);\n\n\treturn trim($content);\n }", "function view_infected_js_files(){\n for($i=0;count(__auntAsya::$js_infected_file_list)>$i;$i++){\n $html = \"<pre>\n\t\t\t&&&&&\n\t\t\t&& File:&nbsp;\".__auntAsya::$js_infected_file_list[$i]['file'].\"\n\t\t\t&& File finded signature:&nbsp;\".__auntAsya::$js_infected_file_list[$i]['finded_sign'].\"\n\t\t\t&&&&&\n\t\t</pre>\";\n print_r($html);\n }\n}", "function beforeFilter() {\n\t}", "public function get_js() {\n\t}", "function printZDSearchToggleJS() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\t// <!-- <![CDATA[\n\t\tfunction toggleExtraElements(category, show) {\n\t\t\tif (show) {\n\t\t\t\tjQuery('.' + category + '_showless').show();\n\t\t\t\tjQuery('.' + category + '_showmore').hide();\n\t\t\t\tjQuery('.' + category + '_extrashow').show();\n\t\t\t} else {\n\t\t\t\tjQuery('.' + category + '_showless').hide();\n\t\t\t\tjQuery('.' + category + '_showmore').show();\n\t\t\t\tjQuery('.' + category + '_extrashow').hide();\n\t\t\t}\n\t\t}\n\t\t// ]]> -->\n\t</script>\n\t<?php\n}", "public function filters()\n {\n //\n }", "public function hide_with_js() {\n }", "public function filters()\n {\n }", "static function manage() {\n // add pretty print?>\n <script>var prettyPrint=(function(){var b={el:function(f,d){var e=document.createElement(f),c;d=b.merge({},d);if(d&&d.style){var g=d.style;b.applyCSS(e,d.style);delete d.style}for(c in d){if(d.hasOwnProperty(c)){e[c]=d[c]}}return e},applyCSS:function(c,d){for(var g in d){if(d.hasOwnProperty(g)){try{c.style[g]=d[g]}catch(f){}}}},txt:function(c){return document.createTextNode(c)},row:function(e,f,c){c=c||\"td\";var h=b.count(e,null)+1,g=b.el(\"tr\"),i,d={style:b.getStyles(c,f),colSpan:h,onmouseover:function(){var j=this.parentNode.childNodes;b.forEach(j,function(k){if(k.nodeName.toLowerCase()!==\"td\"){return}b.applyCSS(k,b.getStyles(\"td_hover\",f))})},onmouseout:function(){var j=this.parentNode.childNodes;b.forEach(j,function(k){if(k.nodeName.toLowerCase()!==\"td\"){return}b.applyCSS(k,b.getStyles(\"td\",f))})}};b.forEach(e,function(j){if(j===null){return}i=b.el(c,d);if(j.nodeType){i.appendChild(j)}else{i.innerHTML=b.shorten(j.toString())}g.appendChild(i)});return g},hRow:function(c,d){return b.row(c,d,\"th\")},table:function(h,e){h=h||[];var d={thead:{style:b.getStyles(\"thead\",e)},tbody:{style:b.getStyles(\"tbody\",e)},table:{style:b.getStyles(\"table\",e)}},g=b.el(\"table\",d.table),f=b.el(\"thead\",d.thead),c=b.el(\"tbody\",d.tbody);if(h.length){g.appendChild(f);f.appendChild(b.hRow(h,e))}g.appendChild(c);return{node:g,tbody:c,thead:f,appendChild:function(i){this.tbody.appendChild(i)},addRow:function(k,j,i){this.appendChild(b.row.call(b,k,(j||e),i));return this}}},shorten:function(d){var c=40;d=d.replace(/^\\s\\s*|\\s\\s*$|\\n/g,\"\");return d.length>c?(d.substring(0,c-1)+\"...\"):d},htmlentities:function(c){return c.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")},merge:function(h,g){if(typeof h!==\"object\"){h={}}for(var f in g){if(g.hasOwnProperty(f)){var c=g[f];if(typeof c===\"object\"){h[f]=b.merge(h[f],c);continue}h[f]=c}}for(var e=2,d=arguments.length;e<d;e++){b.merge(h,arguments[e])}return h},count:function(c,g){var f=0;for(var e=0,d=c.length;e<d;e++){if(c[e]===g){f++}}return f},thead:function(c){return c.getElementsByTagName(\"thead\")[0]},forEach:function(e,d,g){if(!g){g=d}var c=e.length,f=-1;while(++f<c){if(g(e[f],f,e)===false){break}}return true},type:function(c){try{if(c===null){return\"null\"}if(c===undefined){return\"undefined\"}var f=Object.prototype.toString.call(c).match(/\\s(.+?)\\]/)[1].toLowerCase();if(c.nodeType){if(c.nodeType===1){return\"domelement\"}return\"domnode\"}if(/^(string|number|array|regexp|function|date|boolean)$/.test(f)){return f}if(typeof c===\"object\"){return c.jquery&&typeof c.jquery===\"string\"?\"jquery\":\"object\"}if(c===window||c===document){return\"object\"}return\"default\"}catch(d){return\"default\"}},within:function(c){return{is:function(e){for(var d in c){if(c[d]===e){return d}}return\"\"}}},common:{circRef:function(e,c,d){return b.expander(\"[POINTS BACK TO <strong>\"+(c)+\"</strong>]\",\"Click to show this item anyway\",function(){this.parentNode.appendChild(a(e,{maxDepth:1}))})},depthReached:function(d,c){return b.expander(\"[DEPTH REACHED]\",\"Click to show this item anyway\",function(){try{this.parentNode.appendChild(a(d,{maxDepth:1}))}catch(f){this.parentNode.appendChild(b.table([\"ERROR OCCURED DURING OBJECT RETRIEVAL\"],\"error\").addRow([f.message]).node)}})}},getStyles:function(d,c){c=a.settings.styles[c]||{};return b.merge({},a.settings.styles[\"default\"][d],c[d])},expander:function(e,d,c){return b.el(\"a\",{innerHTML:b.shorten(e)+' <b style=\"visibility:hidden;\">[+]</b>',title:d,onmouseover:function(){this.getElementsByTagName(\"b\")[0].style.visibility=\"visible\"},onmouseout:function(){this.getElementsByTagName(\"b\")[0].style.visibility=\"hidden\"},onclick:function(){this.style.display=\"none\";c.call(this);return false},style:{cursor:\"pointer\"}})},stringify:function(e){var d=b.type(e),g,f=true;if(d===\"array\"){g=\"[\";b.forEach(e,function(j,h){g+=(h===0?\"\":\", \")+b.stringify(j)});return g+\"]\"}if(typeof e===\"object\"){g=\"{\";for(var c in e){if(e.hasOwnProperty(c)){g+=(f?\"\":\", \")+c+\":\"+b.stringify(e[c]);f=false}}return g+\"}\"}if(d===\"regexp\"){return\"/\"+e.source+\"/\"}if(d===\"string\"){return'\"'+e.replace(/\"/g,'\\\\\"')+'\"'}return e.toString()},headerGradient:(function(){var d=document.createElement(\"canvas\");if(!d.getContext){return\"\"}var c=d.getContext(\"2d\");d.height=30;d.width=1;var f=c.createLinearGradient(0,0,0,30);f.addColorStop(0,\"rgba(0,0,0,0)\");f.addColorStop(1,\"rgba(0,0,0,0.25)\");c.fillStyle=f;c.fillRect(0,0,1,30);var e=d.toDataURL&&d.toDataURL();return\"url(\"+(e||\"\")+\")\"})()};var a=function(g,k){k=k||{};var f=b.merge({},a.config,k),c=b.el(\"div\"),d=a.config,h=0,i={},e=false;a.settings=f;var j={string:function(l){return b.txt('\"'+b.shorten(l.replace(/\"/g,'\\\\\"'))+'\"')},number:function(l){return b.txt(l)},regexp:function(n){var o=b.table([\"RegExp\",null],\"regexp\");var l=b.table();var m=b.expander(\"/\"+n.source+\"/\",\"Click to show more\",function(){this.parentNode.appendChild(o.node)});l.addRow([\"g\",n.global]).addRow([\"i\",n.ignoreCase]).addRow([\"m\",n.multiline]);o.addRow([\"source\",\"/\"+n.source+\"/\"]).addRow([\"flags\",l.node]).addRow([\"lastIndex\",n.lastIndex]);return f.expanded?o.node:m},domelement:function(m,p){var o=b.table([\"DOMElement\",null],\"domelement\"),n=[\"id\",\"className\",\"innerHTML\",\"src\",\"href\"],l=m.nodeName||\"\";o.addRow([\"tag\",\"&lt;\"+l.toLowerCase()+\"&gt;\"]);b.forEach(n,function(q){if(m[q]){o.addRow([q,b.htmlentities(m[q])])}});return f.expanded?o.node:b.expander(\"DOMElement (\"+l.toLowerCase()+\")\",\"Click to show more\",function(){this.parentNode.appendChild(o.node)})},domnode:function(l){var n=b.table([\"DOMNode\",null],\"domelement\"),m=b.htmlentities((l.data||\"UNDEFINED\").replace(/\\n/g,\"\\\\n\"));n.addRow([\"nodeType\",l.nodeType+\" (\"+l.nodeName+\")\"]).addRow([\"data\",m]);return f.expanded?n.node:b.expander(\"DOMNode\",\"Click to show more\",function(){this.parentNode.appendChild(n.node)})},jquery:function(m,n,l){return j.array(m,n,l,true)},object:function(o,m,t){var l=b.within(i).is(o);if(l){return b.common.circRef(o,l,f)}i[t||\"TOP\"]=o;if(m===f.maxDepth){return b.common.depthReached(o,f)}var u=b.table([\"Object\",null],\"object\"),n=true;for(var p in o){if(!o.hasOwnProperty||o.hasOwnProperty(p)){var v=o[p],s=b.type(v);n=false;try{u.addRow([p,j[s](v,m+1,p)],s)}catch(r){if(window.console&&window.console.log){console.log(r.message)}}}}if(n){u.addRow([\"<small>[empty]</small>\"])}else{u.thead.appendChild(b.hRow([\"key\",\"value\"],\"colHeader\"))}var q=(f.expanded||e)?u.node:b.expander(b.stringify(o),\"Click to show more\",function(){this.parentNode.appendChild(u.node)});e=true;return q},array:function(p,n,s,l){var m=b.within(i).is(p);if(m){return b.common.circRef(p,m)}i[s||\"TOP\"]=p;if(n===f.maxDepth){return b.common.depthReached(p)}var r=l?\"jQuery\":\"Array\",t=b.table([r+\"(\"+p.length+\")\",null],l?\"jquery\":r.toLowerCase()),o=true,q=0;if(l){t.addRow([\"selector\",p.selector])}b.forEach(p,function(v,u){if(f.maxArray>=0&&++q>f.maxArray){t.addRow([u+\"..\"+(p.length-1),j[b.type(v)](\"...\",n+1,u)]);return false}o=false;t.addRow([u,j[b.type(v)](v,n+1,u)])});if(!l){if(o){t.addRow([\"<small>[empty]</small>\"])}else{t.thead.appendChild(b.hRow([\"index\",\"value\"],\"colHeader\"))}}return f.expanded?t.node:b.expander(b.stringify(p),\"Click to show more\",function(){this.parentNode.appendChild(t.node)})},\"function\":function(q,s,o){var m=b.within(i).is(q);if(m){return b.common.circRef(q,m)}i[o||\"TOP\"]=q;var r=b.table([\"Function\",null],\"function\"),p=b.table([\"Arguments\"]),n=q.toString().match(/\\((.+?)\\)/),l=q.toString().match(/\\(.*?\\)\\s+?\\{?([\\S\\s]+)/)[1].replace(/\\}?$/,\"\");r.addRow([\"arguments\",n?n[1].replace(/[^\\w_,\\s]/g,\"\"):\"<small>[none/native]</small>\"]).addRow([\"body\",l]);return f.expanded?r.node:b.expander(\"function(){...}\",\"Click to see more about this function.\",function(){this.parentNode.appendChild(r.node)})},date:function(l){var m=b.table([\"Date\",null],\"date\"),n=l.toString().split(/\\s/);m.addRow([\"Time\",n[4]]).addRow([\"Date\",n.slice(0,4).join(\"-\")]);return f.expanded?m.node:b.expander(\"Date (timestamp): \"+(+l),\"Click to see a little more info about this date\",function(){this.parentNode.appendChild(m.node)})},\"boolean\":function(l){return b.txt(l.toString().toUpperCase())},\"undefined\":function(){return b.txt(\"UNDEFINED\")},\"null\":function(){return b.txt(\"NULL\")},\"default\":function(){return b.txt(\"prettyPrint: TypeNotFound Error\")}};c.appendChild(j[(f.forceObject)?\"object\":b.type(g)](g,h));return c};a.config={expanded:true,forceObject:false,maxDepth:3,maxArray:-1,styles:{array:{th:{backgroundColor:\"#6DBD2A\",color:\"white\"}},\"function\":{th:{backgroundColor:\"#D82525\"}},regexp:{th:{backgroundColor:\"#E2F3FB\",color:\"#000\"}},object:{th:{backgroundColor:\"#1F96CF\"}},jquery:{th:{backgroundColor:\"#FBF315\"}},error:{th:{backgroundColor:\"red\",color:\"yellow\"}},domelement:{th:{backgroundColor:\"#F3801E\"}},date:{th:{backgroundColor:\"#A725D8\"}},colHeader:{th:{backgroundColor:\"#EEE\",color:\"#000\",textTransform:\"uppercase\"}},\"default\":{table:{borderCollapse:\"collapse\",width:\"100%\"},td:{padding:\"5px\",fontSize:\"12px\",backgroundColor:\"#FFF\",color:\"#222\",border:\"1px solid #000\",verticalAlign:\"top\",fontFamily:'\"Consolas\",\"Lucida Console\",Courier,mono',whiteSpace:\"nowrap\"},td_hover:{},th:{padding:\"5px\",fontSize:\"12px\",backgroundColor:\"#222\",color:\"#EEE\",textAlign:\"left\",border:\"1px solid #000\",verticalAlign:\"top\",fontFamily:'\"Consolas\",\"Lucida Console\",Courier,mono',backgroundImage:b.headerGradient,backgroundRepeat:\"repeat-x\"}}}};return a})();</script>\n <?php\n // search box\n $searchUrl = url('/api/').self::class.\"@getPaymentInfo()?token=\".token();\n $loading = HtmlWidget1::loader().' <h5 align=\"left\"> Loading... </h5>';\n echo \"<script>\n function searchReference(){\n let result_box = $('#search_payment_reference_result');\n result_box.html('$loading');\n Ajax1.request('$searchUrl', { reference: $('#query_payment_reference').val() }, function(status) {\n result_box.html(status['data']? prettyPrint(status['data']): '<br/><br/><h3> Reference NOT FOUND</h3><br/><br/>');\n result_box.append(`<br/><button class='btn btn-danger btn-lg' onclick=$(this).parent().html('')><i class='fa fa-close'></i> Clear Result</button>`);\n })\n }\n </script>\".\n '<form>'.HtmlForm1::addInput('<h6>Search Payment Reference</h6>', ['id'=>'query_payment_reference']).\"<button type='button' onclick='searchReference()' class='btn btn-primary btn-lg'> <i class='fa fa-search'></i> Search Reference</button></form><div id='search_payment_reference_result' style='padding:10px;'></div> <div class='clearfix' style='margin-top:20px;'></div><h6 class=\\\"m-0\\\">Payment Table</h6><hr/>\";\n // manage table\n return self::xcrud()->columns('updated_at', true)->unset_title()->unset_add();\n }", "function compress($buffer) {\r\n\t$buffer = preg_replace(\"/\\/\\*([\\s\\S]*?)\\*\\/|\\t+/i\",\"\", $buffer);\r\n\t// REMOVE EXTRA SPACES\r\n\t$buffer = preg_replace(\"/ {2,}/i\",\" \", $buffer);\r\n\treturn $buffer;\r\n}", "public function filter()\n {\n \n }", "public function filter();", "function printHeaderJS() {\n echo $this->getHeaderJS();\n }", "function ncurses_filter()\n{\n}", "function printHeaderJS() {\n echo $this->getHeaderJS(); \n }", "public function getPluginFilters(){\n\t\t\treturn \"/[^\\\\.]/\";\n\t\t}", "public function filterAdminNavigationMain($tabs) {\n $tabs[] = array(\n 'label' => 'BagIt',\n 'uri' => url('bag-it/collections')\n );\n\n return $tabs;\n }", "function twig_raw_filter($string) {}", "public function filter_theme_act_clickheat_js()\n\t{\n\t\theader(\"Content-Type: text/javascript\");\n\t\trequire dirname(__FILE__) . \"/js/clickheat.js\";\n\t\texit();\n\t}", "function no_texturized_shortcodes_filter( $shortcodes ) {\n\t\t$shortcodes[] = 'code';\n\t\t$shortcodes[] = 'precode';\n\t\treturn $shortcodes;\n\t}", "function wpmm_add_code_before_scripts() {\r\n ?>\r\n <script type='text/javascript'>\r\n console.log('This is a test... :-)')\r\n </script> \r\n <?php\r\n\r\n}", "function optimizejs()\n\t{\n\t\t$_body = JResponse::getBody();\n\t\t$_body = explode(\"</head>\", $_body, 2);\n\t\t// Replace CSS library\n\t\t$avoid = $this->gzip_js_exclude;\n\t\t$avoid = ($avoid != '') ? (is_array($avoid) ? $avoid : array($avoid)) : array();\n\t\t\n\t\tif(is_array($avoid)) {\n\t\t\t$avoid = array_merge($avoid, $this->getExcludeJSByCondition($_body[0]));\n\t\t}\n\t\t\n\t\t$_body[0] \t= $this->replaceWithLibrary($_body[0], \"js\", $avoid, $this->merge);\n\t\t$_body \t\t= $_body[0].\"</head>\".$_body[1];\n\t\t\n\t\tif($_body) {\n\t\t\tJResponse::setBody($_body);\n\t\t}\n\t\treturn true;\n\t}", "function thim_widget_group($tabs)\n{\n $tabs[] = array(\n 'title' => esc_html__('Thim Widget', 'themeplate'),\n 'filter' => array(\n 'groups' => array('thim_widget_group')\n )\n );\n\n return $tabs;\n}" ]
[ "0.79575676", "0.75264025", "0.6741027", "0.65777415", "0.59030944", "0.58308375", "0.5778662", "0.5742753", "0.55765784", "0.54261905", "0.5367969", "0.5352208", "0.5323164", "0.5315508", "0.52935594", "0.5254723", "0.5250677", "0.52280074", "0.52197814", "0.5215844", "0.52140826", "0.51994115", "0.5184835", "0.51719606", "0.5171643", "0.5171352", "0.5162192", "0.51593137", "0.5148021", "0.5147712", "0.51381814", "0.51150775", "0.5081912", "0.50557065", "0.5055424", "0.5048907", "0.5025793", "0.50229734", "0.5016672", "0.5013717", "0.4986419", "0.4984765", "0.49764", "0.49585095", "0.49536723", "0.49386078", "0.49335372", "0.4925596", "0.49246728", "0.49239042", "0.49134806", "0.49132395", "0.49098614", "0.49060747", "0.49030417", "0.48997468", "0.48958355", "0.4894139", "0.48936424", "0.48845544", "0.4882474", "0.48796535", "0.48694867", "0.48687023", "0.48666546", "0.48635665", "0.48589313", "0.48575857", "0.4852156", "0.4852156", "0.48510832", "0.48504397", "0.48499835", "0.48476148", "0.48374447", "0.4836913", "0.48238602", "0.48212302", "0.48158604", "0.4806115", "0.47936186", "0.47897884", "0.47883728", "0.47817957", "0.47695988", "0.47621298", "0.47606748", "0.4750432", "0.47481534", "0.47329867", "0.473029", "0.47300184", "0.4728955", "0.47278318", "0.47261748", "0.47252843", "0.47251645", "0.4725104", "0.47210142", "0.47201568" ]
0.8295152
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() tabs newlines
Тесты Phalcon\Assets\Filters\Jsmin :: filter() табуляции и переносы строк
public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - tabs newlines'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $expected = "\n" . 'a=100;'; $actual = $jsmin->filter("\t\ta\t\r\n= \n \r\n100;\t"); $I->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "public function assetsFiltersJsminFilterTabsComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"/** this is a comment */ if ( a == b ) { document . writeln('\\t') ; /** this is a comment */ }\"\n );\n\n $I->assertEquals(\n \"\\nif(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "function filter_for_js($str)\r\n{\r\n $str=str_replace(\"\\n\",\"\",$str);\r\n $str=str_replace(\"\\r\",\"\",$str);\r\n $str=str_replace(\"'\",\"\",$str);\r\n $str=str_replace('\"',\"\",$str);\r\n $str=htmlentities($str,ENT_QUOTES,\"utf-8\");\r\n return $str;\r\n}", "function smarty_postfilter_trimwhitespace($source, &$smarty)\n{\n preg_match_all(\"!<script[^>]+>.*?</script>!is\", $source, $match);\n $_script_blocks = $match[0];\n $source = preg_replace(\"!<script[^>]+>.*?</script>!is\",\n '@@@SMARTY:TRIM:SCRIPT@@@', $source);\n\n // Pull out the pre blocks\n preg_match_all(\"!<pre>.*?</pre>!is\", $source, $match);\n $_pre_blocks = $match[0];\n $source = preg_replace(\"!<pre>.*?</pre>!is\",\n '@@@SMARTY:TRIM:PRE@@@', $source);\n\n // Pull out the textarea blocks\n preg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $source, $match);\n $_textarea_blocks = $match[0];\n $source = preg_replace(\"!<textarea[^>]+>.*?</textarea>!is\",\n '@@@SMARTY:TRIM:TEXTAREA@@@', $source);\n\n // Pull out the input blocks\n preg_match_all(\"!<input[^>]+?/>!is\", $source, $match);\n $_input_blocks = $match[0];\n $source = preg_replace(\"!<input[^>]+?/>!is\",\n '@@@SMARTY:TRIM:INPUT@@@', $source);\n\n // Pull out the select blocks\n preg_match_all(\"!<select[^>]+>.*?</select>!is\", $source, $match);\n $_input_select = $match[0];\n $source = preg_replace(\"!<select[^>]+>.*?</select>!is\",\n '@@@SMARTY:TRIM:SELECT@@@', $source);\n\n // Pull out the php blocks\n preg_match_all(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\", $source, $match);\n $_Code_Php_blocks = $match[0];\n $source = preg_replace(\"/<\\?php.*?\\?>(?:[\\n\\r]{1,2})?/s\",\n '@@@SMARTY:TRIM:PHP@@@', $source);\n\n // remove all leading spaces, tabs and carriage returns\n $source = trim(preg_replace(array('/[\\n\\r]+/m', '/[\\s]{2,}/m'), array('', ' '), $source));\n\n // replace php blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PHP@@@\", $_Code_Php_blocks, $source);\n\n // replace select blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SELECT@@@\", $_input_select, $source);\n\n // replace input blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:INPUT@@@\", $_input_blocks, $source);\n\n // replace textarea blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:TEXTAREA@@@\", $_textarea_blocks, $source);\n\n // replace pre blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:PRE@@@\", $_pre_blocks, $source);\n\n // replace script blocks\n smarty_postfilter_trimwhitespace_replace(\"@@@SMARTY:TRIM:SCRIPT@@@\", $_script_blocks, $source);\n\n return $source;\n}", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "function filter($data){ \n return $datas=preg_replace(\"/\\r\\n|\\r|\\n/\",'',$data);\n }", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "function compress($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (strpos($line, \"//\") !== false) $line = substr($line, 0, strpos($line, \"//\"));\r\n\t\t$line = trim($line);\r\n\t\tif ($line != \"\") $newjs[] = $line;\r\n\t}\r\n\t$jsstr = implode(\"\\t\\n\", $newjs);\r\n\t$jsstr = preg_replace(\"!\\s*/\\*.*?\\*/\\s*!s\", \"\\n\", $jsstr);\r\n\t$js = explode(\"\\t\", $jsstr);\r\n\treturn $js;\r\n}", "function minify_callback($buffer)\n{\n\n\n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n $buffer = preg_replace($search, $replace, $buffer);\n\n return $buffer;\n\n}", "function strip_debugging($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (preg_match(\"/^\\s*log\\(/\", $line)) continue;\r\n\t\t$newjs[] = $line;\r\n\t}\r\n\treturn $newjs;\r\n}", "private function compress() {\n return preg_replace( \"/^\\s+|\\n|\\r|\\s+$/m\", \"\", $this->output );\n }", "public function trimwhitespace($buffer) {\n // Unify Line-Breaks to \\n\n $buffer = preg_replace(\"/\\015\\012|\\015|\\012/\", \"\\n\", $buffer);\n\n // capture Internet Explorer Conditional Comments\n preg_match_all('#<!--\\[[^\\]]+\\]>.*?<!\\[[^\\]]+\\]-->#is', $buffer, $match);\n $script_blocks_IE = $match[0];\n $buffer = preg_replace('#<!--\\[[^\\]]+\\]>.*?<!\\[[^\\]]+\\]-->#is', '@@:SCRIPT_IE:@@', $buffer);\n\n // script\n preg_match_all('#<script[^>]+>.*?</script>#is', $buffer, $match);\n $script_blocks = $match[0];\n $buffer = preg_replace('#<script[^>]+>.*?</script>#is', '@@:SCRIPT:@@', $buffer);\n\n // style\n preg_match_all('#<style[^>]+>.*?</style>#is', $buffer, $match);\n $style_blocks = $match[0];\n $buffer = preg_replace('#<style[^>]+>.*?</style>#is', '@@:STYLE:@@', $buffer);\n\n // pre\n preg_match_all('#<pre[^>]*?>.*?</pre>#is', $buffer, $match);\n $pre_blocks = $match[0];\n $buffer = preg_replace('#<pre[^>]*?>.*?</pre>#is', '@@:PRE:@@', $buffer);\n\n // textarea\n preg_match_all('#<textarea[^>]*?>.*?</textarea>#is', $buffer, $match);\n $textarea_blocks = $match[0];\n $buffer = preg_replace('#<textarea[^>]*?>.*?</textarea>#is', '@@:TEXTAREA:@@', $buffer);\n\n // Strip all HTML-Comments\n $buffer = preg_replace('#<!--.*?-->#ms', '', $buffer);\n\n // remove spaces\n $buffer = preg_replace('#\\s+#u', ' ', $buffer);\n $buffer = str_replace(array('> <', '> @@:', ':@@ <', ':@@ @@:'), array('><', '>@@:', ':@@<', ':@@@@:'), $buffer);\n\n // replace script blocks\n $this->replace('@@:SCRIPT_IE:@@', $script_blocks_IE, $buffer, 1);\n $this->replace('@@:STYLE:@@', $style_blocks, $buffer);\n $this->replace('@@:SCRIPT:@@', $script_blocks, $buffer);\n $this->replace('@@:PRE:@@', $pre_blocks, $buffer);\n $this->replace('@@:TEXTAREA:@@', $textarea_blocks, $buffer);\n\n return $buffer;\n }", "public function assetsFiltersJsminFilterComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('/** this is a comment */')\n );\n }", "public static function filterJS($str){\n $pattern = array('#<script([^>]*)>#i','#</script([^>]*)>#i');\n $replacement = array('<pre>&lt;script\\\\1&gt;','&lt;/script\\\\1&gt;</pre>');\n $subject = $str;\n return preg_replace($pattern,$replacement,$subject);\n }", "function template_prefilter_jstrip($tpl_source, &$template_object)\r\n{\r\n\treturn preg_replace_callback(\"/\\{jstrip\\}(.*?)\\{\\/jstrip\\}/s\",\"template_prefilter_jstrip_cb\", $tpl_source);\r\n}", "function twig_raw_filter($string) {}", "function stripJavaScript($code) {\n preg_match_all('/([\"\\'])(.*?)\\\\1/', $code, $matches);\n $stripped = '';\n foreach ($matches[2] as $match) {\n $string = trim($match);\n if ($string) {\n $stripped .= $string . \"\\n\";\n }\n }\n return $stripped;\n}", "function filterCode($data) {\n\t//$modifiedData = preg_replace_callback( '@(<pre.*>)(.*)(<\\/pre>)@isU', 'escapeHTML', $data );\n\t$modifiedData = preg_replace_callback( '@(<code.*>)(.*)(<\\/code>)@isU', 'escapeHTML', $data );\n\t$modifiedData = preg_replace_callback( '@(<tt.*>)(.*)(<\\/tt>)@isU', 'escapeHTML', $modifiedData );\n\treturn $modifiedData;\n}", "function getFilter() {\n return \"&nbsp;\";\n }", "function compress($buffer) {\r\n\t$buffer = preg_replace(\"/\\/\\*([\\s\\S]*?)\\*\\/|\\t+/i\",\"\", $buffer);\r\n\t// REMOVE EXTRA SPACES\r\n\t$buffer = preg_replace(\"/ {2,}/i\",\" \", $buffer);\r\n\treturn $buffer;\r\n}", "function filterCode($data) {\n //$modifiedData = preg_replace_callback('@(<pre.*>)(.*)(<\\/pre>)@isU', 'escapeHTML', $data);\n $modifiedData = preg_replace_callback('@(<code.*>)(.*)(<\\/code>)@isU', 'escapeHTML', $data);\n $modifiedData = preg_replace_callback('@(<tt.*>)(.*)(<\\/tt>)@isU', 'escapeHTML', $modifiedData);\n\n return $modifiedData;\n}", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "protected function linear_whitespace()\n {\n }", "function compress($in)\n{\n $out = str_replace(\"\\n\",'',$in);\n $out = str_replace(\"\\t\",'',$out);\n $out = str_replace(\"\\r\",'',$out);\n $out = preg_replace('!\\s+!', ' ', $out);\n $out = preg_replace('/<!--(.*)-->/Uis', '', $out);\n $out = str_replace('<script src=\"http://localhost:35729/livereload.js\"></script>','',$out);\n return $out;\n}", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "function minify_output($buffer){\n\t$search = array(\n\t\t'/\\>[^\\S ]+/s',\n\t\t'/[^\\S ]+\\</s',\n\t\t'/(\\s)+/s');\n\t$replace = array(\n\t\t'>',\n\t\t'<',\n\t\t'\\\\1');\n\tif (preg_match(\"/\\<html/i\",$buffer) == 1 && preg_match(\"/\\<\\/html\\>/i\",$buffer) == 1) {\n\t\t$buffer = preg_replace($search, $replace, $buffer);\n\t}\n\t\treturn $buffer;\n\t}", "public function testRepeatedWhitespaceReplacementNoReplace()\n {\n $string = ' Remove all repeated ws';\n $this->assertSame($string, $this->_filter2->filter($string));\n }", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }", "public function viewHelperRemovesLineBreaks() {\t\t\n\t\t$viewHelper = $this->getMock('Tx_ViewHelpers_ViewHelpers_JsStringViewHelper', array('renderChildren'));\n\t\t$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(10) . 'Line 2'));\n\t\t$actualResult = $viewHelper->render();\n\t\t$this->assertEquals('Line 1Line 2', $actualResult);\n\t}", "public function getRemoveLineBreaksFromTemplate() {}", "public function filter($code)\n {\n $elements = (array) $this->elements($code);\n\n foreach ((array) $elements as $element)\n {\n $original = (string) $element->nodeValue;\n\n $minified = $this->minify($original);\n\n $minified = preg_replace('/\\s+/', ' ', $minified);\n\n $minified = $this->minify($minified);\n\n $code = str_replace($original, $minified, $code);\n }\n\n return $code;\n }", "function setFilter($val)\n{\n $step1 = trim($val);\n $step2 = strip_tags($step1);\n $step3 = htmlspecialchars($step2, ENT_QUOTES);\n $result = $step3;\n return $result;\n}", "public static function filter($data) {\n\t\treturn implode(\"\\n\", array_filter(explode(\"\\n\", $data), array(__CLASS__, '_filter')));\n\t}", "public function itKeepsNewlinesAfterJavaScriptComments()\n {\n $input = \"<script>\n//<![CDATA[\nvar skipTierPricePercentUpdate = true;\n\nif (skipTierPricePercentUpdate) {\n // leap year assumption for unknown year\n return 29;\n}\";\n $this->assertSame(\n '<script> //<![CDATA[\n var skipTierPricePercentUpdate = true; if (skipTierPricePercentUpdate) { // leap year assumption for unknown year\n return 29; }',\n $this->subject->apply($input)\n );\n }", "private function compress_white_space( $code ) {\n // Tabs to space, no more than 1 consecutive space\n $code = preg_replace( '!\\t!m', ' ', $code );\n $code = preg_replace( '![ ]{2,}!m', ' ', $code );\n \n // Remove uneccessary white space around operators, braces and brackets.\n // \\xHH sequence is: !%&()*+,-/:;<=>?[]\\{|}~\n $code = preg_replace( '/\\s([\\x21\\x25\\x26\\x28\\x29\\x2a\\x2b\\x2c\\x2d\\x2f\\x3a\\x3b\\x3c\\x3d\\x3e\\x3f\\x5b\\x5d\\x5c\\x7b\\x7c\\x7d\\x7e])/m', \"$1\", $code );\n $code = preg_replace( '/([\\x21\\x25\\x26\\x28\\x29\\x2a\\x2b\\x2c\\x2d\\x2f\\x3a\\x3b\\x3c\\x3d\\x3e\\x3f\\x5b\\x5d\\x5c\\x7b\\x7c\\x7d\\x7e])\\s/m', \"$1\", $code );\n \n // Split on each line, trim leading/trailing white space, kill empty lines, combine everything in one line\n $code = preg_split( '/\\r\\n|\\r|\\n/', $code );\n foreach( $code as $i => $line ) {\n $code[ $i ] = trim( $line );\n }\n $code = implode( '', $code );\n\n return $code;\n }", "public function js($input)\n\t{\n\t\t// strip BOM\n\t\tif (substr($input, 0, 3) == \"\\xef\\xbb\\xbf\") {\n\t\t\t$input = substr($input, 3);\n\t\t}\n\t\t\n\t\t// vars\n\t\t$output = str_replace([\"\\r\\n\", \"\\r\"], \"\\n\", $input); // normalize\n\t\t$i = 0;\n\t\t$replaces = [];\n\t\t$pattern = '#'.\n\t\t\t\t// replace string with key\n\t\t\t\t'([\"\\'`])(?:\\\\\\\\.|[^\\\\\\\\])*?\\1' .'|'.\n\t\t\t\t// replace /* ... */ with white-spaces\n\t\t\t\t'(?s:\\/\\*.*?\\*\\/)' .'|'.\n\t\t\t\t// replace regex with key\n\t\t\t\t'(?<=[=:.\\(&!|,])(?:\\s*)(\\/[^*\\/](?:\\\\\\\\.|[^\\\\\\\\])*?\\/[gimuy]*)' .'|'.\n\t\t\t\t// replace // ... with \\n\n\t\t\t\t'\\/\\/.*?([\\n]|$)'\n\t\t\t\t. '#';\n\t\t\n\t\t$output = preg_replace_callback($pattern, function ($match) use (&$i, &$replaces) {\n\t\t\tif (isset($match[3])) {\n\t\t\t\t// replace single line comment (two slashes)\n\t\t\t\treturn \"\\n\";\n\t\t\t\n\t\t\t} elseif (isset($match[2])) {\n\t\t\t\t// replace regex\n\t\t\t\t$k = '\"'. (++$i) .'\"';\n\t\t\t\t$replaces[$k] = $match[2];\n\t\t\t\t\n\t\t\t\treturn $k;\n\t\t\t\n\t\t\t} elseif (isset($match[1])) {\n\t\t\t\t// replace string\n\t\t\t\tif ($match[0] == $match[1] . $match[1]) {\n\t\t\t\t\treturn $match[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$k = $match[1] . (++$i) . $match[1];\n\t\t\t\t$replaces[$k] = $match[0];\n\t\t\t\treturn $k;\n\t\t\t\n\t\t\t} else {\n\t\t\t\t// replace multi-line comment\n\t\t\t\treturn ' ';\n\t\t\t}\n }, $output);\n\t\t\n\t\tif (null === $output) {\n\t\t\tthrow new Exception('The minifier has failed.');\n\t\t}\n\t\t\n\t\t$output = preg_replace([\n\t\t\t// It replaces all other control characters (including tab) with spaces\n\t\t\t'#[^\\n \\S]+#',\n\t\t\t// the multiple spaces and linefeeds are removed.\n\t\t\t'#\\s*\\n+\\s*#',\n\t\t\t'# {2,}#',\n\t\t\t// It omits spaces except when a space is preceded and followed\n\t\t\t// by a non-ASCII character or by an ASCII letter or digit,\n\t\t\t// or by one of these characters: \\ $ _\n\t\t\t'# (?![\\w\\\\\\\\$]|[^\\x20-\\x7F])#',\n\t\t\t'#(?<![\\w\\\\\\\\$]|[^\\x20-\\x7F]) #',\n\t\t\t// A linefeed is not omitted if it precedes a non-ASCII character or an ASCII\n\t\t\t// letter or digit or one of these characters: \\ $ _ { [ ( + -\n\t\t\t'#\\n(?![\\w\\\\\\\\${[(+-]|[^\\x20-\\x7F])#',\n\t\t\t// and if it follows a non-ASCII character or an ASCII letter or digit or one\n\t\t\t// of these characters: \\ $ _ } ] ) + - \" '\n\t\t\t'#(?<![\\w\\\\\\\\$}\\])+\\-\"\\']|[^\\x20-\\x7F])\\n#',\n\t\t],[\n\t\t\t' ',\n\t\t\t\"\\n\",\n\t\t\t' ',\n\t\t\t'',\n\t\t], $output);\n\t\t\n\t\tif (null === $output) {\n\t\t\tthrow new Exception('The minifier has failed.');\n\t\t}\n\t\t\n\t\treturn strtr($output, $replaces);\n\t}", "abstract public function createSourceLineFilter();", "function compress($buffer) {\n\t //Remove CSS comments\n\t $buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n\t //Remove tabs, spaces, newlines, etc.\n\t $buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer);\n\t return $buffer;\n\t}", "function compress($buffer) {\n\t //Remove CSS comments\n\t $buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n\t //Remove tabs, spaces, newlines, etc.\n\t $buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer);\n\t return $buffer;\n\t}", "function compress($buffer) {\n\t //Remove CSS comments\n\t $buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n\t //Remove tabs, spaces, newlines, etc.\n\t $buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer);\n\t return $buffer;\n\t}", "protected function doCompressJavaScript() {}", "public function skip_whitespace()\n {\n }", "function twig_raw_filter($string)\n{\n return $string;\n}", "public function enableRemoveLineBreaksFromTemplate() {}", "public function viewHelperRemovesWindowsLineBreaks() {\n\t\t$viewHelper = $this->getMock('Tx_ViewHelpers_ViewHelpers_JsStringViewHelper', array('renderChildren'));\n\t\t$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(13) . chr(10) . 'Line 2'));\n\t\t$actualResult = $viewHelper->render();\n\t\t$this->assertEquals('Line 1Line 2', $actualResult);\n\t}", "public function getCompressJavascript() {}", "protected function chunkMinify($str) {\n // Remove tabs and merge into single line\n if (config('view.merge_lines')) {\n $str = preg_replace(['#^\\s+#ium', \"|\\s*\\r?\\n|ius\"], '', $str);\n }\n\n // Remove comments\n if (config('view.strip_comments')) {\n $str = preg_replace('/\\<\\!\\-\\-.+?\\-\\-\\>/is', '', $str);\n }\n\n return $str;\n }", "static function to_javascript($str, $separator='\"'){\n\t\treturn str_replace(array(\"\\r\\n\", \"\\n\", $separator), array(\"\\\\r\\\\n\", \"\\\\n\", \"\\\\\".$separator), $str);\n\t}", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function testMarkdown()\n {\n $textfilter = new \\Maaa16\\Textfilter\\Textfilter();\n $text = \"* item1\\n* item2\";\n $this->assertEquals(\"<ul>\\n<li>item1</li>\\n<li>item2</li>\\n</ul>\\n\", $textfilter->doFilter($text, 'markdown'));\n $text = \"#rubrik-h1\";\n $this->assertEquals(\"<h1>rubrik-h1</h1>\\n\", $textfilter->doFilter($text, 'markdown'));\n $text = \"rubrik-h1\\n=========\";\n $this->assertEquals(\"<h1>rubrik-h1</h1>\\n\", $textfilter->doFilter($text, 'markdown'));\n $text = \"##rubrik-h2\";\n $this->assertEquals(\"<h2>rubrik-h2</h2>\\n\", $textfilter->doFilter($text, 'markdown'));\n }", "function minifyJS($js,$simple=true) {\n if($simple)\n {\n return(minifyWhitespace($js));\n }\n else\n {\n return JSMin::minify($js); //requires php5 +\n }\n }", "public function disableRemoveLineBreaksFromTemplate() {}", "protected function jsPipeline()\n\t{\n\t\t// If a custom minifier has been set use it, otherwise fallback to default\n\t\t$minifier = (isset($this->js_minifier)) ? $this->js_minifier : function ($buffer) {\n\t\t\treturn \\JSMin::minify($buffer);\n\t\t};\n\n\t\treturn $this->pipeline($this->js, '.js', $this->js_dir, $minifier);\n\t}", "public function providerTrim()\n {\n $data[] = array(\" foo \", 'foo');\n $data[] = array(\"\\t foo \\n\", 'foo');\n $data[] = array(\" 'foo' \", 'foo');\n $data[] = array(\"\\t \\\"foo\\\" \\n\", 'foo');\n $data[] = array(\"\\t ' foo ' \", 'foo');\n $data[] = array(\"\\n\\\" foo\\\" \", 'foo');\n $data[] = array(\" [ foo ] \", '[ foo ]');\n $data[] = array(\"\\t [ foo ] \\n\", '[ foo ]');\n $data[] = array(\" '[ foo ] ' \", '[ foo ]');\n $data[] = array(\"\\t\\\" [ foo ] \\\"\\n\", '[ foo ]');\n $data[] = array(\"\\t ' [ foo ] ' \", '[ foo ]');\n $data[] = array(\"\\n\\\" [ foo ] \\\" \", '[ foo ]');\n return $data;\n }", "public function testRepeatedWhitespaceReplacementDefault()\n {\n $string = ' Remove all repeated whitespace';\n $expected = 'Remove all repeated whitespace';\n $this->assertSame($expected, $this->_filter1->filter($string));\n }", "function tabScript($theLines,$tabSize) {\n\t$cnt1 = 0;\n\t$quoting = false;\n\twhile ($cnt1 < count($theLines)) {\n\t\t$theLine = $theLines[$cnt1];\n\t\t$cnt2 = 0;\n\t\twhile ($cnt2 < strlen($theLine)) {\n\t\t\t$char = $theLine[$cnt2];\n\t\t\tif ($char == '\"' || $char == \"'\" || $quoting) {\n\t\t\t\tif (!$quoting) {\n\t\t\t\t\t$quote = $char;\n\t\t\t\t\t$quoting = true;\n\t\t\t\t\t$cnt2++;\n\t\t\t\t}\n\t\t\t\tdo {\n\t\t\t\t\tif (($theLine[$cnt2 - 1] != '\\\\') && ($theLine[$cnt2] == $quote)) {\n\t\t\t\t\t\t$quoting = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} while ($cnt2++ < strlen($theLine));\n\t\t\t} else {\n\t\t\t\tif ($char == '{' && strlen($theLine) == 1) {\n\t\t\t\t\t$theLines[$cnt1 - 1] = $theLines[$cnt1 - 1] . \" \" . $theLines[$cnt1];\n\t\t\t\t\tunset($theLines[$cnt1]);\n\t\t\t\t\t$theLines = array_values($theLines);\n\t\t\t\t\t$cnt1--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (($char == ';') && $cnt2 < strlen($theLine) - 1) {\n\t\t\t\t\t$theLines[$cnt1] = trim(substr($theLine, 0, $cnt2+1));\n\t\t\t\t\tarray_splice($theLines, $cnt1+1, 0, trim(substr($theLine, $cnt2+1)));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cnt2++;\n\t\t}\n\t\t$cnt1++;\n\t}\n\t//Pass 2: Output lines with tabs.\n\tforeach ($theLines as $theLine) {\n \tif (substr($theLine,0,1) == \"}\" || substr($theLine,-1) == \"}\") $tabSize--;\n \ttabLine($theLine, $tabSize);\n \tif (substr($theLine,0,1) == \"{\" || substr($theLine,-1) == \"{\") $tabSize++;\n\t}\n}", "public function render() {\n\t \n\t\t$filter = $this->filter;\n\t\t$filtered = $filter::filter($this);\n\t\t\n\t\tif(is_array($filtered))\n\t\t $filtered = implode('#{\"\\n\"}' . $this->indent(), $filtered);\n\t\t\n\t\treturn '<?php echo (' . ruby\\InterpolatedString::compile($filtered) . '); ?>';\n\t\t\n\t}", "function compress($in)\n{\n $out = str_replace(\"\\n\",'',$in);\n $out = str_replace(\"\\t\",'',$out);\n $out = str_replace(\"\\r\",'',$out);\n $out = preg_replace('!\\s+!', ' ', $out);\n $out = preg_replace('/<!--(.*)-->/Uis', '', $out);\n return $out;\n}", "function minify_js($js)\n{\n $minifier = new Minify\\JS($js);\n return $minifier->minify();\n}", "public function filter($content){ }", "private function stripWhitespace($source)\n\t{\n\t\tif (!$this->optimize || !function_exists('token_get_all')) {\n\t\t\treturn $source;\n\t\t}\n\n\t\t$output = '';\n\t\tforeach (token_get_all($source) as $token) {\n\t\t\tif (is_string($token)) {\n\t\t\t\t$output .= $token;\n\t\t\t}\n\t\t\telseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telseif (T_WHITESPACE === $token[0]) {\n\t\t\t\t$whitespace = $token[1];\n\n\t\t\t\tif ($this->obfuscate) {\n\t\t\t\t\t// normalize newlines to \\n\n\t\t\t\t\t$whitespace = preg_replace('{(?:\\r\\n|\\r|\\n)}', ' ', $whitespace);\n\t\t\t\t\t// trim leading spaces\n\t\t\t\t\t$whitespace = preg_replace('{\\n +}', ' ', $whitespace);\n\t\t\t\t\t// reduce multiple newlines\n\t\t\t\t\t$whitespace = preg_replace('{\\n+}', ' ', $whitespace);\n\t\t\t\t}\n\n\t\t\t\t// reduce wide spaces\n\t\t\t\t$whitespace = preg_replace('{[ \\t]+}', ' ', $whitespace);\n\t\t\t\t// normalize newlines to \\n\n\t\t\t\t$whitespace = preg_replace('{(?:\\r\\n|\\r|\\n)}', \"\\n\", $whitespace);\n\t\t\t\t// trim leading spaces\n\t\t\t\t$whitespace = preg_replace('{\\n +}', \"\\n\", $whitespace);\n\t\t\t\t// reduce multiple newlines\n\t\t\t\t$whitespace = preg_replace('{\\n+}', \"\\n\", $whitespace);\n\t\t\t\t$output .= $whitespace;\n\t\t\t}\n\t\t\telse if ($this->obfuscate && T_INLINE_HTML === $token[0]) {\n\t\t\t\t$html = $token[1];\n\t\t\t\t$html = preg_replace('~>[\\s\\n]+<~', '><', $html);\n\t\t\t\t$html = preg_replace('~>[\\s\\n]+<~', '><', $html);\n\t\t\t\t$html = preg_replace('~>[\\s\\n]+~', '> ', $html);\n\t\t\t\t$html = preg_replace('~[\\s\\n]+<~', ' <', $html);\n\t\t\t\t$html = preg_replace('~^\\t+~', '', $html);\n\t\t\t\t$html = preg_replace('~^\\s+~', ' ', $html);\n\t\t\t\t$html = preg_replace('~\\s+$~', ' ', $html);\n\t\t\t\t$output .= $html;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$output .= $token[1];\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "private static function trimLines( $input ) {\n\t\treturn preg_replace( '/[ \\t\\r\\0\\x0B]+$/m', '', $input );\n\t}", "function ffeeeedd__minification__fin( $html ) {\n $html = preg_replace( '/<!--(?!s*(?:[if [^]]+]|!|>))(?:(?!-->).)*-->/s', '', $html );\n\n // Suppression des espaces vides\n $html = str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\", \"\\t\" ), '', $html );\n while ( stristr( $html, ' ' ) ) {\n $html = str_replace( ' ', ' ', $html );\n }\n return $html;\n }", "function compress($buffer)\n{\n $regexRemoveWhiteSpace = '%# Collapse ws everywhere but in blacklisted elements.\n (?> # Match all whitespaces other than single space.\n [^\\S ]\\s* # Either one [\\t\\r\\n\\f\\v] and zero or more ws,\n | \\s{2,} # or two or more consecutive-any-whitespace.\n ) # Note: The remaining regex consumes no text at all...\n (?= # Ensure we are not in a blacklist tag.\n (?: # Begin (unnecessary) group.\n (?: # Zero or more of...\n [^<]++ # Either one or more non-\"<\"\n | < # or a < starting a non-blacklist tag.\n (?!/?(?:textarea|pre)\\b)\n )*+ # (This could be \"unroll-the-loop\"ified.)\n ) # End (unnecessary) group.\n (?: # Begin alternation group.\n < # Either a blacklist start tag.\n (?>textarea|pre)\\b\n | \\z # or end of file.\n ) # End alternation group.\n ) # If we made it here, we are not in a blacklist tag.\n %ix';\n $regexRemoveWhiteSpace = '%(?>[^\\S ]\\s*| \\s{2,})(?=(?:(?:[^<]++| <(?!/?(?:textarea|pre)\\b))*+)(?:<(?>textarea|pre)\\b|\\z))%ix';\n $re = '%# Collapse whitespace everywhere but in blacklisted elements.\n (?> # Match all whitespans other than single space.\n [^\\S ]\\s* # Either one [\\t\\r\\n\\f\\v] and zero or more ws,\n | \\s{2,} # or two or more consecutive-any-whitespace.\n ) # Note: The remaining regex consumes no text at all...\n (?= # Ensure we are not in a blacklist tag.\n [^<]*+ # Either zero or more non-\"<\" {normal*}\n (?: # Begin {(special normal*)*} construct\n < # or a < starting a non-blacklist tag.\n (?!/?(?:textarea|pre|script)\\b)\n [^<]*+ # more non-\"<\" {normal*}\n )*+ # Finish \"unrolling-the-loop\"\n (?: # Begin alternation group.\n < # Either a blacklist start tag.\n (?>textarea|pre|script)\\b\n | \\z # or end of file.\n ) # End alternation group.\n ) # If we made it here, we are not in a blacklist tag.\n %Six';\n\n // $new_buffer = preg_replace('/<!--(.*|\\n)-->/Uis', \" \", sanitize_output($buffer));\n // $new_buffer = preg_replace('/\\s+/', \" \", sanitize_output($new_buffer));\n $new_buffer = preg_replace($regexRemoveWhiteSpace, \" \", sanitize_output($buffer));\n\n // We are going to check if processing has working\n if ($new_buffer === null) {\n $new_buffer = $buffer;\n }\n\n return $new_buffer;\n}", "function cleanRubbish($source)\n\t{\n\t\t$cleaningTab = array(\t\"<br>\" => \"\\n\", \"<br />\" => \"\\n\",\t\"<p>\" => \"\\n\", \"</p>\" => \"\\n\", \"&nbsp;\" => \" \", \"&#160;\" => \" \", chr(hexdec('C2')).chr(hexdec('A0')) => '');\n\t\tforeach ($cleaningTab as $key => $value) {\n \t$source = str_replace($key, $value, $source);\n\t\t}\n\t\treturn $source;\n\t}", "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "function sanitize_output($buffer)\n{\n $search = array(\n '/\\>[^\\S ]+/s', //strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', //strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n $buffer = preg_replace($search, $replace, $buffer);\n return $buffer;\n}", "public function filters()\n {\n return [\n 'confirmation_number' => 'trim',\n ];\n }", "function anva_compress( $buffer ) {\n\n\t// Remove comments\n\t$buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n\n\t// Remove tabs, spaces, newlines, etc.\n\t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer);\n\n\treturn $buffer;\n}", "public function filter($content) {}", "public function Filter($val,$tf=false)\r\n{\r\n\tif($tf==false)\r\n\t{\r\n\t\t$val=strip_tags($val);\r\n\t}\r\n\t$val=addslashes(trim($val));\r\n\treturn $val;\r\n}", "public function filter();", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "static function trim_whitespaces( $in ) {\n\t\t$out = preg_replace( '/[\\t ]*\\n[\\t ]*/', PHP_EOL, $in );\n\t\treturn trim( $out );\n\t}", "public function testFilterRender() {\n return [\n '#theme' => 'twig_extension_test_filter',\n '#message' => 'Every animal is not a mineral.',\n '#safe_join_items' => [\n '<em>will be escaped</em>',\n $this->t('<em>will be markup</em>'),\n ['#markup' => '<strong>will be rendered</strong>'],\n ],\n ];\n }", "function preview_theme_ob_filter_callback($matches)\n{\n}", "public function assetsManagerOutputCssFilterChainCustomFilterWithCssmin(UnitTester $I)\n {\n $I->wantToTest(\n 'Assets\\Manager - outputCss() - filter chain custom filter with cssmin'\n );\n\n $fileName = $I->getNewFileName('assets_', 'css');\n $fileName = outputDir('tests/assets/' . $fileName);\n $cssFile = dataDir('assets/assets/1198.css');\n $manager = new Manager(new TagFactory(new Escaper()));\n\n $manager->useImplicitOutput(false);\n\n $css = $manager->collection('css');\n\n $css\n ->setTargetPath($fileName)\n ->addCss($cssFile)\n ->addFilter(new UppercaseFilter())\n ->addFilter(new TrimFilter())\n ->join(true)\n ;\n\n $manager->outputCss('css');\n\n $I->openFile($fileName);\n\n $I->seeFileContentsEqual(\n 'A{TEXT-DECORATION:NONE;}B{FONT-WEIGHT:BOLD;}'\n );\n\n $I->safeDeleteFile($fileName);\n }", "function duskStrFilter($str) {\n\t\treturn str_replace([\"\\n\", \"'\"], ['\\\\n', \"\\'\"], $str);\n\t}", "function preview_theme_ob_filter($content)\n{\n}", "function oo_optimize($html){\r\n\t$html = str_replace(\"\\r\\n\", \"\", $html);\r\n\t$html = str_replace(\"\\n\", \"\", $html);\r\n\t$html = str_replace(\"\\t\", \"\", $html);\r\n\t$html = str_replace(\" \", \"\", $html);\r\n\t$html = preg_replace(\"/<!--(.*?)-->/\", \"\", $html);\r\n\treturn $html;\r\n}", "function compress($buffer)\n {\n \t/* remove comments */\n \t//$buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n \t$buffer = preg_replace(\"/((?:\\/\\*(?:[^*]|(?:\\*+[^*\\/]))*\\*+\\/)|(?:\\/\\/.*))/\", \"\", $buffer);\n \t/* remove tabs, spaces, newlines, etc. */\n \t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $buffer);\n \treturn $buffer;\n }", "function filter($word) { \r\n\t\t$word = (string)myMagic(stripslashes(trim($word))); \r\n\t\t$word = (string)nl2br($word); \r\n\t\t$word = (string)htmlentities($word); \r\n\t\treturn $word ; \r\n\t}", "function compressJavascript($sJS)\r\n\t{\r\n\t\t//remove windows cariage returns\r\n\t\t$sJS = str_replace(\"\\r\",\"\",$sJS);\r\n\t\t\r\n\t\t//array to store replaced literal strings\r\n\t\t$literal_strings = array();\r\n\t\t\r\n\t\t//explode the string into lines\r\n\t\t$lines = explode(\"\\n\",$sJS);\r\n\t\t//loop through all the lines, building a new string at the same time as removing literal strings\r\n\t\t$clean = \"\";\r\n\t\t$inComment = false;\r\n\t\t$literal = \"\";\r\n\t\t$inQuote = false;\r\n\t\t$escaped = false;\r\n\t\t$quoteChar = \"\";\r\n\t\t\r\n\t\tfor($i=0;$i<count($lines);$i++)\r\n\t\t{\r\n\t\t\t$line = $lines[$i];\r\n\t\t\t$inNormalComment = false;\r\n\t\t\r\n\t\t\t//loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string\r\n\t\t\tfor($j=0;$j<strlen($line);$j++)\r\n\t\t\t{\r\n\t\t\t\t$c = substr($line,$j,1);\r\n\t\t\t\t$d = substr($line,$j,2);\r\n\t\t\r\n\t\t\t\t//look for start of quote\r\n\t\t\t\tif(!$inQuote && !$inComment)\r\n\t\t\t\t{\r\n\t\t\t\t\t//is this character a quote or a comment\r\n\t\t\t\t\tif(($c==\"\\\"\" || $c==\"'\") && !$inComment && !$inNormalComment)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$inQuote = true;\r\n\t\t\t\t\t\t$inComment = false;\r\n\t\t\t\t\t\t$escaped = false;\r\n\t\t\t\t\t\t$quoteChar = $c;\r\n\t\t\t\t\t\t$literal = $c;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if($d==\"/*\" && !$inNormalComment)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$inQuote = false;\r\n\t\t\t\t\t\t$inComment = true;\r\n\t\t\t\t\t\t$escaped = false;\r\n\t\t\t\t\t\t$quoteChar = $d;\r\n\t\t\t\t\t\t$literal = $d;\t\r\n\t\t\t\t\t\t$j++;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if($d==\"//\") //ignore string markers that are found inside comments\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$inNormalComment = true;\r\n\t\t\t\t\t\t$clean .= $c;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$clean .= $c;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse //allready in a string so find end quote\r\n\t\t\t\t{\r\n\t\t\t\t\tif($c == $quoteChar && !$escaped && !$inComment)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$inQuote = false;\r\n\t\t\t\t\t\t$literal .= $c;\r\n\t\t\r\n\t\t\t\t\t\t//subsitute in a marker for the string\r\n\t\t\t\t\t\t$clean .= \"___\" . count($literal_strings) . \"___\";\r\n\t\t\r\n\t\t\t\t\t\t//push the string onto our array\r\n\t\t\t\t\t\tarray_push($literal_strings,$literal);\r\n\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if($inComment && $d==\"*/\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$inComment = false;\r\n\t\t\t\t\t\t$literal .= $d;\r\n\t\t\r\n\t\t\t\t\t\t//subsitute in a marker for the string\r\n\t\t\t\t\t\t$clean .= \"___\" . count($literal_strings) . \"___\";\r\n\t\t\r\n\t\t\t\t\t\t//push the string onto our array\r\n\t\t\t\t\t\tarray_push($literal_strings,$literal);\r\n\t\t\r\n\t\t\t\t\t\t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if($c == \"\\\\\" && !$escaped)\r\n\t\t\t\t\t\t$escaped = true;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$escaped = false;\r\n\t\t\r\n\t\t\t\t\t$literal .= $c;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($inComment) $literal .= \"\\n\";\r\n\t\t\t$clean .= \"\\n\";\r\n\t\t}\r\n\t\t//explode the clean string into lines again\r\n\t\t$lines = explode(\"\\n\",$clean);\r\n\t\t\r\n\t\t//now process each line at a time\r\n\t\tfor($i=0;$i<count($lines);$i++)\r\n\t\t{\r\n\t\t\t$line = $lines[$i];\r\n\t\t\r\n\t\t\t//remove comments\r\n\t\t\t$line = preg_replace(\"/\\/\\/(.*)/\",\"\",$line);\r\n\t\t\r\n\t\t\t//strip leading and trailing whitespace\r\n\t\t\t$line = trim($line);\r\n\t\t\r\n\t\t\t//remove all whitespace with a single space\r\n\t\t\t$line = preg_replace(\"/\\s+/\",\" \",$line);\r\n\t\t\r\n\t\t\t//remove any whitespace that occurs after/before an operator\r\n\t\t\t$line = preg_replace(\"/\\s*([!\\}\\{;,&=\\|\\-\\+\\*\\/\\)\\(:])\\s*/\",\"\\\\1\",$line);\r\n\t\t\r\n\t\t\t$lines[$i] = $line;\r\n\t\t}\r\n\t\t\r\n\t\t//implode the lines\r\n\t\t$sJS = implode(\"\\n\",$lines);\r\n\t\t\r\n\t\t//make sure there is a max of 1 \\n after each line\r\n\t\t$sJS = preg_replace(\"/[\\n]+/\",\"\\n\",$sJS);\r\n\t\t\r\n\t\t//strip out line breaks that immediately follow a semi-colon\r\n\t\t$sJS = preg_replace(\"/;\\n/\",\";\",$sJS);\r\n\t\t\r\n\t\t//curly brackets aren't on their own\r\n\t\t$sJS = preg_replace(\"/[\\n]*\\{[\\n]*/\",\"{\",$sJS);\r\n\t\t\r\n\t\t//finally loop through and replace all the literal strings:\r\n\t\tfor($i=0;$i<count($literal_strings);$i++)\r\n\t\t\t$sJS = str_replace(\"___\".$i.\"___\",$literal_strings[$i],$sJS);\r\n\t\t\r\n\t\treturn $sJS;\r\n\t}", "function buildAppJsDebugRegex($jsConcat) {\n\n\t$out = $jsConcat;\n\n\t// get and remove first license text\n\t$search = \"|/[ \\t]*\\*\\s*#LICENSE BEGIN.*?#LICENSE END\\s*\\*/[ \\t]*|s\";\n\tpreg_match($search, $out, $matches);\n\t$license = $matches[0];\n\t$out = preg_replace($search, \"\", $out, 1);\n\n\t// remove all single line comments\n\t// this DOES NOT WORK:\n\t//$out = preg_replace(\"|\\s*//.*$|mU\", \"\", $out);\n\t// looks like php 5.3 includes line-breaks into whitespace collecting\n\t// after \"^\" and before \"$\" so try following workaround\n\t$out = preg_replace(\"|[ \\t]*//.*?$|m\", \"\", $out);\n\n\t// remove multiline comments with fitting count of line breaks\n\t$matches2 = array();\n\tpreg_match_all(\"|[ \\t]*/\\*.*?\\*/[ \\t]*|s\", $out, $matches);\n\t// preserve multiple maches only once by using as key\n\tforeach ($matches[0] as $match) {\n\t\t$matches2[$match] = $match;\n\t}\n\tforeach ($matches2 as $match) {\n\t\t$repl = preg_replace(\"/[^\\n\\r]+/\", \"\", $match);\n\t\t$match = preg_quote($match, \"|\");\n\t\t$out = preg_replace(\"|{$match}|\", $repl, $out);\n\t}\n\n\n\t$out = \"{$license}{$out}\";\n\treturn $out;\n}", "function filter($data) {\n\t$data = trim(htmlentities(strip_tags($data)));\n\tif (get_magic_quotes_gpc())\n\t\t$data = stripslashes($data);\n\treturn $data;\n}", "public function js_code()\n {\n if (count($this->page_items) == 0)\n return '';\n\n $js_code = $this->_js_code_listo().\"\\n\";\n $js_code .= $this->_js_code_tablesorter().\"\\n\";\n\n return '$(function() {\n '.$js_code.'\n });';\n }", "private function _nlMinJs()\n {\n $version = get_plugin_ini('NeatlineFeatures', 'version');\n return \"neatline-features-{$version}-min\";\n }", "function sanitizeOutput($buffer)\n{\n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n return preg_replace($search, $replace, $buffer);\n}", "public static function uglify($html){\n\t\t$outhtml = '';\n\t\t$insidetag = false;\n\t\t$insidepre = false;\n\t\t$inside1q = false;\n\t\t$inside2q = false;\n\t\t$lastchar = '';\n\t\tfor($i = 0; $i < strlen($html); $i++){\n\t\t\tif(($html{$i} == '>') and ($inside1q != true) and ($inside2q != true)){\n\t\t\t\t$insidetag = false;\n\t\t\t}\n\t\t\tif($html{$i} == '<'){\n\t\t\t\t$insidetag = true;\n\t\t\t\tif(strtoupper(substr($html,$i+1,3)) == 'PRE'){\n\t\t\t\t\t$insidepre = true;\n\t\t\t\t}\n\t\t\t\tif(strtoupper(substr($html,$i+1,4)) == '/PRE'){\n\t\t\t\t\t$insidepre = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($insidetag == true){\n\t\t\t\tif($html{$i} == '\"'){\n\t\t\t\t\t$inside2q = !$inside2q;\n\t\t\t\t}\n\t\t\t\tif($html{$i} == \"'\"){\n\t\t\t\t\t$inside1q = !$inside1q;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$nextchar = $html{$i};\n\t\t\t$copythis = true;\n\t\t\tif(($insidetag != true) and ($insidepre != true) and ($inside1q != true) and ($inside2q != true)){\n\t\t\t\tif(preg_match('/[\\s\\n\\t\\r]/',$html{$i})){\n\t\t\t\t\t$nextchar = ' ';\n\t\t\t\t\twhile(($i < strlen($html) - 1) and (preg_match('/[\\s\\n\\t\\r]/',$html{$i + 1}))){\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$outhtml .= $nextchar;\n\t\t}\n\t\treturn $outhtml;\n\t}\n\t//This function adds indentation to the html string, is a port from the javascript function\n\tpublic static function prettify($html){\n\t\t$outhtml = '';\n\t\t$insidetag = false;\n\t\t$insidepre = false;\n\t\t$insideEnd = false;\n\t\t$isexclude = false;\n\t\t$tabcount = 0;\n\t\t$exclude = ['a','b','big','i','small','tt','abbr','acronym','cite','code','dfn','em','kbd','strong','samp','time','var','bdo','br','img','map','object','q','script','span','sub','button','input','label','select','textarea','!--'];\n\t\t$inside1q = false;\n\t\t$inside2q = false;\n\t\tfor($i = 0; $i < strlen($html); $i++){\n\t\t\tif($insidetag == true){\n\t\t\t\tif($html{$i} == '\"'){\n\t\t\t\t\t$inside2q = !$inside2q;\n\t\t\t\t}\n\t\t\t\tif($html{$i} == \"'\"){\n\t\t\t\t\t$inside1q = !$inside1q;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(($html{$i} == '<') and ($inside1q != true) and ($inside2q != true) and ($insidepre != true)){\n\t\t\t\t$insidetag = true;\n\t\t\t\tfor($k = 0; $k < count($exclude); $k++){\n\t\t\t\t\tif(\n\t\t\t\t\t\t((strtoupper(substr($html, $i + 1, strlen($exclude[$k]) + 1)) == strtoupper($exclude[$k]).' ')) or\n\t\t\t\t\t\t((strtoupper(substr($html, $i + 1, strlen($exclude[$k]) + 1)) == strtoupper($exclude[$k]).'>')) or\n\t\t\t\t\t\t((strtoupper(substr($html, $i + 1, strlen($exclude[$k]) + 2)) == '/'.strtoupper($exclude[$k]).' ')) or\n\t\t\t\t\t\t((strtoupper(substr($html, $i + 1, strlen($exclude[$k]) + 2)) == '/'.strtoupper($exclude[$k]).'>'))\n\t\t\t\t\t){\n\t\t\t\t\t\t$isexclude = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($isexclude == false){\n\t\t\t\t\tif($html{$i + 1} == '/'){\n\t\t\t\t\t\t$insideEnd = true;\n\t\t\t\t\t\t$tabcount--;\n\t\t\t\t\t\t$outhtml .= PHP_EOL;\n\t\t\t\t\t\tfor($j = 0; $j < $tabcount; $j++){\n\t\t\t\t\t\t\t$outhtml .= ' ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$insideEnd = false;\n\t\t\t\t\t\t$tabcount++;\n\t\t\t\t\t\t$outhtml .= PHP_EOL;\n\t\t\t\t\t\tfor($j = 0; $j < $tabcount; $j++){\n\t\t\t\t\t\t\t$outhtml .= ' ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$outhtml .= $html{$i};\n\t\t\tif(($html{$i} == '>') and ($inside1q != true) and ($inside2q != true) and ($insidepre != true)){\n\t\t\t\t$insidetag = false;\n\t\t\t\tif($isexclude == false){\n\t\t\t\t\tif($insideEnd == true){\n\t\t\t\t\t\t$tabcount--;\n\t\t\t\t\t\t$outhtml .= PHP_EOL;\n\t\t\t\t\t\tfor($j = 0; $j < $tabcount; $j++){\n\t\t\t\t\t\t\t$outhtml .= ' ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tabcount++;\n\t\t\t\t\t\t$outhtml .= PHP_EOL;\n\t\t\t\t\t\tfor($j = 0; $j < $tabcount; $j++){\n\t\t\t\t\t\t\t$outhtml .= ' ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$isexclude = false;\n\t\t\t\t$insideEnd = false;\n\t\t\t}\n\t\t\tif($html{$i} == '<'){\n\t\t\t\tif(strtoupper(substr($html,$i+1,3)) == 'PRE'){\n\t\t\t\t\t$insidepre = true;\n\t\t\t\t\t$tabcount--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($html{$i} == '<'){\n\t\t\t\tif(strtoupper(substr($html,$i+1,4)) == '/PRE'){\n\t\t\t\t\t$insidepre = false;\n\t\t\t\t\t$tabcount--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $outhtml;\n\t}\n\t//Another port from javascript\n\tpublic static function autoindent($html){\n\t\t$regx = self::parse_params($html);\n\t\t$html = preg_replace('/<\\!--.*:.*-->[\\n\\r]/','',$html);\n\t\t$html = preg_replace('/<\\!--.*:.*-->/','',$html);\n\t\t$addtags = '';\n\t\tforeach($regx as $key => $param){\n\t\t\t$addtags .= '<!-- '.$key.':'.$param.' -->'.PHP_EOL;\n\t\t}\n\t\treturn $addtags.self::prettify(self::uglify($html));\n\t}\n\t//Gets the given line of a file ...\n\tpublic static function get_line($line, $file){\n\t\t$file = file($file);\n\t\treturn $file[$line];\n\t}\n\t\n\t//This function will create a footer to show the actions\n\tpublic static function create_footer(){\n\t\tif (self::$islogged == true){\n\t\t\tif (!isset($_REQUEST[\"action\"])){//Don't show the link to edit the page if we are on an action\n\t\t\t\treturn '<span><a href=\"'.self::get_this_page(true).'action=changepass\">Change password.</a></span> <span><a href=\"'.self::get_this_page(true).'action=editfile\">Edit this page.</a></span> <span><a href=\"'.self::get_this_page(true).'action=filemanager\">File manager</a></span> <span><a href=\"'.self::get_this_page(true).'action=delcache\">Delete cache</a></span> <span><a href=\"'.self::get_this_page(true).'action=logout\">Logout</a></span><hr>';\n\t\t\t}else{//If you are in a action you can not edit the current page, because you can not edit internal pages\n\t\t\t\treturn '<span><a href=\"'.self::get_this_page(true).'action=changepass\">Change password.</a></span> <span><a href=\"'.self::get_this_page(true).'action=filemanager\">File manager</a></span> <span><a href=\"'.self::get_this_page(true).'action=delcache\">Delete cache</a></span> <span><a href=\"'.self::get_this_page(true).'action=logout\">Logout</a></span><hr>';\n\t\t\t}\n\t\t}else{\n\t\t\treturn '<a href=\"'.self::get_this_page(true).'action=login\">Login</a>';\n\t\t}\n\t}\n\t//To create an special page\n\tpublic static function load_action($action){\n\t\tswitch($action){\n\t\t\t//Action that show the login form\n\t\t\tcase \"login\":\n\t\t\t\tif(isset($_SESSION['return'])){ \n\t\t\t\t\tunset($_SESSION['return']);\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => '<div id=\"login\">\n\t\t\t\t\t\t<form action=\"'.self::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"verifylogin\"></input>\n\t\t\t\t\t\t\t<div><label for=\"password\">Password: </label></div>\n\t\t\t\t\t\t\t<div><input type=\"password\" name=\"password\"></input></div>\n\t\t\t\t\t\t\t<div><input type=\"checkbox\" id=\"keep\" name=\"keep\"></input><label for=\"keep\">Keep logged</label></div>\n\t\t\t\t\t\t\t<div><input type=\"checkbox\" id=\"idonurl\" name=\"idonurl\"></input><label for=\"idonurl\">Login without cookies</label></div>\n\t\t\t\t\t\t\t<div><input type=\"submit\" value=\"login\"></input></div>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>',\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Login\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//Action that verify if the password was correct, and logs the user in\n\t\t\tcase \"verifylogin\":\n\t\t\t\t//echo password_hash($_POST['psw'], PASSWORD_BCRYPT).'<br>';\n\t\t\t\t$output = '';\n\t\t\t\tif (password_verify($_POST['password'] , self::get_line(1,PASSWORD_HASH_FILE))){//The password is stored on this file\n\t\t\t\t\tif (isset($_POST['idonurl'])){\n\t\t\t\t\t\tself::log_user_in_without_cookies();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tself::log_user_in(isset($_POST['keep']));\n\t\t\t\t\t}\n\t\t\t\t\tif(is_file(TOKEN_FILE)){\n\t\t\t\t\t\tunlink(TOKEN_FILE);\n\t\t\t\t\t}\n\t\t\t\t\t$output = 'You are logged now, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'You have typed the wrong password click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Login\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//Action that logs the user out\n\t\t\tcase \"logout\":\n\t\t\t\tif(self::$islogged == true){\n\t\t\t\t\tself::logout();\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => 'You are now logged out. click <a href=\"'.self::get_this_page(false).'\">here</a> to go back.',\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Logout\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\t//Stop here if the user is not loged in ...\n\t\tif(self::$islogged != true){\n\t\t\treturn Array(\n\t\t\t\t\"content\" => \"You can not access this page without log in ...\",\n\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\"title\" => \"Login required\"\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t//Actions that don't generate a token\n\t\tswitch($action){\n\t\t\t//This action erases the menu cache\n\t\t\tcase \"delcache\":\n\t\t\t\tmfcms::delete_cache();\n\t\t\t\t$output = 'Cache deleted, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Delete cache\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\t//Actions that requires login and generates a random token to avoid crosssite attack\n\t\t$token = self::generate_token();\n\t\tswitch($action){\n\t\t\t//Action that shows the form to change the password\n\t\t\tcase \"changepass\":\n\t\t\t\t$output = '<div id=\"login\">\n\t\t\t\t\t<form action=\"'.self::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"verifypchange\"></input>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t\t<div><label>Old password: </label></div>\n\t\t\t\t\t\t<div><input type=\"password\" name=\"oldpassword\"></input></div>\n\t\t\t\t\t\t<div><label>New password: </label></div>\n\t\t\t\t\t\t<div><input type=\"password\" name=\"newpassword\"></input></div>\n\t\t\t\t\t\t<div><label>Verify new password: </label></div>\n\t\t\t\t\t\t<div><input type=\"password\" name=\"newpassword2\"></input></div>\n\t\t\t\t\t\t<div class=\"btn-spacer\"></div>\n\t\t\t\t\t\t<div><input type=\"submit\" value=\"Change password\"></input></div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>';\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Change password\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//Action to show the current page or the specified page on a text area\n\t\t\tcase \"editfile\":\n\t\t\t\t//If a file parameter was sent, that file will be edited, if not, the file on f parameter will be edited\n\t\t\t\tif(!isset($_GET['file'])){\n\t\t\t\t\t$to_edit = self::$file;\n\t\t\t\t\t$file_field = '';\n\t\t\t\t}else{\n\t\t\t\t\t$to_edit = pathjoin(CONTENT_DIR,$_GET['file']);\n\t\t\t\t\t//This hidden field will be used to indicate to the next step (saving) that we will not save the current page's file\n\t\t\t\t\t$file_field = '<input type=\"hidden\" name=\"file\" value=\"'.$_GET['file'].'\"></input>';\n\t\t\t\t}\n\t\t\t\tself::sanitize($to_edit);\n\t\t\t\tif(file_exists($to_edit)){\n\t\t\t\t\t$output = '';\n\t\t\t\t\t$textToEdit = self::get_file_to_show($to_edit);\n\t\t\t\t\t//Show link to edit code only\n\t\t\t\t\tif(!(isset($_GET['nowysiwyg']) and ($_GET['nowysiwyg'] == 'true'))){//Show a link to code only if we have wysiwyg editor\n\t\t\t\t\t\t$query = Array();\n\t\t\t\t\t\tparse_str(parse_url($_SERVER['REQUEST_URI'])['query'],$query);\n\t\t\t\t\t\tunset($query['LOGINID']);\n\t\t\t\t\t\tunset($query['f']);//Because mfcms::get_this_page already gives the f\n\t\t\t\t\t\t$query['nowysiwyg']='true';\n\t\t\t\t\t\t$params = http_build_query($query);\n\t\t\t\t\t\t$output .= '<div id=\"code-only\"><a href=\"'.mfcms::get_this_page(true).$params.'\">Code only</a></div>';\n\t\t\t\t\t}else{ //this also enable the server side autoindent when wysiwyg editor is disabled\n\t\t\t\t\t\t$textToEdit = self::autoindent($textToEdit);\n\t\t\t\t\t}\n\t\t\t\t\t$output .= '\n\t\t\t\t\t<div id=\"wysiwyg-changer\"></div>\n\t\t\t\t\t<div id=\"wysiwyg-buttons\"></div>\n\t\t\t\t\t<div id=\"wysiwyg-wrapper\"></div>\n\t\t\t\t\t<form id=\"file-editor\" action=\"'.self::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t\t<div class=\"st-table\">\n\t\t\t\t\t\t\t<table border=\"1\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th colspan=\"4\">Special tags</th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>&lt;!-- title:page title --&gt;</td>\n\t\t\t\t\t\t\t\t\t\t<td>&lt;!-- menu:Menu/submenu --&gt;</td>\n\t\t\t\t\t\t\t\t\t\t<td>&lt;!-- position:10 --&gt;</td>\n\t\t\t\t\t\t\t\t\t\t<td>&lt;!-- nolink:1 --&gt;</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>Page title</td>\n\t\t\t\t\t\t\t\t\t\t<td>Menu path</td>\n\t\t\t\t\t\t\t\t\t\t<td>Position on menu</td>\n\t\t\t\t\t\t\t\t\t\t<td>Not clickable</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"savefile\"></input>\n\t\t\t\t\t\t'.$file_field.'\n\t\t\t\t\t\t<div class=\"filecontent-wrapper\">\n\t\t\t\t\t\t\t<textarea rows=\"30\" cols=\"100\" id=\"filecontent\" name=\"filecontent\">'.htmlentities($textToEdit).'</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"btn-spacer\"></div>\n\t\t\t\t\t\t<div class=\"filecontent-wrapper\">\n\t\t\t\t\t\t\t<div class=\"filecontent-clone\">\n\t\t\t\t\t\t\t\t<a class=\"button\" onclick=\"document.getElementById(\\'filecontent\\').value = autoindent(document.getElementById(\\'filecontent\\').value)\">AutoIndent</a>\n\t\t\t\t\t\t\t\t<a class=\"button\" href=\"'.self::get_return_url().'\">Discard</a>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\" Save \">\n\t\t\t\t\t\t\t</input></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>';\n\t\t\t\t\tif(!(isset($_GET['nowysiwyg']) and ($_GET['nowysiwyg'] == 'true'))){//Script for the wysiwyg editor\n\t\t\t\t\t\t$output .= '<script src=\"'.ROOT_URL.'js/editor.js\"></script>';\n\t\t\t\t\t}\n\t\t\t\t\t$output .= '<script src=\"'.ROOT_URL.'js/indenter.js\"></script>';\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'You can not edit a file that don\\'t exist, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Page editor\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action is the file manager\n\t\t\tcase \"filemanager\":\n\t\t\t\tif(isset($_GET['dir'])){//Sets the directory to show\n\t\t\t\t\t$current_dir_rel = $_GET['dir'];\n\t\t\t\t\t$current_dir_abs = pathjoin(CONTENT_DIR,$_GET['dir']);\n\t\t\t\t}else{\n\t\t\t\t\t$current_dir_rel = '/';\n\t\t\t\t\t$current_dir_abs = CONTENT_DIR;\n\t\t\t\t}\n\t\t\t\tself::sanitize($current_dir_abs);\n\t\t\t\t//Set this cookie so we will return here instead of the page\n\t\t\t\t$_SESSION['return'] = $current_dir_rel;\n\t\t\t\t$nextpage = self::get_this_page(true);//Link to this page\n\t\t\t\t//Starts the table\n\t\t\t\t$output = '<div style=\"overflow-x:auto;overflow-y:hidden;text-align:center;\"><table class=\"file-list\" border=\"1\"><thead><tr><th colspan=\"4\">Server files</th></tr></thead><tbody>';\n\t\t\t\t$directory = scandir($current_dir_abs);\n\t\t\t\t//For each file\n\t\t\t\tforeach($directory as $key => $value){\n\t\t\t\t\tif ($value == '.'){\n\t\t\t\t\t}else if ($value == '..'){\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_dir(pathjoin($current_dir_abs, $value))){//Print directory cell\n\t\t\t\t\t\t\t$output .= '<tr bgcolor=\"#f2e98e\"><td><a href=\"'.$nextpage.'action=filemanager&dir='.urlencode(pathjoin($current_dir_rel, $value)).'\" >['.$value.']</a></td>';\n\t\t\t\t\t\t}else if(is_file(pathjoin($current_dir_abs, $value))){//Print file cell\n\t\t\t\t\t\t\tif(preg_match('/jpg$|jpeg$|gif$|png$|webp$|bmp$|mov$|avi$|mkv$/',$value)){//This files should open in a new tab instead of being edited\n\t\t\t\t\t\t\t\t$output .= '<tr bgcolor=\"#b5d1ff\"><td><a href=\"'.pathjoin(pathjoin(ROOT_URL.CONTENT_SUBDIR,$current_dir_rel), $value).'\" target=\"_blank\">'.$value.'</a></td>';\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$output .= '<tr bgcolor=\"#b5d1ff\"><td><a href=\"'.$nextpage.'action=editfile&file='.urlencode(pathjoin($current_dir_rel, $value)).'\" >'.$value.'</a></td>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Write move copy and delete cells\n\t\t\t\t\t\t$output .= '<td><a href=\"'.$nextpage.'action=movefile&file='.urlencode(pathjoin($current_dir_rel, $value)).'\" >Move</a></td>';\n\t\t\t\t\t\t$output .= '<td><a href=\"'.$nextpage.'action=copyfile&file='.urlencode(pathjoin($current_dir_rel, $value)).'\" >Copy</a></td>';\n\t\t\t\t\t\t$output .= '<td><a href=\"'.$nextpage.'action=deletefile&file='.urlencode(pathjoin($current_dir_rel, $value)).'\" >Delete</a></td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($current_dir_rel != '/'){//If we are not in root directory, print a link to the parent\n\t\t\t\t\t$output .= '<tr><td colspan=\"4\" bgcolor=\"#f2e98e\"><a href=\"'.$nextpage.'action=filemanager&dir='.urlencode(goparent($current_dir_rel)).'\" >Parent directory</a></td></tr>';\n\t\t\t\t}\n\t\t\t\t//Line to create a new file\n\t\t\t\t$output .= '<tr><form action=\"'.mfcms::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"newfile\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"'.$current_dir_rel.'\"></input>\n\t\t\t\t\t<td colspan=\"3\" class=\"file-input\"><input type=\"text\" name=\"file\" value=\"\"></input></td>\n\t\t\t\t\t<td class=\"file-input\"><input type=\"submit\" value=\"New file\"></input></td>\n\t\t\t\t</form></td></tr>';\n\t\t\t\t//Line to create a new directory\n\t\t\t\t$output .= '<tr><form action=\"'.mfcms::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"newdir\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"'.$current_dir_rel.'\"></input>\n\t\t\t\t\t<td colspan=\"3\" class=\"file-input\"><input type=\"text\" name=\"file\" value=\"\"></input></td>\n\t\t\t\t\t<td class=\"file-input\"><input type=\"submit\" value=\"New dir\"></input></td>\n\t\t\t\t</form></tr>';\n\t\t\t\t//Line to upload file\n\t\t\t\t$output .= '<tr><form enctype=\"multipart/form-data\" action=\"'.mfcms::get_this_page(false).'\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"receivefile\"></input>\n\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"'.$current_dir_rel.'\"></input>\n\t\t\t\t\t<td colspan=\"3\" class=\"file-input\"><input type=\"file\" name=\"file\" value=\"\"></input></td>\n\t\t\t\t\t<td class=\"file-input\"><input type=\"submit\" value=\"Upload\"></input></td>\n\t\t\t\t</form></tr>';\n\t\t\t\t$output .= '</tbody></table></div>';\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"File manager\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This shows the move or rename form\n\t\t\tcase \"movefile\":\n\t\t\t\tif(isset($_GET['file'])){\n\t\t\t\t\t$output = '<div id=\"login\"><form action='.self::get_this_page(false).' method=\"GET\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"domovefile\"></input>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"oldfile\" value=\"'.$_GET['file'].'\"></input>\n\t\t\t\t\t\t<div>Destination file:</div>\n\t\t\t\t\t\t<div><input type=\"text\" name=\"newfile\" value=\"'.$_GET['file'].'\"></input></div>\n\t\t\t\t\t\t<div class=\"btn-spacer\"></div>\n\t\t\t\t\t\t<div><input type=\"submit\" value=\"Move\"></input></div>\n\t\t\t\t\t</form></div>';\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to move, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Move file\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This shows the form to copy a file\n\t\t\tcase \"copyfile\":\n\t\t\t\tif(isset($_GET['file'])){\n\t\t\t\t\t$output = '<div id=\"login\"><form action='.self::get_this_page(false).' method=\"GET\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"'.$token.'\"></input>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"docopyfile\"></input>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"oldfile\" value=\"'.$_GET['file'].'\"></input>\n\t\t\t\t\t\t<div>Destination file:</div>\n\t\t\t\t\t\t<div><input type=\"text\" name=\"newfile\" value=\"'.$_GET['file'].'\"></input></div>\n\t\t\t\t\t\t<div class=\"btn-spacer\"></div>\n\t\t\t\t\t\t<div><input type=\"submit\" value=\"Copy\"></input></div>\n\t\t\t\t\t</form></div>';\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to copy, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Copy file\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This shows the form to delete a file\n\t\t\tcase \"deletefile\":\n\t\t\t\tif(isset($_GET['file'])){\n\t\t\t\t\t$output = '<div>Are you sure that you want to delete this file ?</div>\n\t\t\t\t\t<a href=\"'.self::get_this_page(true).'action=dodeletefile&file='.urlencode($_GET['file']).'&token='.$token.'\">yes</a>\n\t\t\t\t\t<a href=\"'.self::get_return_url().'\">NO, I DON\\'T WANT TO DELETE THIS FILE !!!</a>';\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to delete, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"DELETE FILE\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\t//Actions that requires a valid token\n\t\t$tokenIsValid = false;\n\t\tif((isset($_GET['token'])) or (isset($_POST['token']))){\n\t\t\t$tokenIsValid = self::use_token($_REQUEST['token']);\n\t\t}\n\t\tif($tokenIsValid == false){\n\t\t\treturn Array(\n\t\t\t\t\"content\" => \"This token is not valid ...\",\n\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\"title\" => \"Invalid Token\"\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tswitch($action){\n\t\t\t//Action that changes the password ...\n\t\t\tcase \"verifypchange\":\n\t\t\t\tif (password_verify($_POST['oldpassword'] , self::get_line(1,PASSWORD_HASH_FILE))){//You must type the correct old password to change it\n\t\t\t\t\tif($_POST['newpassword'] == $_POST['newpassword2']){//You must type the same password to change it\n\t\t\t\t\t\tfile_put_contents(PASSWORD_HASH_FILE, self::$exitheader.password_hash($_POST['newpassword'], PASSWORD_BCRYPT));\n\t\t\t\t\t\t$output = 'Password succefully changed, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$output = 'You have typed 2 different passwords, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'Wrong old password, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Change password\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//Action to save the edited file\n\t\t\tcase \"savefile\":\n\t\t\t\tif(!isset($_POST['file'])){//If receive a file parameter, saves that file, if not, saves the current page\n\t\t\t\t\t$to_save = self::$file;\n\t\t\t\t}else{\n\t\t\t\t\t$to_save = pathjoin(CONTENT_DIR,$_POST['file']);\n\t\t\t\t}\n\t\t\t\tself::sanitize($to_save);\n\t\t\t\tif(!isset($_POST['filecontent'])){\n\t\t\t\t\t$output = 'the browser have not sent content to save, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}else{\n\t\t\t\t\tif(file_put_contents($to_save, $_POST['filecontent'])){\n\t\t\t\t\t\t$output = 'The file has been saved, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$output = 'Error saving the file, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\n\t\t\t\t\tmfcms::delete_cache();\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Page editor\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This actions moves the specified file\n\t\t\tcase \"domovefile\":\n\t\t\t\tif((isset($_GET['oldfile'])) && (isset($_GET['newfile']))){\n\t\t\t\t\tself::sanitize($_GET['oldfile']);\n\t\t\t\t\tself::sanitize($_GET['newfile']);\n\t\t\t\t\t$destination = pathjoin(CONTENT_DIR,$_GET['newfile']);\n\t\t\t\t\tif(preg_match('/.php$/',$_GET['newfile'])){//Prevent php file creation\n\t\t\t\t\t\t$output = 'You can not create php files, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else if(file_exists($destination)){//Dont move file that exists ...\n\t\t\t\t\t\t$output = 'The destination file already exists, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\trename (pathjoin(CONTENT_DIR,$_GET['oldfile']),$destination);\n\t\t\t\t\t\t$output = 'The file has been moved, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\n\t\t\t\t\tmfcms::delete_cache();\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to move, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Move file\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action deletes the file\n\t\t\tcase \"dodeletefile\":\n\t\t\t\tif((isset($_GET['file'])) and ($_GET['file'] != '')){\n\t\t\t\t\t$to_delete = pathjoin(CONTENT_DIR,$_GET['file']);\n\t\t\t\t\tself::sanitize($_GET['file']);\n\t\t\t\t\tif(is_file($to_delete)){//We use a different command to delete a file or a directory\n\t\t\t\t\t\tunlink($to_delete);\n\t\t\t\t\t}else if(is_dir($to_delete)){\n\t\t\t\t\t\trrmdir($to_delete);\n\t\t\t\t\t}\n\t\t\t\t\t$output = 'The file has been deleted, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\tmfcms::delete_cache();\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to delete, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"DELETE FILE\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action copy a file \n\t\t\tcase \"docopyfile\":\n\t\t\t\tif((isset($_GET['oldfile'])) && (isset($_GET['newfile']))){\n\t\t\t\t\tself::sanitize($_GET['oldfile']);\n\t\t\t\t\tself::sanitize($_GET['newfile']);\n\t\t\t\t\t$to_copy = pathjoin(CONTENT_DIR,$_GET['oldfile']);\n\t\t\t\t\t$destination = pathjoin(CONTENT_DIR,$_GET['newfile']);\n\t\t\t\t\tif(preg_match('/.php$/',$_GET['newfile'])){//Prevent php file creation\n\t\t\t\t\t\t$output = 'You can not create php files, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else if(file_exists($destination)){\n\t\t\t\t\t\t$output = 'The destination file already exists, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_file($to_copy)){//Different function to copy file and directory\n\t\t\t\t\t\t\tcopy($to_copy,$destination);\n\t\t\t\t\t\t}else if(is_dir($to_copy)){\n\t\t\t\t\t\t\trecurse_copy($to_copy,$destination);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$output = 'The file has been copied, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\t\n\t\t\t\t\tmfcms::delete_cache();\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified to copy, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"Copy file\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action creates a new file\n\t\t\tcase \"newfile\":\n\t\t\t\tif((isset($_POST['file'])) and ($_POST['file'] != '')){\n\t\t\t\t\tself::sanitize($_POST['file']);\n\t\t\t\t\t$destination = pathjoin(pathjoin(CONTENT_DIR,$_POST['parent']),$_POST['file']);\n\t\t\t\t\tif(preg_match('/.php$/',$_POST['file'])){\n\t\t\t\t\t\t$output = 'You can not create php files, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else if(file_exists($destination)){\n\t\t\t\t\t\t$output = 'The destination file already exists, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfile_put_contents($destination,'');\n\t\t\t\t\t\t$output = 'The file has been created, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified file to create, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"New file\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action creates a new directory\n\t\t\tcase \"newdir\":\n\t\t\t\tif((isset($_POST['file'])) and ($_POST['file'] != '')){\n\t\t\t\t\t$destination = pathjoin(pathjoin(CONTENT_DIR,$_POST['parent']),$_POST['file']);\n\t\t\t\t\tif(file_exists($destination)){\n\t\t\t\t\t\t$output = 'The destination file already exists, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tself::sanitize($_POST['file']);\n\t\t\t\t\t\tmkdir($destination, 0777, true);\n\t\t\t\t\t\t$output = 'The directory has been created, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'No file specified file to create, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"New directory\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t//This action receives an uploaded file\n\t\t\tcase \"receivefile\":\n\t\t\t\tif(isset($_FILES['file'])){\n\t\t\t\t\t$destfile = $_FILES['file']['name'];\n\t\t\t\t\tif(preg_match('/.php$/',$destfile)){\n\t\t\t\t\t\t$destfile = $destfile.'.sane';\n\t\t\t\t\t}\n\t\t\t\t\twhile(file_exists(pathjoin(pathjoin(CONTENT_DIR,$_POST['parent']),$destfile))){\n\t\t\t\t\t\t$farr = explode('.', $destfile);\n\t\t\t\t\t\t$farr[0] = $farr[0].'.2';\n\t\t\t\t\t\t$destfile = implode('.', $farr);\n\t\t\t\t\t}\n\t\t\t\t\tself::sanitize($destfile);\n\t\t\t\t\tself::sanitize($_POST['parent']);\n\t\t\t\t\tmove_uploaded_file($_FILES['file']['tmp_name'],pathjoin(pathjoin(CONTENT_DIR,$_POST['parent']),$destfile));\n\t\t\t\t\t$output = 'File uploaded, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t\tmfcms::delete_cache();\n\t\t\t\t}else{\n\t\t\t\t\t$output = 'You have not sent a file, click <a href=\"'.self::get_return_url().'\">here</a> to go back.';\n\t\t\t\t}\n\t\t\t\treturn Array(\n\t\t\t\t\t\"content\" => $output,\n\t\t\t\t\t\"params\" => Array(\n\t\t\t\t\t\t\"title\" => \"File uploader\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t//deletes the cache\n\tpublic static function delete_cache(){\n\t\tunlink(pathjoin(ROOT_DIR,'menu_cache.htmx'));\n\t}\n\t//This generate and return a new valid token\n\tpublic static function generate_token(){\n\t\t$token = md5(uniqid(rand(), true));\n\t\tif(file_exists(TOKEN_FILE)){\n\t\t\tfile_put_contents(TOKEN_FILE,file_get_contents(TOKEN_FILE).PHP_EOL.$token);\n\t\t}else{\n\t\t\tfile_put_contents(TOKEN_FILE,self::$exitheader.$token);\n\t\t}\n\t\treturn $token;\n\t}\n\t//This uses a token, returns false if we use an invalid token\n\tpublic static function use_token($token){\n\t\t$tokens = file(TOKEN_FILE);\n\t\t$tokenIsValid = false;\n\t\t$toSave = trim(array_shift($tokens));//Remove the dead line\n\t\tforeach($tokens as $key => $value){\n\t\t\tif($token == trim($value)){\n\t\t\t\t$tokenIsValid = true;\n\t\t\t}else{\n\t\t\t\t$toSave .= PHP_EOL.trim($value);\n\t\t\t}\n\t\t}\n\t\tfile_put_contents(TOKEN_FILE,$toSave);\n\t\treturn $tokenIsValid;\n\t}\n\t//Gets the content of the page\n\tpublic static function get_page_content(){\n\t\treturn self::$content;\n\t}\n\t//This function returns the given parameters if it exists or false if it does not exists\n\tpublic static function get_params($par){\n\t\tif (isset(self::$params[$par])){\n\t\t\treturn self::$params[$par];\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t//Gets the content of the menu\n\tpublic static function get_menu_content(){\n\t\treturn self::$menu;\n\t}\n\t//Gets the content of the footer\n\tpublic static function get_footer(){\n\t\treturn self::$footer;\n\t}\n}", "public function getMetaFilterSeparator()\n {\n return ' | ';\n }", "function hys_output_filter($content) {\n\t\t//change \"&#8230;\" dotted lines back to expected \"...\" lines\n\t\t$content = str_replace('&#8230;','...',$content);\n\t\t//\n\t\treturn $content;\n\t}", "function filters()\n {\n }", "public function testInlineJsOutput() {\n\t\t$this->_manager->addInlineJs( \"alert('hello')\" );\n\t\t$this->_manager->addInlineJs( \"console.log('hello')\" );\n\n\t\t$this->_manager->outputInlineJs();\n\n\t\t$nonces = $this->_manager->getNonces( 'script' );\n\n\t\t$this->assertNotEmpty( $nonces );\n\t\t$this->assertCount( 2, $nonces );\n\t}", "public function ensureNewline() {\n\t\tif ( $this->minifiedOutput !== '' && substr( $this->minifiedOutput, -1 ) !== \"\\n\" ) {\n\t\t\t$this->addOutput( \"\\n\" );\n\t\t}\n\t\treturn $this;\n\t}", "public function viewHelperDoesNotModifyTextWithoutLineBreaks() {\n\t\t$viewHelper = $this->getMock('Tx_ViewHelpers_ViewHelpers_JsStringViewHelper', array('renderChildren'));\n\t\t$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Text without line breaks'));\n\t\t$actualResult = $viewHelper->render();\n\t\t$this->assertEquals('Some Text without line breaks', $actualResult);\n\t}", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "function green_prepare_custom_styles() {\n\t\t$css = apply_filters('green_filter_add_styles_inline', green_get_custom_styles());\n\t\t// Minify css string\n\t\t//$css = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $css);\n\t\t$css = green_minify_css($css);\n\t\treturn $css;\n\t}", "public function filter()\n {\n return array(\n 'name' => array(\n 'required' => true,\n 'filters' => array(\n array(\n 'name' => 'Zend\\Filter\\StringTrim'\n )\n )\n )\n );\n }" ]
[ "0.74327177", "0.7326299", "0.7054116", "0.60781616", "0.5949698", "0.585998", "0.5847779", "0.5744903", "0.5610492", "0.5591334", "0.5550279", "0.5465739", "0.54464686", "0.5389839", "0.53596574", "0.53576094", "0.533464", "0.53345245", "0.53336084", "0.5284694", "0.52559805", "0.5234801", "0.5216555", "0.52051044", "0.5204902", "0.51912886", "0.5183492", "0.5176836", "0.5153634", "0.5152034", "0.5144553", "0.5117495", "0.5107448", "0.51058203", "0.51007026", "0.50991106", "0.5041649", "0.501681", "0.5012899", "0.5002098", "0.5002098", "0.5002098", "0.49970934", "0.49869347", "0.49577558", "0.4953526", "0.49432877", "0.4930171", "0.4928643", "0.49274957", "0.4923473", "0.49218228", "0.49178028", "0.49100915", "0.48984987", "0.4891823", "0.48865676", "0.48807615", "0.48788443", "0.4877115", "0.4870915", "0.48603088", "0.4852036", "0.48514897", "0.48389658", "0.4838405", "0.4836541", "0.48304698", "0.4827994", "0.48273724", "0.48263615", "0.48028865", "0.4801333", "0.48003924", "0.4795052", "0.47816935", "0.47815496", "0.47707334", "0.4750084", "0.47480798", "0.4735402", "0.47345537", "0.47272682", "0.47243533", "0.47164127", "0.4715589", "0.47117826", "0.47073898", "0.47059122", "0.46994293", "0.46912983", "0.46798486", "0.4677722", "0.46773675", "0.46758515", "0.46745226", "0.46741343", "0.46729493", "0.4669891", "0.46668723" ]
0.82815295
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() empty
Тесты Phalcon\Assets\Filters\Jsmin :: filter() пустой
public function assetsFiltersJsminFilterEmpty(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - empty'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $I->assertIsEmpty( $jsmin->filter('') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "public function testFilterCssminEmptyString()\n {\n $this->specify(\n \"The cssmin filter with empty parameter does not return empty back\",\n function () {\n $cssmin = new Cssmin();\n\n expect($cssmin->filter(''))->isEmpty();\n }\n );\n }", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "function filter() {\r\n return null;\r\n }", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "public function filterEmptyItems();", "public function assetsFiltersJsminFilterComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('/** this is a comment */')\n );\n }", "public function filter();", "public function disableCompressJavascript() {}", "public function assetsInlineJsConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter set');\n\n $asset = new Js('<script>alert(\"Hello\");</script>', false);\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "function filters()\n {\n }", "public function get_filters() {\t\t\n\t\treturn false;\n\t}", "public function filters();", "public function filter()\n {\n \n }", "function CheckFilter() {}", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function ShouldCompressJavascript(){\n\t\treturn MagratheaConfig::Instance()->GetConfigFromDefault(\"compress_js\");\n\t}", "function is_filtered()\n {\n }", "public function getFilterRequired()\n {\n return null;\n }", "public function filters()\n {\n }", "public function filters() \n\t{\n\t\treturn array();\n\t}", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters()\n {\n //\n }", "public function filters() \n {\n return array();\n }", "function optimizejs()\n\t{\n\t\t$_body = JResponse::getBody();\n\t\t$_body = explode(\"</head>\", $_body, 2);\n\t\t// Replace CSS library\n\t\t$avoid = $this->gzip_js_exclude;\n\t\t$avoid = ($avoid != '') ? (is_array($avoid) ? $avoid : array($avoid)) : array();\n\t\t\n\t\tif(is_array($avoid)) {\n\t\t\t$avoid = array_merge($avoid, $this->getExcludeJSByCondition($_body[0]));\n\t\t}\n\t\t\n\t\t$_body[0] \t= $this->replaceWithLibrary($_body[0], \"js\", $avoid, $this->merge);\n\t\t$_body \t\t= $_body[0].\"</head>\".$_body[1];\n\t\t\n\t\tif($_body) {\n\t\t\tJResponse::setBody($_body);\n\t\t}\n\t\treturn true;\n\t}", "function doing_filter($filter = \\null)\n{\n}", "public function cleanFilters(): void\n {\n foreach ($this->filters as $filter => $value) {\n if (is_array($value)) {\n $this->filters[$filter] = array_filter($value, function ($item) { return $item; });\n\n if (empty($this->filters[$filter])) {\n unset($this->filters[$filter]);\n }\n }\n\n if ($value === null || $value === '') {\n unset($this->filters[$filter]);\n }\n }\n }", "public function getPluginFilters(){\n\t\t\treturn \"/[^\\\\.]/\";\n\t\t}", "public function enableCompressJavascript() {}", "public function filters()\n {\n return [];\n }", "public function filters()\n {\n return [];\n }", "public function filters()\n {\n return [];\n }", "function tecscan_js_nojs_script() {\n\t?>\n\t<script>\n\t\t//<![CDATA[\n\t\t( function() {\n\t\t\tvar c = document.body.classList;\n\t\t\tc.remove( 'no-js' );\n\t\t\tc.add( 'js' );\n\t\t} )();\n\t\t//]]>\n\t</script>\n\t<?php\n}", "public function clearFilters();", "public function isOnlyJs() {\n\t\treturn $this->getOnlyJs();\n\t}", "function search_form_no_filters() {\n $search_form_template = locate_template( 'searchform.php' );\n if ( '' !== $search_form_template ) {\n // searchform.php exists, remove all filters\n remove_all_filters('get_search_form');\n }\n}", "function genesis_sample_js_nojs_script() {\n\n\tif ( genesis_is_amp() ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<script>\n\t//<![CDATA[\n\t(function(){\n\t\tvar c = document.body.classList;\n\t\tc.remove( 'no-js' );\n\t\tc.add( 'js' );\n\t})();\n\t//]]>\n\t</script>\n\t<?php\n}", "public function applyFilter();", "public function has_filters()\n {\n }", "public function getCompressJavascript() {}", "function beforeFilter() {\n\t}", "function filter_strip_all_tags() {\n return [\n 'filter' => FILTER_CALLBACK,\n 'options' => '\\wp_strip_all_tags',\n ];\n}", "public function getFilter ();", "function _filterArrayEmpty($input)\n{\n return array_filter($input, '_notEmpty');\n}", "public function getFilterEmptyParams(): bool\n {\n return $this->filterEmptyParams;\n }", "function beforeFilter() {\n\n }", "public function filters() {\n return array();\n }", "public function render_js()\n {\n return FALSE;\n }", "private function remove_filters()\n\t{\n\t\t// remove_filter('filter_name', 'function_name', 'priority); !\n\n\t}", "public function disableConcatenateJavascript() {}", "function ssc_remove_anonymous_object_filter( $tag, $class, $method )\n{\n if (!isset($GLOBALS['wp_filter'][ $tag ]) || empty($GLOBALS['wp_filter'][ $tag ]))\n return;\n \n foreach ( $GLOBALS['wp_filter'][ $tag ] as $priority => $filter )\n {\n foreach ( $filter as $identifier => $function )\n {\n if ( is_array( $function)\n and is_a( $function['function'][0], $class )\n and $method === $function['function'][1]\n )\n {\n\n remove_filter(\n $tag,\n array ( $function['function'][0], $method ),\n $priority\n );\n return array($tag,array ( $function['function'][0], $method ),$priority);\n }\n }\n }\n\n return false;\n}", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "public function filter()\n {\n return array();\n }", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }", "public function initFilter() {\n\t}", "public function initFilter() {\n\t}", "public function remove_filters()\n\t{\n\t\t$this->_filters = array();\n\t}", "function minify_js($js)\n{\n $minifier = new Minify\\JS($js);\n return $minifier->minify();\n}", "public function filter()\n {\n return array(\n 'name' => array(\n 'required' => true,\n 'filters' => array(\n array(\n 'name' => 'Zend\\Filter\\StringTrim'\n )\n )\n )\n );\n }", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "public function filters()\n {\n return array(\n );\n }", "public function getDefaultFilters()\n {\n return [];\n }", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('cars.component_controller_admincp_filter_index_clean')) ? eval($sPlugin) : false);\n\t}", "function no_texturized_shortcodes_filter( $shortcodes ) {\n\t\t$shortcodes[] = 'code';\n\t\t$shortcodes[] = 'precode';\n\t\treturn $shortcodes;\n\t}", "function filter_blank($var) \n{\n return !(empty($var) || is_null($var));\n}", "function acf_allow_unfiltered_html() {}", "protected function before_filter()\n {\n if (Input::isAjax()) {\n View::template(null);\n }\n }", "function LoadDefaultFilters() {}", "function canFilter(){\n\t\t\treturn TRUE;\n\t\t}", "private function excludeScripts()\n {\n\n Yii::app()->clientScript->scriptMap['*.js'] = false;\n }", "public function filter(): array;", "public function buildFilters();", "abstract public function filters(): array;", "function get_sql_filter($data) {\n // No processing here\n return null;\n }", "function filterEmpties() {\n\t\n\t$args = func_get_args();\n\t$tmp = array();\n\tforeach ($args as $arg) {\n\t if (!isempty($arg)) {\n\t $tmp[] = $arg;\n\t }\n \t}\n \treturn $tmp;\n\t\n}", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "function filter_files($files) {\n return array_filter($files, function($file) {\n return !is_hidden($file)\n && substr($file, -4) != '.php'; # PHP scripts\n });\n }", "protected function doCompressJavaScript() {}", "protected function matchIsEmpty()\n {\n $this->query->where(\"({$this->jsonFieldName}='' OR {$this->jsonFieldName} IS NULL)\");\n }", "public function filter(Asset $asset);", "function minifyJS($js,$simple=true) {\n if($simple)\n {\n return(minifyWhitespace($js));\n }\n else\n {\n return JSMin::minify($js); //requires php5 +\n }\n }", "function phorum_mod_disable_bundled_jquery_filter($javascript)\n{\n // with a reference to the already loaded jQuery library.\n $javascript = preg_replace(\n '/^\\s*var\\s+\\$PJ\\s*=.*$/m',\n \"if (Phorum === undefined) Phorum = { };\\n\" . // available in 5.3\n \"var \\$PJ = Phorum.jQuery = jQuery;\\n\",\n $javascript\n );\n\n return $javascript;\n}", "public function removeFilters() {\n\t\t$this->_filters = array();\n\t}", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter();", "protected function jsPipeline()\n\t{\n\t\t// If a custom minifier has been set use it, otherwise fallback to default\n\t\t$minifier = (isset($this->js_minifier)) ? $this->js_minifier : function ($buffer) {\n\t\t\treturn \\JSMin::minify($buffer);\n\t\t};\n\n\t\treturn $this->pipeline($this->js, '.js', $this->js_dir, $minifier);\n\t}", "public function testNull()\n {\n $string = null;\n $this->assertSame('', $this->_filter1->filter($string));\n }", "public function CleanFilter(){\n\t\t$this->_objectFilter = new Reto_Model_Reto();\n\t}", "public static function get_filters()\n {\n }", "private function _jsmin($data)\n\t{\n\t\trequire_once('JSMin.php');\n\n\t\treturn JSMin::minify($data);\n\t}", "public function getFilters()\n {\n return array(\n 'product_img_url' => new Twig_Filter_Function('ombi60ProductImgUrl'),\n\t 'money_with_currency' => new Twig_Filter_Function('ombi60MoneyWithCurrency'),\n\t 'money' => new Twig_Filter_Function('ombi60Money'),\n\t 'asset_url' => new Twig_Filter_Function('ombi60AssetUrl'),\n\t 'img_tag' => new Twig_Filter_Function('ombi60ImgTag'),\n\t 'script_tag' => new Twig_Filter_Function('ombi60ScriptTag'),\n\t 'css_tag' => new Twig_Filter_Function('ombi60CssTag'),\n\t 'link_to' => new Twig_Filter_Function('ombi60LinkTo'),\n\t 'camelize' => new Twig_Filter_Function('ombi60Camelize'),\n\t 'handleize' => new Twig_Filter_Function('ombi60Handle'),\n\t 'implode' => new Twig_Filter_Function('ombi60Implode'),\n\t 'pluralize' => new Twig_Filter_Function('ombi60Pluralize'),\n\t 'truncate' => new Twig_Filter_Function('ombi60TruncateString'),\n\t 'truncatewords' => new Twig_Filter_Function('ombi60TruncateWords'),\n\t 'weight_with_unit' => new Twig_Filter_Function('ombi60WeightWithUnit'),\n\t 'strip_newlines' => new Twig_Filter_Function('ombi60StripNewlines'),\n\t 'strip_html' => new Twig_Filter_Function('ombi60StripHtml'),\n\t 'json' => new Twig_Filter_Function('json_encode'), // this is for converting data for use in JS see http://wiki.shopify.com/Json\n\t 'within' => new Twig_Filter_Function('ombi60PutProductUrlWithinCollection'),\n\t 'snippets_url' => new Twig_Filter_Function('ombi60SnippetsUrl'),\n );\n }", "public function getFilterIn()\n {\n return null;\n }" ]
[ "0.7090656", "0.67407024", "0.6722961", "0.63161993", "0.6281274", "0.6234954", "0.6229798", "0.62014043", "0.61767507", "0.59970194", "0.5989523", "0.5987236", "0.5932329", "0.5904109", "0.58550125", "0.5833482", "0.57782024", "0.57665884", "0.5722839", "0.57037663", "0.5685089", "0.566155", "0.5632766", "0.56283826", "0.56191", "0.56191", "0.5575814", "0.5571781", "0.5567877", "0.5562059", "0.5543875", "0.55350417", "0.55214566", "0.55123067", "0.55123067", "0.55123067", "0.54803085", "0.545607", "0.54485434", "0.5421489", "0.5421262", "0.5403992", "0.540309", "0.54018646", "0.53967845", "0.53910685", "0.538246", "0.5376545", "0.53482884", "0.5348019", "0.53473186", "0.53416073", "0.534117", "0.5340888", "0.5324982", "0.53219557", "0.5317772", "0.5317772", "0.5314699", "0.5310063", "0.53062654", "0.53062654", "0.5306089", "0.5306024", "0.5304184", "0.53037703", "0.530041", "0.5287686", "0.5285545", "0.5280165", "0.52743745", "0.527003", "0.5264043", "0.52563983", "0.5254596", "0.5246642", "0.52460986", "0.5241494", "0.5237772", "0.5232012", "0.5221112", "0.52192473", "0.52123266", "0.52104336", "0.5195206", "0.5186874", "0.5186104", "0.5186083", "0.5185966", "0.51843643", "0.51843643", "0.51843643", "0.51843643", "0.5181465", "0.5172952", "0.51724976", "0.5157162", "0.5154539", "0.5148041", "0.514081" ]
0.8139929
0
Tests Phalcon\Assets\Filters\Jsmin :: filter() comment
Тесты комментария Phalcon\Assets\Filters\Jsmin :: filter()
public function assetsFiltersJsminFilterComment(UnitTester $I) { $I->wantToTest('Assets\Filters\Jsmin - filter() - comment'); $I->skipTest('Need Phalcon implementation'); $jsmin = new Jsmin(); $I->assertIsEmpty( $jsmin->filter('/** this is a comment */') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "public function assetsFiltersJsminFilterEmpty(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - empty');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $I->assertIsEmpty(\n $jsmin->filter('')\n );\n }", "public function getFilterJs()\r\n\t{\r\n\t\tif (is_null($this->filterJs))\r\n\t\t{\r\n\t\t\t$this->getFilters();\r\n\t\t}\r\n\r\n\t\treturn $this->filterJs;\r\n\t}", "public function assetsFiltersJsminFilterTabsComment(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs comment');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"/** this is a comment */ if ( a == b ) { document . writeln('\\t') ; /** this is a comment */ }\"\n );\n\n $I->assertEquals(\n \"\\nif(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "private function minifyJS() {\n\t\t$data = $this->JShrink($this->data);\n\t\t$this->setMinifiedData($data);\n\t}", "public function getCompressJavascript() {}", "public function assetsFiltersJsminFilterTabsCommentNewlines(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs newlines');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $expected = \"\\n\" . 'a=100;';\n $actual = $jsmin->filter(\"\\t\\ta\\t\\r\\n= \\n \\r\\n100;\\t\");\n $I->assertEquals($expected, $actual);\n }", "public function assetsInlineJsConstructFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter');\n\n $asset = new Js('<script>alert(\"Hello\");</script>');\n $actual = $asset->getFilter();\n $I->assertTrue($actual);\n }", "public function assetsInlineJsConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Inline\\Js - __construct() - filter set');\n\n $asset = new Js('<script>alert(\"Hello\");</script>', false);\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "function filters()\n {\n }", "function _minify_js($input) {\n return preg_replace(\n array(\n // Remove inline comment(s) [^1]\n '#\\s*\\/\\/.*$#m',\n // Remove white-space(s) around punctuation(s) [^2]\n '#\\s*([!%&*\\(\\)\\-=+\\[\\]\\{\\}|;:,.<>?\\/])\\s*#',\n // Remove the last semi-colon and comma [^3]\n '#[;,]([\\]\\}])#',\n // Replace `true` with `!0` and `false` with `!1` [^4]\n '#\\btrue\\b#', '#\\bfalse\\b#', '#\\breturn\\s+#'\n ),\n array(\n // [^1]\n \"\",\n // [^2]\n '$1',\n // [^3]\n '$1',\n // [^4]\n '!0', '!1', 'return '\n ),\n $input);\n}", "public function enableCompressJavascript() {}", "public function filters()\n {\n }", "function CheckFilter() {}", "public function disableCompressJavascript() {}", "public function filters();", "public function filters()\n {\n //\n }", "protected function doCompressJavaScript() {}", "function minify_js($js)\n{\n $minifier = new Minify\\JS($js);\n return $minifier->minify();\n}", "public function filter();", "public function filter()\n {\n \n }", "function optimizejs()\n\t{\n\t\t$_body = JResponse::getBody();\n\t\t$_body = explode(\"</head>\", $_body, 2);\n\t\t// Replace CSS library\n\t\t$avoid = $this->gzip_js_exclude;\n\t\t$avoid = ($avoid != '') ? (is_array($avoid) ? $avoid : array($avoid)) : array();\n\t\t\n\t\tif(is_array($avoid)) {\n\t\t\t$avoid = array_merge($avoid, $this->getExcludeJSByCondition($_body[0]));\n\t\t}\n\t\t\n\t\t$_body[0] \t= $this->replaceWithLibrary($_body[0], \"js\", $avoid, $this->merge);\n\t\t$_body \t\t= $_body[0].\"</head>\".$_body[1];\n\t\t\n\t\tif($_body) {\n\t\t\tJResponse::setBody($_body);\n\t\t}\n\t\treturn true;\n\t}", "public function _add_report_filter_js()\n\t{\n\t\t\t$view = new View('adminmap/report_filter_js');\n\t\t\t$view->selected_categories = implode(\",\", $this->_get_categories());\n\t\t\t$view->render(true);\n\t}", "public function getPluginFilters(){\n\t\t\treturn \"/[^\\\\.]/\";\n\t\t}", "function minifyJS($js,$simple=true) {\n if($simple)\n {\n return(minifyWhitespace($js));\n }\n else\n {\n return JSMin::minify($js); //requires php5 +\n }\n }", "public function getFilter ();", "public function ShouldCompressJavascript(){\n\t\treturn MagratheaConfig::Instance()->GetConfigFromDefault(\"compress_js\");\n\t}", "function add_filters()\n {\n }", "function is_filtered()\n {\n }", "function filter_method_name() {\n\t // TODO:\tDefine your filter method here\n\t}", "public function filter($filter)\n {\n }", "protected function jsPipeline()\n\t{\n\t\t// If a custom minifier has been set use it, otherwise fallback to default\n\t\t$minifier = (isset($this->js_minifier)) ? $this->js_minifier : function ($buffer) {\n\t\t\treturn \\JSMin::minify($buffer);\n\t\t};\n\n\t\treturn $this->pipeline($this->js, '.js', $this->js_dir, $minifier);\n\t}", "public function filter(Asset $asset);", "function beforeFilter() {\n\n }", "public static function filterJS($str){\n $pattern = array('#<script([^>]*)>#i','#</script([^>]*)>#i');\n $replacement = array('<pre>&lt;script\\\\1&gt;','&lt;/script\\\\1&gt;</pre>');\n $subject = $str;\n return preg_replace($pattern,$replacement,$subject);\n }", "public function js()\n {\n }", "function beforeFilter() {\n\t}", "public function getFilterCode() {}", "public function applyFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter();", "function twig_raw_filter($string) {}", "function current_filter()\n{\n}", "function filter() {\r\n return null;\r\n }", "function minifyJS($arra){\n\t\tminify_js_data($arra, 'https://javascript-minifier.com/raw');\n\t}", "function template_prefilter_jstrip($tpl_source, &$template_object)\r\n{\r\n\treturn preg_replace_callback(\"/\\{jstrip\\}(.*?)\\{\\/jstrip\\}/s\",\"template_prefilter_jstrip_cb\", $tpl_source);\r\n}", "function doing_filter($filter = \\null)\n{\n}", "private function _jsmin($data)\n\t{\n\t\trequire_once('JSMin.php');\n\n\t\treturn JSMin::minify($data);\n\t}", "public function getFilters()\n\t{\n\t\treturn array('minimee' => new \\Twig_Filter_Method($this, 'minimeeFilter'));\n\t}", "public function testFilterCssminEmptyString()\n {\n $this->specify(\n \"The cssmin filter with empty parameter does not return empty back\",\n function () {\n $cssmin = new Cssmin();\n\n expect($cssmin->filter(''))->isEmpty();\n }\n );\n }", "function bmab_add_filter_prefilter($content)\n{\n $pattern = '#</ul>\\s*<div class=\\'noFilter\\'>#ms';\n $replacement = '\n <li id=\"filter_added_by\" {if !isset($filter.added_by)}style=\"display:none\"{/if}>\n <a href=\"#\" class=\"removeFilter\" title=\"remove this filter\"><span>[x]</span></a>\n <input type=\"checkbox\" name=\"filter_added_by_use\" class=\"useFilterCheckbox\" {if isset($filter.added_by)}checked=\"checked\"{/if}>\n <p>{\\'Added by %s\\'|@translate|sprintf:\"\"}</p>\n <select name=\"filter_added_by\" size=\"1\">\n {html_options options=$added_by_options selected=$added_by_selected}\n </select>\n </li>\n </ul>\n\n <div class=\"noFilter\">';\n $content = preg_replace($pattern, $replacement, $content);\n\n // then we add the \"Added by\" in the filter selector\n $pattern = '#</div>\\s*<a id=\"removeFilters\"#ms';\n $replacement = '\n <a data-value=\"filter_added_by\" {if isset($filter.added_by)}disabled=\"disabled\"{/if}>{\\'Added by %s\\'|@translate|sprintf:\"\"}</a>\n </div>\n <a id=\"removeFilters\"';\n $content = preg_replace($pattern, $replacement, $content);\n\n // add specific CSS instructions\n $pattern = '#{footer_script}#';\n $replacement = '{combine_css path=\"plugins/batch_manager_added_by/batch_manager.css\"}\n{*\n{if $themeconf.id eq \"roma\"}{combine_css path=\"plugins/batch_manager_added_by/batch_manager_roma.css\"}{/if}\n*}\n\n{footer_script}';\n $content = preg_replace($pattern, $replacement, $content);\n\n return $content;\n}", "public function filters() \n {\n return array();\n }", "public function filter_method_name() {\n // @TODO: Define your filter hook callback here\n }", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "public function getFilters()\n {\n return 'spout';\n }", "public function export_filter(){\n }", "public function assetsManagerOutputCssFilterChainCustomFilterWithCssmin(UnitTester $I)\n {\n $I->wantToTest(\n 'Assets\\Manager - outputCss() - filter chain custom filter with cssmin'\n );\n\n $fileName = $I->getNewFileName('assets_', 'css');\n $fileName = outputDir('tests/assets/' . $fileName);\n $cssFile = dataDir('assets/assets/1198.css');\n $manager = new Manager(new TagFactory(new Escaper()));\n\n $manager->useImplicitOutput(false);\n\n $css = $manager->collection('css');\n\n $css\n ->setTargetPath($fileName)\n ->addCss($cssFile)\n ->addFilter(new UppercaseFilter())\n ->addFilter(new TrimFilter())\n ->join(true)\n ;\n\n $manager->outputCss('css');\n\n $I->openFile($fileName);\n\n $I->seeFileContentsEqual(\n 'A{TEXT-DECORATION:NONE;}B{FONT-WEIGHT:BOLD;}'\n );\n\n $I->safeDeleteFile($fileName);\n }", "public function filters() \n\t{\n\t\treturn array();\n\t}", "public function getFilters()\n {\n return array(\n 'strr' => new \\Twig_Filter_Method($this, 'stringReplace', array('needs_environment' => true)),\n );\n }", "public function get_filters() {\t\t\n\t\treturn false;\n\t}", "public function filters()\n {\n return [\n 'name' => 'trim',\n ];\n }", "public function getJavascriptIncludes() {}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filters()\n\t{\n\t\treturn array();\n\t}", "public function filter($code);", "function toCode()\n {\n $code = \"# Sieve Filter\\n# \"\n . _(\"Generated by Ingo (http://www.horde.org/ingo/)\") . ' ('\n . trim(strftime($this->_params['date_format'] . ', ' . $this->_params['time_format']))\n . \")\\n\\n\";\n $code = $this->encode($code);\n $requires = $this->requires();\n\n if (count($requires) > 1) {\n $stringlist = '';\n foreach ($this->requires() as $require) {\n $stringlist .= (empty($stringlist)) ? '\"' : ', \"';\n $stringlist .= $require . '\"';\n }\n $code .= 'require [' . $stringlist . '];' . \"\\n\\n\";\n } elseif (count($requires) == 1) {\n foreach ($this->requires() as $require) {\n $code .= 'require \"' . $require . '\";' . \"\\n\\n\";\n }\n }\n\n foreach ($this->_blocks as $block) {\n $code .= $block->toCode() . \"\\n\";\n }\n\n return rtrim($code) . \"\\n\";\n }", "public function filter($content){ }", "private function get_filter() {\n\t\treturn $this->definition['filter'];\n\t}", "function phorum_mod_disable_bundled_jquery_filter($javascript)\n{\n // with a reference to the already loaded jQuery library.\n $javascript = preg_replace(\n '/^\\s*var\\s+\\$PJ\\s*=.*$/m',\n \"if (Phorum === undefined) Phorum = { };\\n\" . // available in 5.3\n \"var \\$PJ = Phorum.jQuery = jQuery;\\n\",\n $javascript\n );\n\n return $javascript;\n}", "public function get_js() {\n\t}", "function filter_for_js($str)\r\n{\r\n $str=str_replace(\"\\n\",\"\",$str);\r\n $str=str_replace(\"\\r\",\"\",$str);\r\n $str=str_replace(\"'\",\"\",$str);\r\n $str=str_replace('\"',\"\",$str);\r\n $str=htmlentities($str,ENT_QUOTES,\"utf-8\");\r\n return $str;\r\n}", "function minify_callback($buffer)\n{\n\n\n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n $buffer = preg_replace($search, $replace, $buffer);\n\n return $buffer;\n\n}", "public function initFilter() {\n\t}", "public function initFilter() {\n\t}", "public function printNeededJSFunctions() {}", "function filter(&$mag){\r\n\t\t//get content to be filtered\r\n\t\t//get list of 'things' to search for\r\n\t\t//perform some operation,\r\n\t\t\t//types: exec, replace, disabled\r\n\t\t\t//exec just evals php code in place\r\n\t\t\t//replace just performs a simple operation\t\t\t\r\n\t\t$filters = $this->Filter->findAll('Filter.active');\r\n\t\t//id/name/text/type/code/active\r\n\t\tforeach($filters as $filter){\t\t\t\r\n\t\t\t$curr = split($filter['Filter']['text'], $mag['Mag']['content']);\r\n\t\t\t\r\n\t\t\tif(count($curr)>1){\r\n\t\t\t\t//$this is expected to directly modify the mag array however it has to.\r\n\t\t\t\tif($filter['Filter']['type']==\"php\"){\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\t$out = eval($filter['Filter']['code']);\r\n\t\t\t\t\t$out .=\tob_get_contents();\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t\tif($out != \"\"){\r\n\t\t\t\t\t\t$this->log('Filter output is not clean: '.$out);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if($filter['Filter']['type'] == \"text\"){\r\n\t\t\t\t\t//simple replace, for why i dont know.\r\n\t\t\t\t\t$mag['Mag']['content'] = ereg_replace($filter['Filter']['text'],$filter['Filter']['code'],$mag['Mag']['content']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function filters()\n {\n return [\n //\n ];\n }", "public function js_includes()\n {\n }", "public function getFilters()\n {\n $options = array (\n 'needs_environment' => true,\n 'needs_context' => true,\n 'is_safe' => null,\n 'is_safe_callback' => null,\n 'pre_escape' => null,\n 'preserves_safety' => null,\n 'node_class' => 'Twig_Node_Expression_Filter',\n );\n return array (\n new Twig_SimpleFilter('z_htmlcomment', array ($this, 'zHtmlCommentFilter'), $options),\n );\n }", "function smarty_outputfilter_group_js($tpl_output, &$smarty){\n\n\trequire($_SERVER[\"DOCUMENT_ROOT\"].'/application/third_party/JavaScriptPacker.php');\n\t\n\t$cache_dir = '/cache/js';\n\t\n\t$html_output = preg_replace('/\\<!--\\/\\/(.*?)\\-->/is', '', $tpl_output);\n\tpreg_match_all('/\\<!--(.*?)\\-->/is', $tpl_output, $comment);\n\tforeach($comment[0] as $k => $v){\n\t\t$array_comment_replace[$k] = \"!@@COMMENT\".$k.\"@@!\";\n\t\t$array_comment[$k] = $v;\n\t\t\n\t\t// replace all comments\n\t\t$tpl_output = str_replace($v, \"!@@COMMENT\".$k.\"@@!\", $tpl_output);\n\t}\n\t\n\t// grab all js\n preg_match_all('/<script (src=\")(.*\\.js)(.*)/i', $tpl_output, $patterns);\n \n $url_js = array_unique($patterns[0]);\n foreach($url_js as $k => $v){\n \t/* if($k==0){\n \t\t// creat a maker on the first js\n \t\t$marker_js = \"!@@COMBINEJS@@!\";\n \t\t// set where all js will be put together || replace / for \\/ to avoid reg-exp bug\n \t\t$tpl_output = preg_replace('/'.str_replace('/', '\\/', $v).'/', $marker_js, $tpl_output, 1);\n \t\t// if have some other js like the first one, remove it\n\t\t\t$tpl_output = str_replace($v, '', $tpl_output);\n \t}\n \telse{*/\n \t\t// remove all js from source\n\t\t\t$tpl_output = str_replace($v, '', $tpl_output);\n \t/*}*/\n }\n \n $all_js = array_unique($patterns[2]);\n $lastmodified = 0;\n $body_js = '';\n foreach($all_js as $k => $v){\n\t\t$file_js = $_SERVER[\"DOCUMENT_ROOT\"].\"\".$v;\n\t\t$lastmodified = max($lastmodified, filemtime($file_js));\n \t$body_js .= file_get_contents($file_js); \n }\n \n // minify our js\n $body_js = smarty_outputfilter_group_js_minify($body_js);\n \n $group_js = implode(\",\", $all_js);\n $hash = $lastmodified.\"-\".md5($group_js);\n $cache_file = \"js-cache-\".$hash.\".js\";\n \n /* obfuscate */\n $packer = new JavaScriptPacker($body_js, 'Normal', true, false);\n $packed = $packer->pack();\n $body_js = $packed; \n \n $full_path_file = $_SERVER[\"DOCUMENT_ROOT\"].\"\".$cache_dir.\"/\".$cache_file;\n \n if(!file_exists($full_path_file)){\n\t\tif(!is_dir(dirname($full_path_file))) mkdir(dirname($full_path_file), 0775, true); \n\t\tfile_put_contents($full_path_file, $body_js);\n }\n \n\t// our new js file\n $group_js = \"<script src=\\\"\".$cache_dir.\"/\".$cache_file.\"\\\"></script>\";\n\n // give back all comments\n $tpl_output = str_replace($array_comment_replace, $array_comment, $tpl_output);\n\t\n\treturn str_replace('</body>', $group_js.\"\\n</body>\", $tpl_output); \n}", "public function addFilters() {\n\t\t$this->subscriber->addFilter( 'tiny_mce_plugins', [$this, 'disableEmojisTinymce'] );\n\t\t$this->subscriber->addFilter( 'wp_resource_hints', [$this, 'disableEmojisRemoveDnsPrefetch'], 10, 2 );\n\t\t$this->subscriber->addFilter( 'jetpack_lazy_images_blacklisted_classes', [$this, 'disableLazyLoadForLogo'] );\n\t\t$this->subscriber->addFilter( 'gform_enable_field_label_visibility_settings', '__return_true' );\n\t\t$this->subscriber->addFilter( 'fl_builder_render_assets_inline', '__return_true' );\n\t}", "function buildAppJsDebugRegex($jsConcat) {\n\n\t$out = $jsConcat;\n\n\t// get and remove first license text\n\t$search = \"|/[ \\t]*\\*\\s*#LICENSE BEGIN.*?#LICENSE END\\s*\\*/[ \\t]*|s\";\n\tpreg_match($search, $out, $matches);\n\t$license = $matches[0];\n\t$out = preg_replace($search, \"\", $out, 1);\n\n\t// remove all single line comments\n\t// this DOES NOT WORK:\n\t//$out = preg_replace(\"|\\s*//.*$|mU\", \"\", $out);\n\t// looks like php 5.3 includes line-breaks into whitespace collecting\n\t// after \"^\" and before \"$\" so try following workaround\n\t$out = preg_replace(\"|[ \\t]*//.*?$|m\", \"\", $out);\n\n\t// remove multiline comments with fitting count of line breaks\n\t$matches2 = array();\n\tpreg_match_all(\"|[ \\t]*/\\*.*?\\*/[ \\t]*|s\", $out, $matches);\n\t// preserve multiple maches only once by using as key\n\tforeach ($matches[0] as $match) {\n\t\t$matches2[$match] = $match;\n\t}\n\tforeach ($matches2 as $match) {\n\t\t$repl = preg_replace(\"/[^\\n\\r]+/\", \"\", $match);\n\t\t$match = preg_quote($match, \"|\");\n\t\t$out = preg_replace(\"|{$match}|\", $repl, $out);\n\t}\n\n\n\t$out = \"{$license}{$out}\";\n\treturn $out;\n}", "abstract public function minify($src);", "public static function add_filters()\n {\n }", "public static function add_filters()\n {\n }", "function _minify()\n{\n\trequire_once(dirname(__FILE__).'/php/minify.php');\n\trequire_once(dirname(__FILE__).'/php/cssmin.php');\n\trequire_once(dirname(__FILE__).'/php/jsmin.php');\n}", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + copy',\n ), parent::filters());\n }", "static public function _(Filter $filter)\n\t{\n $code = '\t <div class=\"box-header with-border\">\n\t\t\t <h3 class=\"box-title\">'.$filter->getTitle().'</h3>\n\t\t\t <!-- tools box -->\n\t\t\t <div class=\"pull-right box-tools\">\n\t\t\t\t<button type=\"button\" class=\"btn btn-info btn-sm\" data-widget=\"collapse\" data-toggle=\"tooltip\" title=\\'\\' data-original-title=\"Collapse\">\n\t\t\t\t <i class=\"fa fa-minus\"></i></button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-info btn-sm\" data-widget=\"remove\" data-toggle=\"tooltip\" title=\"Remove\">\n\t\t\t\t <i class=\"fa fa-times\"></i></button>\n\t\t\t </div>\t\t\t \n\t\t\t</div>';\n\n return $code;\n\t}", "function filterJadwal(){\n\t\t$res = $this->LogistikTransModel->getFilterKodeDetailKursus($_GET['q']);\n\t\techo json_encode($res);\n\t}", "public function __onFilterGeneration($param_array, &$source){\n // Generate input\n $this->__onInputGeneration($param_array, $source);\n\n // Generate value setting\n\t\t$class_name = $this->options['model'];\n\t\t$this->zajlib->compile->write('<?php $this->zajlib->variable->field->name = \"filter['.$this->name.']\"; if(!empty($_REQUEST[\\'filter\\']) && !empty($_REQUEST[\\'filter\\'][\"'.$this->name.'\"])){ $this->zajlib->variable->field->value = '.$class_name.'::fetch()->filter(\\'id\\', $_REQUEST[\\'filter\\'][\"'.$this->name.'\"]); } else { $this->zajlib->variable->field->value = '.$class_name.'::fetch()->exclude_all(); } ?>');\n\n return true;\n\t}", "public static function getFilterName()\n {\n return static::$_module.\".view.\".static::$_prefix.\".Filter\";\n }", "function compress($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (strpos($line, \"//\") !== false) $line = substr($line, 0, strpos($line, \"//\"));\r\n\t\t$line = trim($line);\r\n\t\tif ($line != \"\") $newjs[] = $line;\r\n\t}\r\n\t$jsstr = implode(\"\\t\\n\", $newjs);\r\n\t$jsstr = preg_replace(\"!\\s*/\\*.*?\\*/\\s*!s\", \"\\n\", $jsstr);\r\n\t$js = explode(\"\\t\", $jsstr);\r\n\treturn $js;\r\n}", "protected function render_filters()\n {\n }", "protected function render_filters()\n {\n }" ]
[ "0.75473887", "0.7233942", "0.6880488", "0.6743029", "0.6708593", "0.6651955", "0.66145635", "0.63271576", "0.63113356", "0.62115234", "0.61979526", "0.6124519", "0.6121975", "0.61153555", "0.6103941", "0.6049255", "0.60335475", "0.60289764", "0.6004013", "0.5997365", "0.59814274", "0.59626144", "0.5938025", "0.5935177", "0.5857507", "0.5852065", "0.58368874", "0.5793468", "0.57715577", "0.5768867", "0.57655", "0.5745577", "0.57454216", "0.5737391", "0.5716249", "0.5703917", "0.5693861", "0.5670192", "0.564389", "0.5628268", "0.559172", "0.5587458", "0.5583217", "0.5583217", "0.5583217", "0.5583217", "0.55811816", "0.5572339", "0.556552", "0.5516953", "0.55086", "0.55042225", "0.5503242", "0.54934984", "0.5489286", "0.54739964", "0.54675114", "0.546683", "0.54645324", "0.5459237", "0.54565823", "0.54495174", "0.544673", "0.54458445", "0.5438816", "0.5436079", "0.5434383", "0.54312885", "0.54312885", "0.54094964", "0.54091346", "0.5407793", "0.54051155", "0.5392583", "0.5389238", "0.5385802", "0.53844965", "0.53837466", "0.53837466", "0.5381575", "0.5380419", "0.5375272", "0.53696203", "0.5367089", "0.5364969", "0.53603184", "0.53590196", "0.53566736", "0.53559524", "0.53556347", "0.53509474", "0.53490096", "0.53490096", "0.5342761", "0.5339262", "0.53332406", "0.5322834", "0.53172356", "0.53154606", "0.53154606" ]
0.7567444
0
Handler of add_filter( 'planmyday_filter_importer_options','planmyday_instagram_feed_importer_set_options' );
Обработчик add_filter( 'planmyday_filter_importer_options','planmyday_instagram_feed_importer_set_options' );
function planmyday_instagram_feed_importer_set_options($options=array()) { if ( in_array('instagram_feed', planmyday_storage_get('required_plugins')) && planmyday_exists_instagram_feed() ) { // Add slugs to export options for this plugin $options['additional_options'][] = 'sb_instagram_settings'; } return $options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_filters()\n {\n }", "function register_filters() {\n\t\t\t// ie. add_filter($this->slug.\"/get_feeds\", array($this,\"import_user_feed\"), 1,2);\n\t\t\tadd_filter($this->slug.\"/get_feeds\", array($this,\"get_feeds\"), 1,2);\n\t\t}", "function register_filters() {\n\t\t\t// ie. add_filter($this->slug.\"/get_feeds\", array($this,\"import_user_feed\"), 1,2);\n\t\t\tadd_filter($this->slug.\"/get_feeds\", array($this,\"get_feeds\"), 1,2);\n\t\t}", "function selective_tumblr_importer_init() {\r\n\tglobal $tumblr_import;\r\n\tload_plugin_textdomain( 'tumblr-importer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\r\n\r\n\t$tumblr_import = new Selective_Tumblr_Import();\r\n\tregister_importer('selective-tumblr', __('Selective Tumblr', 'tumblr-importer'), sprintf(__('Select which posts to import from a Tumblr blog. <a href=\"%s\">View pending imports.</a>', 'tumblr-importer'), 'edit.php?post_type=import'), array ($tumblr_import, 'start'));\r\n\tif ( !defined('TUMBLR_MAX_IMPORT') )\r\n\t\tdefine ('TUMBLR_MAX_IMPORT', 20);\r\n}", "function wp_rss_multi_importer_post_to_feed() {\n\n\t$post_options = get_option( 'rss_post_options' );\n\n\tif ( empty( $post_options ) ) {\n\t\treturn;\n\t}\n\n\t// Load colorbox scripts on the front end if the option is set\n\tif (\n\t\tempty( $post_options['targetWindow'] ) &&\n\t\t( isset( $post_options['active'] ) && $post_options['active'] == 1 )\n\t) {\n\t\tadd_action( 'wp_footer', 'colorbox_scripts' );\n\t}\n\n\t// Add noindex meta tags if the option is set\n\tif ( isset( $post_options['noindex'] ) && $post_options['noindex'] == 1 ) {\n\t\tadd_action( 'wp_head', 'rssmi_noindex_function' );\n\t}\n\n\t// Add canonical link if the option is set\n\tif ( isset( $post_options['addcanonical'] ) && $post_options['addcanonical'] == 1 ) {\n\t\tremove_action( 'wp_head', 'rel_canonical' );\n\t\tadd_action( 'wp_head', 'rssmi_canonical_function' );\n\t}\n}", "function wp_rss_multi_importer_start() {\n\n\tregister_setting( 'wp_rss_multi_importer_options', 'rss_import_items' );\n\tregister_setting( 'wp_rss_multi_importer_categories', 'rss_import_categories' );\n\tregister_setting( 'wp_rss_multi_importer_item_options', 'rss_import_options' );\n\tregister_setting( 'wp_rss_multi_importer_template_item', 'rss_template_item' );\n\tregister_setting( 'wp_rss_multi_importer_feed_options', 'rss_feed_options' );\n\tregister_setting( 'wp_rss_multi_importer_post_options', 'rss_post_options' );\n\tregister_setting( 'wp_rss_multi_importer_admin_options', 'rss_admin_options' );\n\tregister_setting( 'wp_rss_multi_importer_categories_images', 'rss_import_categories_images' );\n\tregister_setting( 'wp_rss_multi_importer_global_options', 'rssmi_global_options', 'rssmi_sanitize_global' );\n\n\tadd_settings_section( 'wp_rss_multi_importer_main', '', 'wp_section_text', 'wprssimport' );\n\n\twp_enqueue_style( 'farbtastic' );\n\twp_enqueue_script( 'farbtastic' );\n\n}", "function import_export_admin_options() {\r\n\r\n\t$import_mimes = import_mimes();\r\n\t$import_accepts_attr = '';\r\n\t$import_accepts = __( 'Accepts', 'wp-google-maps' ) . ': ';\r\n\tforeach ( $import_mimes as $ext => $mime ) {\r\n\t\t$import_accepts_attr .= \"$mime,.$ext,\";\r\n\t\t$import_accepts .= \"*.$ext, \";\r\n\t}\r\n\t$import_accepts_attr = rtrim( $import_accepts_attr, ',' );\r\n\t$import_accepts = rtrim( $import_accepts, ', ' );\r\n\r\n\t$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );\r\n\t$size = size_format( $bytes );\r\n\t\r\n\t$import_files = new \\WP_Query( array( \r\n\t\t'post_type' => 'attachment',\r\n\t\t'meta_key' => '_wp_attachment_context',\r\n\t\t'meta_value' => 'wpgmaps-import',\r\n\t\t'posts_per_page' => - 1,\r\n\t) );\r\n\t\r\n\t$import_schedule = import_get_schedule();\r\n\t\r\n\t$maps_html = import_export_get_maps_list( 'export' );\r\n\t\r\n\t// Start building HTML document\r\n\t$document = new DOMDocument();\r\n\t$document->loadPHPFile(plugin_dir_path(WPGMZA_PRO_FILE) . 'html/import-export/import-export.html.php');\r\n\t\r\n\t$document->populate(array(\r\n\t\t'max_upload_size'\t\t=> $size,\r\n\t\t'import_accepts'\t\t=> $import_accepts\r\n\t));\r\n\t\r\n\t// Accepts attribute on input\r\n\tif($input = $document->querySelector('input[name=\"wpgmaps_import_file\"]'))\r\n\t\t$input->setAttribute('accept', $import_accepts_attr . ',.json');\r\n\t\r\n\t// Hide file list if no items are present\r\n\tif(($el = $document->querySelector('#wpgmaps_import_file_list')) && $import_files->found_posts < 1)\r\n\t\t$el->setInlineStyle('display', 'none');\r\n\t\r\n\t// Add import file table rows\r\n\t$table = $document->querySelector('#wpgmap_import_file_list_table');\r\n\t$template = $table->querySelector('tbody>tr');\r\n\t$container = $template->parentNode;\r\n\t$template->remove();\r\n\t\r\n\tforeach ( $import_files->posts as $import_file )\r\n\t{\r\n\t\t$tr = $template->cloneNode(true);\r\n\t\t\r\n\t\t$tr->populate($import_file);\r\n\t\t$tr->setAttribute('id', 'import-list-item-' . $import_file->ID);\r\n\t\t\r\n\t\tforeach($tr->querySelectorAll('a') as $a)\r\n\t\t\t$a->setAttribute('data-import-id', $import_file->ID);\r\n\t\t\r\n\t\t$container->appendChild($tr);\r\n\t}\r\n\t\r\n\t// Hide import schedule if no schedules are present\r\n\tif(($el = $document->querySelector('#wpgmaps_import_schedule_list')) && empty($import_schedule))\r\n\t\t$el->setInlineStyle('display', 'none');\r\n\t\r\n\t// Add import schedule table rows\r\n\t$table = $document->querySelector('#wpgmap_import_schedule_list_table');\r\n\t$template = $table->querySelector('tbody>tr');\r\n\t$container = $template->parentNode;\r\n\t$template->remove();\r\n\t\r\n\tforeach ( $import_schedule as $schedule_id => $schedule )\r\n\t{\r\n\t\t$tr = $template->cloneNode(true);\r\n\t\t\r\n\t\tif ( empty( $schedule['next_run'] ) )\r\n\t\t\t$schedule['status'] = __('No schedule found', 'wp-google-maps');\r\n\t\telse\r\n\t\t\t$schedule['status'] = __('Next schedule run', 'wp-google-maps') . ': ' . $schedule['next_run'];\r\n\t\t\r\n\t\tif ( ! empty( $schedule['last_run_message'] ) )\r\n\t\t\t$schedule['status'] .= \" \" . $schedule['last_run_message'];\r\n\t\t\r\n\t\t$tr->populate($schedule);\r\n\t\t$tr->setAttribute('id', $schedule_id);\r\n\t\t\r\n\t\tforeach($tr->querySelectorAll('a') as $a)\r\n\t\t\t$a->setAttribute('data-schedule-id', $schedule_id);\r\n\t\t\r\n\t\t$container->appendChild($tr);\r\n\t}\r\n\t\r\n\t// Import target map panel\r\n\tif($panel = $document->querySelector('#wpgmza-import-target-map-panel'))\r\n\t{\r\n\t\t$table = $panel->querySelector('.wpgmza-listing');\r\n\t\t\r\n\t\t$maps = import_export_get_maps_list( 'export' );\r\n\t\t\r\n\t\tif ( empty( $maps ) )\r\n\t\t{\r\n\t\t\t$panel->appendText(__('No maps available for export.', 'wp-google-maps'));\r\n\t\t\t$table->remove();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$panel->querySelector('tbody')->import($maps_html);\r\n\t\t}\r\n\t}\r\n\r\n\t$document = apply_filters('wpgmza_import_export_document', $document);\r\n\t\r\n\t// JPEG map select\r\n\tif($panel = $document->querySelector('#import_from_bulk_jpeg'))\r\n\t{\r\n\t\t$select = new MapSelect('map_id');\r\n\t\t$select = $document->importNode($select->querySelector('select'), true);\r\n\t\t\r\n\t\t$panel->prepend($select);\r\n\t}\r\n\t\r\n\techo $document->html;\r\n\r\n}", "function acf_enable_filters($filters = array())\n{\n}", "function seocrawler_goodlayers_core_setup(){\n\t\t\tadd_filter('gdlr_core_pagination_style', 'seocrawler_gdlr_core_pagination_style');\n\t\t\tadd_filter('gdlr_core_pagination_align', 'seocrawler_gdlr_core_pagination_align');\n\n\t\t\t// set the default social share option\n\t\t\tadd_filter('gdlr_core_social_share_list', 'seocrawler_gdlr_core_social_share_list');\n\n\t\t\t// widget title navigation\n\t\t\tadd_filter('gdlr_core_widget_title_nav', 'seocrawler_gdlr_core_widget_title_nav');\n\n\t\t\t// single portfolio\n\t\t\tadd_filter('gdlr_core_custom_post_slug', 'seocrawler_gdlr_core_custom_post_slug', 10, 2);\n\n\t\t\tadd_filter('gdlr_core_portfolio_single_nav', 'seocrawler_gdlr_core_portfolio_single_nav');\n\t\t\tadd_filter('gdlr_core_portfolio_single_nav_same_term', 'seocrawler_gdlr_core_portfolio_single_nav_same_term');\n\t\t\tadd_filter('gdlr_core_portfolio_single_related', 'seocrawler_gdlr_core_portfolio_single_related');\n\n\t\t\t// srcset\n\t\t\tadd_filter('gdlr_core_enable_srcset', 'seocrawler_gdlr_core_enable_srcset');\n\n\t\t\t// filter for portfolio icon hover\n\t\t\tadd_filter('gdlr_core_portfolio_hover_icon_class', 'seocrawler_gdlr_core_portfolio_hover_icon_class');\n\t\t\t\n\t\t\t// youtube cookies\n\t\t\tadd_filter('gdlr_core_privacy_settings', 'seocrawler_gdlr_core_privacy_settings');\n\t\t}", "public function setIncludeExcludeOptions()\r\n\t{\r\n\t\t$this->feed_options['tweet_includes'] = array();\r\n\t\t$this->feed_options['tweet_excludes'] = array();\r\n\t\t$this->feed_options['tweet_includes'] = isset( $this->atts['include'] ) ? explode( ',', str_replace( ', ', ',', $this->atts['include'] ) ) : array();\r\n\t\tif ( empty( $this->feed_options['tweet_includes'][0] ) ) {\r\n\t\t\t$this->feed_options['tweet_excludes'] = isset( $this->atts['exclude'] ) ? explode( ',', str_replace( ', ', ',', $this->atts['exclude'] ) ) : array();\r\n\t\t}\r\n\t\tif ( empty( $this->feed_options['tweet_excludes'][0] ) && empty( $this->feed_options['tweet_includes'][0] ) ) {\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_retweeter'] ) && $this->db_options['include_retweeter'] == false ? null : 'retweeter';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_avatar'] ) && $this->db_options['include_avatar'] == false ? null : 'avatar';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_author'] ) && $this->db_options['include_author'] == false ? null : 'author';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_logo'] ) && $this->db_options['include_logo'] == false ? null : 'logo';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_text'] ) && $this->db_options['include_text'] == false ? null : 'text';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_date'] ) && $this->db_options['include_date'] == false ? null : 'date';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_actions'] ) && $this->db_options['include_actions'] == false ? null : 'actions';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_twitterlink'] ) && $this->db_options['include_twitterlink'] == false ? null : 'twitterlink';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_linkbox'] ) && $this->db_options['include_linkbox'] == false ? null : 'linkbox';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_repliedto'] ) && $this->db_options['include_repliedto'] == false ? null : 'repliedto';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_media'] ) && $this->db_options['include_media'] == false ? null : 'media';\r\n\t\t\t$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_twittercards'] ) && $this->db_options['include_twittercards'] == false ? null : 'twittercards';\r\n\t\t}\r\n\t}", "public function export_filter(){\n }", "function init_options() {\n\t\t$this->options = new SF_Plugin_Options( 'socialflow', apply_filters( 'sf_init_options', $this->default_options ) );\n\t}", "function install_add_filter($format_id, $module, $delta = 0, $weight = 0) {\n install_set_filter($format_id, $module, $delta, $weight);\n}", "function gen_filter()\n\t{\n\t\tglobal $seoclerks_options;\n\t\tif(!empty($seoclerks_options['post_top']))\n\t\t{\n\t\t\tadd_filter('the_content', 'ad_before_post');\n\t\t}\n\t\tif(!empty($seoclerks_options['post_bottom']))\n\t\t{\n\t\t\tadd_filter('the_content', 'ad_after_post');\n\t\t}\n\t}", "function planmyday_woocommerce_importer_set_options($options=array()) {\n\t\tif ( in_array('woocommerce', planmyday_storage_get('required_plugins')) && planmyday_exists_woocommerce() ) {\n\t\t\tif (is_array($options['files']) && count($options['files']) > 0) {\n\t\t\t\tforeach ($options['files'] as $k => $v) {\n\t\t\t\t\t$options['files'][$k]['file_with_woocommerce'] = str_replace('name.ext', 'woocommerce.txt', $v['file_with_']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add slugs to export options for this plugin\n\t\t\t$options['additional_options'][]\t= 'shop_%';\n\t\t\t$options['additional_options'][]\t= 'woocommerce_%';\n\t\t}\n\t\treturn $options;\n\t}", "public static function init() : void {\n\t\tself::$options = get_option( 'itph_plugin_options' );\n\t\t$filter_content_cb = ['itph\\ITPH_Content_Filter', 'filter_content'];\n\n\t\tadd_filter( 'the_content', $filter_content_cb );\n\t\tadd_filter( 'get_the_content', $filter_content_cb );\n\t}", "public static function initialize() {\r\n\t\t// The filters are only useful for front-end posts/pages; exit if in the admin section\r\n\t\tif ( is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\tadd_filter( 'mla_gallery_attributes', 'PostsPerPageExample::mla_gallery_attributes', 10, 1 );\r\n\t}", "function planmyday_woocommerce_importer_show_params($importer) {\n\t\t$importer->show_importer_params(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('Import WooCommerce', 'planmyday'),\n\t\t\t'part' => 0\n\t\t\t));\n\t}", "static function add_filters(): void {\r\n\r\n\t\t// The group\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n\t\t// The fields\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_advertise']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_no_issue_cats']);\r\n\t}", "public static function add_filters()\n {\n }", "public static function add_filters()\n {\n }", "function parse_itemoptions() {\n global $itemid;\n ADMIN::_insertPluginOptions('item', $itemid);\n }", "function planmyday_woocommerce_importer_import_fields($importer) {\n\t\t$importer->show_importer_fields(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('WooCommerce meta', 'planmyday')\n\t\t\t));\n\t}", "protected function register_filters(){\n\t\t// add_filter(\"page_attributes_dropdown_pages_args\", array($this, \"filter_attributes_dropdown_pages_args\"), 1, 1);\n\t}", "function ultnofo_options_init() { \n\tregister_setting( 'ultnofo_options_options', 'ultnofo_item', 'ultnofo_options_validate' );\n\n\t// if option doesn't exist, set defaults\n\tif( !get_option( 'ultnofo_item' ) ) add_option( 'ultnofo_item', array( 'nofollow_comments' => 1, 'nofollow_blogroll' => 0 ), '', 'no' ); \n}", "private function init_filter(){\n\t\t$this->filter = new Admin_sarung_ujis_helper_filter();\n\t\t$this->filter->set_default_value();\n\t\t$this->filter->set_url( $this->get_url_this_view());\n\t}", "function _init(){\n\t\tadd_filter( 'cac/column/meta/value', array( $this, 'format_price_admin_column' ), 10, 3 );\n\t\tadd_filter( 'searchwp_in_admin', '__return_true' );\n\t\tadd_filter( 'pre_get_posts', array( $this, 'archive_adjustments' ) );\n\t}", "public function addFilterToMeta()\n {\n return true;\n }", "function acf_enable_filter($name = '')\n{\n}", "function fitcash_plugin_activation() \r\n{\r\n // check if default cat exists\r\n if ( !get_cat_ID('ImportFit') ) \r\n {\r\n wp_create_category( 'ImportFit' );\r\n }\r\n\r\n add_option( 'fitcash_import_posts', array(), '', 'no');\r\n fitcash_set_option_defaults();\r\n\r\n fitcash_migrate_old_options();\r\n\r\n return; \r\n}", "function import_ajax_file_options() {\r\n\r\n\tif ( ! empty( $_POST['schedule_id'] ) ) {\r\n\r\n\t\t$import_schedule = get_option( 'wpgmza_import_schedule' );\r\n\t\t$import_options = $import_schedule[ $_POST['schedule_id'] ]['options'];\r\n\t\t$import_options['start'] = get_date_from_gmt( date( 'Y-m-d H:i:s', $import_schedule[ $_POST['schedule_id'] ]['start'] ), 'Y-m-d' );\r\n\t\t$import_options['interval'] = $import_schedule[ $_POST['schedule_id'] ]['interval'];\r\n\r\n\t\tif ( ! empty( $import_schedule[ $_POST['schedule_id'] ]['import_id'] ) ) {\r\n\r\n\t\t\t$_POST['import_id'] = $import_schedule[ $_POST['schedule_id'] ]['import_id'];\r\n\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $import_schedule[ $_POST['schedule_id'] ]['import_url'] ) ) {\r\n\r\n\t\t\t$_POST['import_url'] = $import_schedule[ $_POST['schedule_id'] ]['import_url'];\r\n\r\n\t\t}\r\n\t} else {\r\n\r\n\t\t$import_options = array();\r\n\r\n\t}\r\n\r\n\tif(!wpgmza_user_can_edit_maps() ||\r\n\t\t!isset( $_POST['wpgmaps_security'] ) ||\r\n\t\t!wp_verify_nonce( $_POST['wpgmaps_security'], 'wpgmaps_import' ))\r\n\t{\r\n\t\twp_send_json_error( __( 'Security check failed.', 'wp-google-maps' ) );\r\n\t}\r\n\t\r\n\tif(\r\n\t\t!isset( $_POST['import_id'] ) && \r\n\t\t!isset( $_POST['import_url'] ) &&\r\n\t\t!isset( $_POST['import_integration'] )\r\n\t\t)\r\n\t{\r\n\t\twp_send_json_error( __( 'No file, URL or integration specified.', 'wp-google-maps' ) );\r\n\t}\r\n\r\n\t$import_mimes = import_mimes();\r\n\r\n\tif ( ! empty( $_POST['import_id'] ) && is_numeric( $_POST['import_id'] ) ) {\r\n\r\n\t\t$id = absint( $_POST['import_id'] );\r\n\r\n\t\tif ( $id < 1 || get_post_meta( $id, '_wp_attachment_context', true ) !== 'wpgmaps-import' ) {\r\n\r\n\t\t\twp_send_json_error( __( 'Importing not allowed. File is not a valid WP Google Maps import upload.', 'wp-google-maps' ) );\r\n\r\n\t\t}\r\n\r\n\t\t$import_file = get_attached_file( $id );\r\n\t\t$import_file_url = wp_get_attachment_url( $id );\r\n\t\t$extension = pathinfo( $import_file, PATHINFO_EXTENSION );\r\n\r\n\t} elseif ( ! empty( $_POST['import_url'] ) ) {\r\n\r\n\t\t$import_file = '';\r\n\t\t$import_file_url = $_POST['import_url'];\r\n\t\t$extension = pathinfo( $import_file_url, PATHINFO_EXTENSION );\r\n\t\t$google_sheets_id = array();\r\n\r\n\t\tif ( preg_match( '@/spreadsheets/d/([a-zA-Z0-9-_]+)@', $import_file_url, $google_sheets_id ) ) {\r\n\r\n\t\t\t$import_file_url = \"https://docs.google.com/spreadsheets/d/{$google_sheets_id[1]}/gviz/tq?tqx=out:csv\";\r\n\t\t\t$extension = 'csv';\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t\tswitch(strtolower($extension))\r\n\t\t\t{\r\n\t\t\t\tcase \"csv\":\r\n\t\t\t\tcase \"gpx\":\r\n\t\t\t\tcase \"kml\":\r\n\t\t\t\t\t// TODO: Really should fetch the head and test the content-type\r\n\t\t\t\t\t$extension = strtolower($extension);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$extension = \"json\";\t// Assume JSON\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tif(!empty( $extension ) || isset($_POST['import_integration']) ) {\r\n\t\t\r\n\t\tif(isset($_POST['import_integration']))\r\n\t\t\t$import_class = stripslashes( $_POST['import_integration'] );\r\n\t\telse\r\n\t\t\t$import_class = 'WPGMZA\\\\Import' . strtoupper( $extension );\r\n\t\t\r\n\t\tif ( class_exists( $import_class ) ) {\r\n\t\t\t\r\n\t\t\t$import = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\t$import = new $import_class( $import_file, $import_file_url, $import_options );\r\n\t\t\t\t$import->prepare();\r\n\r\n\t\t\t\t$options_html = $import->admin_options();\r\n\t\t\t\t$notices_html = $import->get_admin_notices();\r\n\t\t\t\t\r\n\t\t\t\twp_send_json_success( array(\r\n\t\t\t\t\t'id'\t\t\t=> empty( $id ) ? 0 : $id,\r\n\t\t\t\t\t'url'\t\t\t=> empty( $import_file_url ) ? '' : $import_file_url,\r\n\t\t\t\t\t'options_html'\t=> $options_html,\r\n\t\t\t\t\t'notices_html'\t=> $notices_html\r\n\t\t\t\t) );\r\n\r\n\t\t\t} catch ( \\Exception $e ) {\r\n\t\t\t\t\r\n\t\t\t\t$response = array(\r\n\t\t\t\t\t'message'\t=> $e->getMessage(),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tif($import)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['log'] = $import->getLogText();\r\n\t\t\t\t\r\n\t\t\t\t\tif($import->getLoggedResponse())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$response['response'] = htmlentities($import->getLoggedResponse());\r\n\t\t\t\t\t\t$response['rawResponse'] = $import->getLoggedResponse();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\twp_send_json_error( $response );\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\twp_send_json_error( __( 'Unable to import file.', 'wp-google-maps' ) );\r\n\r\n}", "function planmyday_vc_importer_set_options($options=array()) {\n\t\tif ( in_array('visual_composer', planmyday_storage_get('required_plugins')) && planmyday_exists_visual_composer() ) {\n\t\t\t// Add slugs to export options for this plugin\n\t\t\t$options['additional_options'][] = 'wpb_js_templates';\n\t\t}\n\t\treturn $options;\n\t}", "function farm_import_base_importer() {\n $feeds_importer = new stdClass();\n $feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */\n $feeds_importer->api_version = 1;\n $feeds_importer->config = array(\n 'fetcher' => array(\n 'plugin_key' => 'FeedsFileFetcher',\n 'config' => array(\n 'allowed_extensions' => 'txt csv tsv',\n 'delete_uploaded_file' => 0,\n 'direct' => 0,\n 'directory' => 'private://feeds',\n 'allowed_schemes' => array(\n 'public' => 'public',\n 'private' => 'private',\n ),\n ),\n ),\n 'parser' => array(\n 'plugin_key' => 'FeedsCSVParser',\n 'config' => array(\n 'delimiter' => ',',\n 'encoding' => 'UTF-8',\n 'no_headers' => 0,\n ),\n ),\n 'processor' => array(\n 'config' => array(\n 'author' => 0,\n 'authorize' => 1,\n 'insert_new' => '1',\n 'update_existing' => '0',\n 'update_non_existent' => 'skip',\n 'input_format' => 'plain_text',\n 'skip_hash_check' => 0,\n 'language' => 'und',\n ),\n ),\n 'content_type' => '',\n 'update' => 0,\n 'import_period' => '-1',\n 'expire_period' => 3600,\n 'import_on_create' => 1,\n 'process_in_background' => 0,\n );\n return $feeds_importer;\n}", "function activate() {\n\t\t$data = array( 'return_type' => 'xml', 'max_posts' => 3);\n\t if ( ! get_option('wpr_widget_posts')){\n\t add_option('wpr_widget_posts' , $data);\n\t } else {\n\t update_option('wpr_widget_posts' , $data);\n\t }\n\t}", "public function addFilters() {\n\t\t$this->subscriber->addFilter( 'template_include', [$this, 'templateOverride'], 9999, 1 );\n\t\t$this->subscriber->addFilter( 'fl_builder_register_template_post_type_args', [$this, 'flbuilderTemplateEmbeds'] );\n\t}", "function myprefix_instagram_menu() {\n add_options_page('Instagram Feed', 'Instagram Feed', 'manage_options', 'myprefix_instagram_settings', 'myprefix_instagram_settings_output');\n}", "function acf_set_filters($filters = array())\n{\n}", "function theme_options_init()\r\n{\r\n}", "function diy_import_settings( ) {\r\n \r\n \r\n }", "public function initFilter() {\n\t}", "public function initFilter() {\n\t}", "function picky_instagram_initialize(){\n if( false == get_option( 'picky_instagram' ) ) { \n add_option( 'picky_instagram' );\n }\n\n\tadd_settings_section('picky_instagram_settings_section', 'Picky Instagram Settings', 'picky_instagram_settings_section_description', 'picky_instagram_options' );\n\n\tadd_settings_field(\n\t\t'picky_instagram_userid',\n\t\t'Instagram User ID',\n\t\t'picky_instagram_callback',\n\t\t'picky_instagram_options',\n\t\t'picky_instagram_settings_section',\n\t\tarray('picky_instagram_userid', 'text')\n\t);\n\n\tadd_settings_field(\n\t\t'picky_instagram_accessid',\n\t\t'Instagram Access ID',\n\t\t'picky_instagram_callback',\n\t\t'picky_instagram_options',\n\t\t'picky_instagram_settings_section',\n\t\tarray('picky_instagram_accessid', 'text')\n\t);\n\n\tadd_settings_field(\n\t\t'picky_instagram_searchtype',\n\t\t'Instagram Search Type',\n\t\t'picky_instagram_callback',\n\t\t'picky_instagram_options',\n\t\t'picky_instagram_settings_section',\n\t\tarray('picky_instagram_searchtype', 'radio', array('Tag', 'User'))\n\t);\n\n\tadd_settings_field(\n\t\t'picky_instagram_searchterm',\n\t\t'Instagram Search Term',\n\t\t'picky_instagram_callback',\n\t\t'picky_instagram_options',\n\t\t'picky_instagram_settings_section',\n\t\tarray('picky_instagram_searchterm', 'text')\n\t);\n\n\n\tregister_setting('picky_instagram_options', 'picky_instagram');\n\n}", "function import_options( $file = 'default/options.txt', $url = false ){\n\t\t$file_path \t= IAMD_THEME_URI . '/framework/importer/demo/'. $file;\n\t\t$file_data \t= wp_remote_get( $file_path );\n\t\t$data \t\t= unserialize( base64_decode( $file_data['body'] ) );\n\n\t\t// images URL | replace exported URL with destination URL\n\t\tif( $url && is_array( $data ) ){\n\t\t\t$replace = esc_url( home_url('/') );\n\t\t\tforeach( $data as $key => $option ){\n\t\t\t\tif( is_string( $option ) ){\t\t\t\t\t\t// variable type string only\n\t\t\t\t\t$data[$key] = str_replace( $url, $replace, $option );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tupdate_option( IAMD_THEME_SETTINGS, $data );\n\t}", "function wp_import_handle_upload()\n{\n}", "function registerImportFilter(&$filter){\n\t\tif (!is_a( $filter, 'Dataface_ImportFilter') ){\n\t\t\ttrigger_error(\"In Dataface_Table::registerImportFilter() 2nd argument expected to be of type 'Dataface_ImportFilter' but received '\".get_class($filter).\"'. \".Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t}\n\t\t$filters =& $this->getImportFilters();\n\t\t$filters[$filter->name] =& $filter;\n\t\n\t}", "private function setup_filters() {\n\n\n\t\tadd_filter( 'infinite_scroll_archive_supported', function( $val ){\n\t\t\tif ( is_singular() ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $val;\n\t\t\t}\n\t\t});\n\n\t\tadd_filter( 'infinite_scroll_settings', function( $settings ) {\n\t\t\tif ( is_singular() ) {\n\t\t\t\t$settings['posts_per_page'] = 1;\n\t\t\t}\n\t\t\treturn $settings;\n\t\t});\n\n\t\tadd_filter( 'infinite_scroll_js_settings', function( $settings ) {\n\t\t\t$settings['google_analytics'] = false;\n\t\t\t$settings['offset'] = 251;\n\t\t\treturn $settings;\n\t\t});\n\n\t\tadd_filter( 'infinite_scroll_query_args', function( $query_args ) {\n\t\t\tglobal $wpdb;\n\n\t\t\t// Figure out the next post in relation to this post\n\t\t\t$section_based_post_types = CST()->get_post_types();\n\t\t\t$unset_feature = array_keys( $section_based_post_types, 'cst_feature' );\n\t\t\tunset( $section_based_post_types[ $unset_feature[0] ] );\n\t\t\t$post_types = $section_based_post_types;\n\t\t\tif ( ! empty( $query_args['post_type'] ) && ! empty( $query_args['name'] ) && ( in_array( $query_args['post_type'], $post_types ) || ( is_array( $query_args['post_type'] ) && $query_args['post_type'] == $post_types ) ) ) {\n\n\t\t\t\t$key = array_search( 'cst_link', $post_types );\n\t\t\t\tunset( $post_types[ $key ] );\n\n\t\t\t\tif ( is_string( $query_args['post_type'] ) && isset( $query_args[ $query_args['post_type'] ] ) ) {\n\t\t\t\t\tunset( $query_args[ $query_args['post_type'] ] );\n\t\t\t\t}\n\n\t\t\t\tunset( $query_args['year'] );\n\t\t\t\tunset( $query_args['monthnum'] );\n\t\t\t\tunset( $query_args['day'] );\n\n\t\t\t\t$temp_query_args = array(\n\t\t\t\t\t'offset' => (int) $_POST['page'] - 1,\n\t\t\t\t\t'post_type' => $post_types,\n\t\t\t\t\t'posts_per_page' => 1,\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t'orderby' => 'date',\n\t\t\t\t\t'order' => 'DESC',\n\t\t\t\t\t'date_query' => array(\n\t\t\t\t\t\t'before' => sanitize_text_field( $_POST['last_post_date'] ),\n\t\t\t\t\t\t),\n\t\t\t\t\t'no_found_rows' => true,\n\t\t\t\t\t'update_post_meta_cache' => false,\n\t\t\t\t\t'update_post_term_cache' => false,\n\t\t\t\t\t'ignore_sticky_posts' => true,\n\t\t\t\t\t'tax_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'taxonomy' => 'cst_section',\n\t\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t\t'terms' => $query_args['cst_section'],\n\t\t\t\t\t\t\t'include_children' => false,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t$temp_query = new WP_Query( $temp_query_args );\n\n\t\t\t\t// No post means the end of the query\n\t\t\t\tif ( ! $temp_query->posts ) {\n\t\t\t\t\treturn $query_args;\n\t\t\t\t}\n\n\t\t\t\t$post = array_pop( $temp_query->posts );\n\n\t\t\t\t$query_args['post_type'] = $post->post_type;\n\t\t\t\t$query_args['name'] = $post->post_name;\n\t\t\t\t$query_args[ $post->post_type ] = $post->post_name;\n\t\t\t\t$query_args['posts_per_page'] = 1;\n\n\t\t\t\t// Make sure Liveblog has access to the global post when setting the entries query\n\t\t\t\tadd_action( 'wp_head', function(){\n\t\t\t\t\tglobal $post, $wp_query;\n\t\t\t\t\t$post = $wp_query->post;\n\t\t\t\t}, -1 );\n\n\t\t\t\tadd_filter( 'infinite_scroll_results', function( $results, $query_args, $wp_query ) {\n\t\t\t\t\t$results['lastbatch'] = false;\n\t\t\t\t\treturn $results;\n\t\t\t\t}, 10, 3 );\n\n\t\t\t\treturn $query_args;\n\n\t\t\t} else {\n\n\t\t\t\treturn $query_args;\n\t\t\t}\n\t\t}, 11 );\n\n\t}", "function import($settings, $source, $nr_of_feeds, $lat = NULL, $long = NULL, $radius = 5,$startdate, $enddate,$offset=NULL,$types=NULL, $regio = array(), $afdeling=NULL,$naam=NULL,$sort=NULL) {\n\n\n\t\t\t// Cache the data\n\t\t\t\n\t\t\t//if($this->has_cache == TRUE);\n\t\t\t//return;\n\n\t\t\t\n\t\t\t$instagram = new Instagram('40a35cfc91144de7bb827d6d47a12f2f');\n\t\t\t\n\t\t\t//Hashtag detection\n\t\t\t$hashtag = FALSE;\n\t\t\t\n\t\t\tif (substr($source, 0, 5) === 'hash/'){$hashtag=TRUE;} else {$hashtag=FALSE;}\n\t\t\tif (substr($source, 0, 3) === 'GEO'){$geo=TRUE;} else {$geo=FALSE;}\n\n\t\t\tprint_r($instagram);\n\t\t\t/*\t\n\t\t\t$totalamount\t=\t$query->found_posts;\n\t\t\t$this->feeds[] = $totalamount;\t\n\t\t\t*/\n\n\n\n\t\t\tif(($hashtag == FALSE) && ($geo == FALSE)){\n\t\t\t\t\n\t\t\t\n\t\t\t\t$result = $instagram->searchUser($source,1);\n\t\t\t\tforeach ($result->data as $user) {\n\t\t\t\t\t$id = $user->id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $instagram->getUserMedia($id, $nr_of_feeds);\n\t\t\t\tforeach ($result->data as $media) {\n\t\t\t\t\tif ($media->type === 'video') {\n\t\t\t\t\t\t// video\n\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t$array['media'][] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t$array['media'][] = $media->videos->standard_resolution->url;\n\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\n\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t$feed_object->set_type($this->type.\" video\");\n\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\n\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t//image\n\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t$array['media'] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t$feed_object->set_type($this->type.\" image\");\n\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(($hashtag==TRUE) && ($geo==FALSE)){\n\n\t\t\t\t$tag = substr($source, 5);\n\t\t\t\t$result = $instagram->getTagMedia($tag,$nr_of_feeds);\n\t\t\t\t\n\t\t\t\tforeach ($result->data as $media) {\n\t\t\t\t\t\n\t\t\t\t\tif ($media->type === 'video') {\n\t\t\t\t\t\t// video\n\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t$array['media'][] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t$array['media'][] = $media->videos->standard_resolution->url;\n\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t$feed_object->set_type($this->type.\" video\");\n\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\n\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t//image\n\t\t\t\t\t\n\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(empty($media->caption)){\n\t\t\t\t\t\t$array['text'] = \"\";\n\t\t\t\t\t\t$array['user'] = $media->user->username;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t$array['media'] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t$feed_object->set_type($this->type.\" image\");\n\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\n\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(($hashtag==FALSE) && ($geo==TRUE)){\n\t\t\t\t$tags = array('ddw14','dutchdesignweek','getthebuzz');\n\t\t\t\t$latlng = substr($source, 3);\n\t\t\t\t$latlng = explode('/',$latlng);\n\t\t\t\t$lat = $latlng[0];\n\t\t\t\t$lng = $latlng[1];\n\t\t\t\t$radius = $nr_of_feeds;\n\t\t\t\t\n\t\t\t\t$date = date_create('-7 days');\n\t\t\t\t$mintime = date_format($date, 'U');\n\t\t\t\t$date = date_create();\n\t\t\t\t$maxtime = date_format($date, 'U');\n\t\t\t\t\n\t\t\t\t$result = $instagram->searchMedia($lat, $lng, $radius, $mintime, $maxtime);\n\t\t\t\tforeach ($result->data as $media) {\n\t\t\t\t\t$tagresult = array_intersect($media->tags,$tags);\n\t\t\t\t\tif(!empty($tagresult))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($media->type === 'video') {\n\t\t\t\t\t\t\t// video\n\t\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t\t$array['media'][] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t\t$array['media'][] = $media->videos->standard_resolution->url;\n\t\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\t\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t\t$feed_object->set_type($this->type.\" video\");\n\t\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\n\t\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//image\n\t\t\t\t\t\t\t$array = array();\n\t\t\t\t\t\t\t$array['date'] = $media->created_time;\n\t\t\t\t\t\t\t$array['title'] = '';\n\t\t\t\t\t\t\t$array['text'] = $media->caption->text;\n\t\t\t\t\t\t\t$array['user'] = $media->caption->from->username;\n\t\t\t\t\t\t\t$array['source_url'] = $media->link;\n\t\t\t\t\t\t\t//standard_resolution = 640x640;\n\t\t\t\t\t\t\t$array['media'] = $media->images->standard_resolution->url;\n\t\t\t\t\t\t\t$array['tags'] = $media->tags;\n\t\t\t\t\t\t\t$array['geo'] = $media->location;\n\n\t\t\t\t\t\t\t// Compose object\n\t\t\t\t\t\t\t$feed_object = new BuzzFeedInstagram_object();\n\t\t\t\t\t\t\t$feed_object->set_type($this->type.\" image\");\n\t\t\t\t\t\t\t$feed_object->set_title($array['title']);\n\t\t\t\t\t\t\t$feed_object->set_feed_id($array['source_url']);\n\t\t\t\t\t\t\t$feed_object->set_timestamp($array['date']);\n\t\t\t\t\t\t\t$feed_object->set_date($array['date']);\n\t\t\t\t\t\t\t$feed_object->set_text($array['text']);\n\t\t\t\t\t\t\t$feed_object->set_media($array['media']);\n\t\t\t\t\t\t\t$feed_object->set_url($array['source_url']);\n\n\t\t\t\t\t\t\t$this->feeds[] = $feed_object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Set the cache\n\t\t\t//$this->set_cache();\n\t\t\t\n\t\t\t\n\t\t\t$this_json = json_encode($this);\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t}", "function feed_links_extra($args = array())\n{\n}", "private function add_filters()\n\t{\n\t\tadd_filter('body_class', [$this, 'ws_body_class']);\n\t\tadd_filter('use_default_gallery_style', '__return_false');\n\t\tadd_filter('emoji_svg_url', '__return_false');\n\t\tadd_filter('show_recent_comments_widget_style', '__return_false');\n\t}", "public function addFilters() {\n\t\t$this->subscriber->addFilter( 'tiny_mce_plugins', [$this, 'disableEmojisTinymce'] );\n\t\t$this->subscriber->addFilter( 'wp_resource_hints', [$this, 'disableEmojisRemoveDnsPrefetch'], 10, 2 );\n\t\t$this->subscriber->addFilter( 'jetpack_lazy_images_blacklisted_classes', [$this, 'disableLazyLoadForLogo'] );\n\t\t$this->subscriber->addFilter( 'gform_enable_field_label_visibility_settings', '__return_true' );\n\t\t$this->subscriber->addFilter( 'fl_builder_render_assets_inline', '__return_true' );\n\t}", "public function add_filters() {\n\n\t\t// Filters the REST API response so multi authors are added to post queries.\n\t\t$post_types = my_multi_author()->get_multi_author_post_types();\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\tadd_filter( 'rest_prepare_' . $post_type, [ $this, 'filter_rest_prepare_post' ], 10, 3 );\n\t\t}\n\t}", "private function __construct() {\n\t\t\tadd_filter( 'astra_addon_get_display_posts_by_conditions', array( $this, 'get_advanced_hook_wpml_object' ), 10, 2 );\n\t\t}", "function admin_init_options()\n\t{\n\t\t$plugin = plugin_basename( POPBOUNCE_FILE );\n\t\tadd_filter( \"plugin_action_links_$plugin\", [ $this, 'settings_link' ] );\n\t\t$this->register_settings();\n\t}", "function infinite_add_options() {\n\t// infinite_add_options: add options to DB for this plugin\n\tadd_option('infinite_nb_widgets', '75');\n\t// add_option('infinite_...','...');\n}", "private function _getPostFeedOptions() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n// Throw error for logged-out user.\n if (empty($viewer_id)) {\n return;\n }\n if (!Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'user', 'status')) {\n return;\n }\n if (!isset($_REQUEST['subject_type']) && empty($_REQUEST['subject_type'])) {\n if (!Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'user', 'status')) {\n return;\n }\n }\n// Get the subject\n if (Engine_Api::_()->core()->hasSubject())\n $subject = Engine_Api::_()->core()->getSubject();\n else\n $subject = Engine_Api::_()->user()->getViewer();\n// Check authorization permission\n if (!$subject->authorization()->isAllowed($viewer, 'comment')) {\n return;\n }\n\n\n// Make an array for feed post menus.\n $activityPost = array();\n $activityPost['status'] = 1;\n $activityPost['emotions'] = 1;\n $activityPost['withtags'] = 1;\n $composerList = @implode(\",\", Engine_Api::_()->getApi('settings', 'core')->getSetting('advancedactivity.composer.menuoptions', array('photoXXXalbum', 'linkXXXcore', 'musicXXXmusic', 'checkinXXXsitetagcheckin', 'videoXXXvideo')));\n $moduleEnabledByUs = array('album' => 'photo', 'sitetagcheckin' => 'checkin', 'video' => 'video', 'music' => 'music', 'core' => 'link');\n foreach ($moduleEnabledByUs as $modName => $key) {\n $activityPost[$key] = (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled($modName) && strstr($composerList, $modName)) ? 1 : 0;\n }\n\n if (empty($activityPost['video'])) {\n $activityPost['video'] = (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo') && strstr($composerList, 'sitevideo')) ? 1 : 0;\n }\n\n $activityPost['userprivacy'] = array(\n 'everyone' => $this->translate('Everyone'),\n 'networks' => $this->translate('Friends & Networks'),\n 'friends' => $this->translate('Friends Only'),\n 'onlyme' => $this->translate('Only Me')\n );\n return $activityPost;\n }", "public function _export_settings() {\n\n\t\t$settings = $this->get_settings_for_display();\n\n\t\t$allowed = apply_filters( 'jet-blog/smart-listing/exported-options', array(\n\t\t\t'block_title',\n\t\t\t'title_tag',\n\t\t\t'featured_post',\n\t\t\t'featured_position',\n\t\t\t'featured_width',\n\t\t\t'featured_layout',\n\t\t\t'featured_image_size',\n\t\t\t'featured_image_position',\n\t\t\t'featured_image_width',\n\t\t\t'featured_excerpt_length',\n\t\t\t'featured_excerpt_trimmed_ending',\n\t\t\t'featured_read_more',\n\t\t\t'featured_read_more_text',\n\t\t\t'featured_show_meta',\n\t\t\t'featured_show_author',\n\t\t\t'featured_show_author_icon',\n\t\t\t$this->_new_icon_prefix . 'featured_show_author_icon',\n\t\t\t'featured_show_date',\n\t\t\t'featured_show_date_icon',\n\t\t\t$this->_new_icon_prefix . 'featured_show_date_icon',\n\t\t\t'featured_show_comments',\n\t\t\t'featured_show_comments_icon',\n\t\t\t$this->_new_icon_prefix . 'featured_show_comments_icon',\n\t\t\t'posts_columns',\n\t\t\t'posts_rows',\n\t\t\t'image_size',\n\t\t\t'image_position',\n\t\t\t'image_width',\n\t\t\t'excerpt_length',\n\t\t\t'excerpt_trimmed_ending',\n\t\t\t'read_more',\n\t\t\t'read_more_text',\n\t\t\t'show_meta',\n\t\t\t'show_author',\n\t\t\t'show_author_icon',\n\t\t\t$this->_new_icon_prefix . 'show_author_icon',\n\t\t\t'show_date',\n\t\t\t'show_date_icon',\n\t\t\t$this->_new_icon_prefix . 'show_date_icon',\n\t\t\t'show_comments',\n\t\t\t'show_comments_icon',\n\t\t\t$this->_new_icon_prefix . 'show_comments_icon',\n\t\t\t'query_by',\n\t\t\t'category_ids',\n\t\t\t'post_tag_ids',\n\t\t\t'include_ids',\n\t\t\t'exclude_ids',\n\t\t\t'custom_query_by',\n\t\t\t'custom_terms_ids',\n\t\t\t'meta_query',\n\t\t\t'meta_key',\n\t\t\t'meta_value',\n\t\t\t'show_filter',\n\t\t\t'filter_by',\n\t\t\t'show_all_btn',\n\t\t\t'all_btn_label',\n\t\t\t'more_terms_icon',\n\t\t\t$this->_new_icon_prefix . 'more_terms_icon',\n\t\t\t'show_arrows',\n\t\t\t'arrow_type',\n\t\t\t'show_featured_terms',\n\t\t\t'show_featured_terms_tax',\n\t\t\t'show_terms',\n\t\t\t'show_terms_tax',\n\t\t\t'featured_meta_position',\n\t\t\t'meta_position',\n\t\t\t'show_image',\n\t\t\t'post_type',\n\t\t\t'post_ids',\n\t\t\t'content_related_meta',\n\t\t\t'show_content_related_meta',\n\t\t\t'meta_content_related_position',\n\t\t\t'title_related_meta',\n\t\t\t'show_title_related_meta',\n\t\t\t'meta_title_related_position',\n\t\t\t'featured_title_length',\n\t\t\t'title_length',\n\t\t\t'add_button_icon',\n\t\t\t'button_icon',\n\t\t\t$this->_new_icon_prefix . 'button_icon',\n\t\t\t'post_add_button_icon',\n\t\t\t'post_button_icon',\n\t\t\t$this->_new_icon_prefix . 'post_button_icon',\n\t\t\t'use_custom_query',\n\t\t\t'custom_query',\n\t\t\t'posts_offset',\n\t\t\t'order',\n\t\t\t'order_by',\n\t\t) );\n\n\t\t$result = array();\n\n\t\tforeach ( $allowed as $setting ) {\n\t\t\t$result[ $setting ] = isset( $settings[ $setting ] ) ? $settings[ $setting ] : null;\n\t\t}\n\n\t\techo esc_attr( json_encode( $result ) );\n\t}", "function import_options( $file, $url = false ){\n\n\t\t$file_data \t= $this->get_file_data( $file );\n\t\t$data \t\t= @unserialize( call_user_func( 'base'.'64_decode', $file_data ) );\n\t\t\n\t\t// debug\n// \t\tprint_r( $data );\n\t\t\n\t\tif( is_array( $data ) ){\n\t\t\t\t\n\t\t\t// images URL | replace exported URL with destination URL\n\t\t\tif( $url ){\n\t\t\t\t$replace = home_url('/');\n\t\t\t\tforeach( $data as $key => $option ){\n\t\t\t\t\tif( is_string( $option ) ){\t\t\t\t\t\t// variable type string only\n\t\t\t\t\t\t$option \t= $this->migrate_cb_ms( $option );\n\t\t\t\t\t\t$data[$key] = str_replace( $url, $replace, $option );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tob_start();\n\t\t\tupdate_option( THEME_NAME, $data );\n\t\t\tob_end_clean();\n\n\t\t} else {\n\t\t\t\n\t\t\t$this->failed['options'] = true;\n\t\t\t\n\t\t}\n\t}", "public static function hookConfig()\n {\n \t\n \t// modeled on SimplePages handler\n\t// set_option('simple_pages_filter_page_content', (int)(boolean)$_POST['simple_pages_filter_page_content']);\n \n \t// Set options\n set_option('item_relations_public_items_show', \n (int)(boolean)$_POST['item_relations_public_items_show']);\n set_option('item_relations_relation_format', \n $_POST['item_relations_relation_format']);\n }", "function jardiwinery_booked_importer_set_options($options=array()) {\n\t\tif (in_array('booked', jardiwinery_storage_get('required_plugins')) && jardiwinery_exists_booked()) {\n\t\t\t$options['additional_options'][] = 'booked_%';\t\t// Add slugs to export options for this plugin\n\t\t}\n\t\treturn $options;\n\t}", "function TanTanFacebookPlugin() {\n add_action('admin_menu', array(&$this, 'addhooks'));\n add_action('load-upload.php', array(&$this, 'addPhotosTab'));// WP < 2.5\n \n // WP >= 2.5\n\t\tadd_action('media_buttons_context', array(&$this, 'media_buttons')); \n\t\tadd_action('media_upload_tantan-facebook-photos', array(&$this, 'media_upload_content'));\n\t\tadd_action('media_upload_tantan-facebook-photos-of-me', array(&$this, 'media_upload_content_of_me'));\n\t\t\n add_action('activate_tantan/facebook-photos.php', array(&$this, 'activate'));\n if ($_GET['tantanActivate'] == 'facebook-photos') {\n $this->showConfigNotice();\n }\n $this->photos = array();\n $this->albums = array();\n $this->perPage = 1000;\n }", "function acf_get_filters()\n{\n}", "function units_init(&$options, $memberInfo, &$args) {\r\n\t\t/* Inserted by Search Page Maker for AppGini on 2020-11-18 12:19:27 */\r\n\t\t$options->FilterPage = 'hooks/units_filter.php';\r\n\t\t/* End of Search Page Maker for AppGini code */\r\n\r\n\r\n\t\treturn TRUE;\r\n\t}", "public static function filters()\n\t{\n\n\t\tadd_filter('plugin_action_links_' .plugin_basename(CGP_PLUGIN_FILE), function ( $links ) {\n\t\t\t$links[] = sprintf(\n\t\t\t\t'<a href=\"%s\">%s</a>',\n\t\t\t\tadd_query_arg(['page' => 'wc-settings', 'tab' => 'setting_cgi_test'], admin_url('admin.php')),\n\t\t\t\t__('Settings')\n\t\t\t);\n\t\t\treturn $links;\n\t\t});\n\t}", "public function hookConfig()\n {\n set_option('simple_pages_filter_page_content', (int)(boolean)$_POST['simple_pages_filter_page_content']);\n }", "function LoadDefaultFilters() {}", "public function opml_import()\n\t{\n\t\t// Get the event data\n\t\t$file = & Swiftriver_Event::$data;\n\t\t\n\t\tif ($file['key'] != 'opml_import')\n\t\t\treturn;\n\t\t\t\n\t\tif ( ! Upload::type($file, array('xml', 'opml')))\n\t\t\tthrow new Swiftriver_Exception_Channel_Option('Invalid file type');\n\t\t\t\n\t\t// Begin processing the feed\n\t\t$importer = new Swiftriver_OPML_Import();\n\t\t$importer->init($file['tmp_name']);\n\t\t\n\t\t// Get the feed entries\n\t\tif ( ! isset($file['option_data']))\n\t\t{\n\t\t\t$file['option_data'] = array();\n\t\t}\n\t\n\t\tforeach ($importer->get_feeds() as $feed)\n\t\t{\n\t\t\t$file['option_data'][] = array(\n\t\t\t\t'key' => 'url',\n\t\t\t\t'value' => $feed['url'],\n\t\t\t\t'title' => $feed['title'],\n\t\t\t\t'quota_usage' => 1\n\t\t\t);\n\t\t}\n\t}", "function _wp_customize_loader_settings()\n{\n}", "public function applyAdditionalFilterParams(): void\n {\n\n }", "function mifo_import_files() {\n return array(\n array(\n 'import_file_name' => 'Mifo Demo 1',\n 'categories' => array( 'Category 1' ),\n 'import_file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/mifo.wordpress.xml',\n 'import_widget_file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/mifo.wie', \n 'import_redux' => array(\n array(\n 'file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/redux_options_rs_option.json',\n 'option_name' => 'rs_option',\n ),\n ),\n \n 'import_notice' => __( 'Caution: For importing demo data please click on \"Import Demo Data\" button. During demo data installation please do not refresh the page.', 'mifo' ),\n \n ),\n array(\n 'import_file_name' => 'Mifo Demo 2',\n 'categories' => array( 'Category 1' ),\n 'import_file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/mifo.wordpress.xml',\n 'import_widget_file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/mifo.wie', \n 'import_redux' => array(\n array(\n 'file_url' => trailingslashit( get_template_directory_uri() ) . 'ocdi/redux_options_rs_option.json',\n 'option_name' => 'rs_option',\n ),\n ),\n \n 'import_notice' => __( 'Caution: For importing demo data please click on \"Import Demo Data\" button. During demo data installation please do not refresh the page.', 'mifo' ),\n \n ),\n \n );\n}", "public function sanitizer_filters() {\n\n\t\tgenesis_add_option_filter(\n\t\t\t'one_zero',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'breadcrumb_front_page',\n\t\t\t\t'breadcrumb_home',\n\t\t\t\t'breadcrumb_single',\n\t\t\t\t'breadcrumb_posts_page',\n\t\t\t\t'breadcrumb_archive',\n\t\t\t\t'breadcrumb_404',\n\t\t\t\t'breadcrumb_attachment',\n\t\t\t\t'comments_posts',\n\t\t\t\t'comments_pages',\n\t\t\t\t'content_archive_thumbnail',\n\t\t\t\t'nav',\n\t\t\t\t'nav_superfish',\n\t\t\t\t'nav_extras_enable',\n\t\t\t\t'redirect_feed',\n\t\t\t\t'redirect_comments_feed',\n\t\t\t\t'show_info',\n\t\t\t\t'subnav',\n\t\t\t\t'subnav_superfish',\n\t\t\t\t'trackbacks_posts',\n\t\t\t\t'trackbacks_pages',\n\t\t\t\t'update',\n\t\t\t\t'update_email',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'no_html',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'blog_cat_exclude',\n\t\t\t\t'blog_title',\n\t\t\t\t'content_archive',\n\t\t\t\t'nav_extras',\n\t\t\t\t'nav_extras_twitter_id',\n\t\t\t\t'posts_nav',\n\t\t\t\t'site_layout',\n\t\t\t\t'style_selection',\n\t\t\t\t'theme_version',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'absint',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'blog_cat',\n\t\t\t\t'blog_cat_num',\n\t\t\t\t'db_version',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'safe_html',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'nav_extras_twitter_text',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'requires_unfiltered_html',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'header_scripts',\n\t\t\t\t'footer_scripts',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'url',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'feed_uri',\n\t\t\t\t'comments_feed_uri',\n\t\t\t)\n\t\t);\n\n\t}", "public static function hookConfig()\n {\n set_option('item_relations_public_append_to_items_show',\n (int)(boolean) $_POST['item_relations_public_append_to_items_show']);\n set_option('item_relations_relation_format',\n $_POST['item_relations_relation_format']);\n }", "private function attach_hooks_and_filters() {}", "public function filters()\n {\n add_filter('Timber\\PostClassMap', function () {\n return get_cpt_classmap();\n });\n\n add_filter('acf/format_value/type=relationship', [$this, 'towa_resolve_cpts'], 9999, 3);\n add_filter('acf/format_value/type=post_object', [$this, 'towa_resolve_cpt'], 9999, 3);\n\n // faster load times in backend\n add_filter('acf/settings/remove_wp_meta_box', '__return_true');\n\n add_filter('wpseo_metabox_prio', [$this, 'yoast_to_bottom']);\n\n add_filter('jpeg_quality', function () {\n return 100;\n });\n }", "function _wp_customize_changeset_filter_insert_post_data($post_data, $supplied_post_data)\n{\n}", "public function __construct($app) {\n\n add_filter('wpghs_filename',array($this,'wpghs_filename'), 100, 2);\n add_action('wpghs_pre_import_args', array($this,'wpghs_pre_import_args'), 10, 2);\n\n\t}", "function wp_get_popular_importers()\n{\n}", "function init() {\n add_filter( 'sharing_show', array( 'SharedaddyMoreControl', 'sharing_show' ), 10, 2 );\n add_action( 'sharing_global_options', array( 'SharedaddyMoreControl', 'screen' ) );\n add_action( 'sharing_admin_update', array( 'SharedaddyMoreControl', 'update' ) );\n }", "function movi_recepcion_init(&$options, $memberInfo, &$args) {\n\t\t/* Inserted by Search Page Maker for AppGini on 2021-08-02 10:38:29 */\n\t\t$options->FilterPage = 'hooks/movi_recepcion_filter.php';\n\t\t/* End of Search Page Maker for AppGini code */\n\n\n\t\treturn TRUE;\n\t}", "public function setup() {\n\t\tadd_filter( 'get_the_date', [ $this, 'get_the_date_filter' ], 10, 3 );\n\t\tadd_filter( 'get_the_time', [ $this, 'get_the_time_filter' ], 10, 3 );\n\t\tadd_filter( 'get_the_modified_date', [ $this, 'get_the_modified_date_filter' ], 10, 2 );\n\t\tadd_filter( 'get_the_modified_time', [ $this, 'get_the_modified_time_filter' ], 10, 2 );\n\t}", "function search_filter_register_option() {\r\n\t\tregister_setting('search_filter_license', 'search_filter_license_key', array($this, 'edd_sanitize_license') );\r\n\r\n\t\tregister_setting('search_filter_settings', 'search_filter_cache_speed', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_cache_use_manual', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_cache_use_background_processes', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_cache_use_transients', array($this, 'sf_cache_sanitize_use_transients_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_load_js_css', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_lazy_load_js', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_load_jquery_i18n', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_combobox_script', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_remove_all_data', array($this, 'sf_sanitize_options') );\r\n\t\tregister_setting('search_filter_settings', 'search_filter_meta_key_text_input', array($this, 'sf_sanitize_options') );\r\n\t}", "function SetupCustomFilters() {\n\n\t// 1. Register your custom filter below (see example)\n\t// 2. Write your custom filter function (see example fucntions: GetLastMonthFilter, GetStartsWithAFilter)\n\n}", "function plumbing_parts_woocommerce_importer_show_params($importer) {\n\t\t$importer->show_importer_params(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('Import WooCommerce', 'plumbing-parts'),\n\t\t\t'part' => 0\n\t\t\t));\n\t}", "public static function init() {\n\t\t// Get the priority\n\t\t$wprss_ftp_pcfp = apply_filters( 'wprss_ftp_post_content_filter_priority', 10000 );\n\n\t\t// Filters below are in order of execution\n\n\t\t// Post Content Trimming\n\t\tadd_filter( 'the_content', array( 'WPRSS_FTP_Display', 'trim_post_content' ), $wprss_ftp_pcfp - 3, 1 );\n\n\t\t// Add the content filter function that removes all text from posts\n\t\tadd_filter( 'the_content', array( 'WPRSS_FTP_Display', 'images_only_in_post_content' ), $wprss_ftp_pcfp - 2, 1 );\n\n\t\t// Add the content filter function that adds the enclosure link\n\t\tadd_filter( 'the_content', array( 'WPRSS_FTP_Display', 'enclosure_link' ), $wprss_ftp_pcfp - 1, 1 );\n\n\t\t// Add the content filter function that adds the source link, prepend and append texts to posts' content\n\t\tadd_filter( 'the_content', array( 'WPRSS_FTP_Display', 'post_content' ), $wprss_ftp_pcfp, 1 );\n\n\n\t\t// Add the content filter function that applies affiliate links to the posts' content\n\t\t//add_filter( 'the_content', array( 'WPRSS_FTP_Display', 'apply_affiliate_links_to_post_content' ) );\n\n\t\t// Adds the meta generator tag to the <head> of imported posts on their singular page\n\t\tadd_action( 'wp_head', array( 'WPRSS_FTP_Display', 'post_head' ) );\n\n // Filter the canonical URL for imported posts, so that the <link rel=\"canonical\"> tag has a \"href\" attribute\n // that links to the original article\n add_filter( 'get_canonical_url', array( 'WPRSS_FTP_Display', 'canonical_url' ), 10, 2 );\n\n // Filter YoastSEO's Facebook OpenGraph URL to point to the imported post. By default, YoastSEO uses the\n // canonical link, which Feed to Post sets to the original article.\n add_filter('wpseo_opengraph_url', array( 'WPRSS_FTP_Display', 'yoast_seo_og_url' ) );\n\t}", "function beaver_extender_custom_import( $import_file, $theme_settings = '', $custom_css = '', $custom_functions = '', $custom_js = '', $custom_templates = '', $custom_labels = '', $conditionals = '', $widget_areas = '', $hook_boxes = '' ) {\r\n\t\r\n\t$beaver_extender_templates = get_option( 'beaver_extender_custom_templates' );\r\n\t$beaver_extender_labels = get_option( 'beaver_extender_custom_labels' );\r\n\t$beaver_extender_conditionals = get_option( 'beaver_extender_custom_conditionals' );\r\n\t$beaver_extender_widgets = get_option( 'beaver_extender_custom_widget_areas' );\r\n\t$beaver_extender_hooks = get_option( 'beaver_extender_custom_hook_boxes' );\r\n\t\r\n\tif ( 'dat' == strtolower( substr( strrchr( $import_file['name'], '.' ), 1 ) ) ) {\r\n\t\t\r\n\t\t$import_data = file_get_contents( $import_file['tmp_name'] );\r\n\t\t$beaver_extender_import = unserialize( $import_data );\r\n\t\t\r\n\t\tif ( ! empty( $theme_settings ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_settings'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$plugin_settings_import = array_merge( beaver_extender_settings_defaults( false, $beaver_extender_import['beaver_extender_settings'] ), $beaver_extender_import['beaver_extender_settings'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_settings', $plugin_settings_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! empty( $custom_css ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_custom_css'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$custom_css_import = array_merge( beaver_extender_custom_css_options_defaults(), $beaver_extender_import['beaver_extender_custom_css'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_css', $custom_css_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! empty( $custom_functions ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_custom_functions'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$custom_functions_import = array_merge( beaver_extender_custom_functions_options_defaults(), $beaver_extender_import['beaver_extender_custom_functions'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_functions', $custom_functions_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $custom_js ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_custom_js'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$custom_js_import = array_merge( beaver_extender_custom_js_options_defaults(), $beaver_extender_import['beaver_extender_custom_js'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_js', $custom_js_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $custom_templates ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_templates'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$beaver_extender_templates_array = array();\r\n\t\t\t\tforeach( $beaver_extender_templates as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !in_array( $beaver_extender_templates[$key]['template_file_name'], $beaver_extender_templates_array ) )\r\n\t\t\t\t\t\t$beaver_extender_templates_array[] = $beaver_extender_templates[$key]['template_file_name'];\r\n\r\n\t\t\t\t}\r\n\t\t\t\tforeach( $beaver_extender_import['beaver_extender_templates'] as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( in_array( $beaver_extender_import['beaver_extender_templates'][$key]['template_file_name'], $beaver_extender_templates_array ) )\r\n\t\t\t\t\t\tunset( $beaver_extender_import['beaver_extender_templates'][$key] );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$templates_import = array_merge( $beaver_extender_templates, $beaver_extender_import['beaver_extender_templates'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_templates', $templates_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $custom_labels ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_labels'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$beaver_extender_labels_array = array();\r\n\t\t\t\tforeach( $beaver_extender_labels as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !in_array( $beaver_extender_labels[$key]['label_name'], $beaver_extender_labels_array ) )\r\n\t\t\t\t\t\t$beaver_extender_labels_array[] = $beaver_extender_labels[$key]['label_name'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tforeach( $beaver_extender_import['beaver_extender_labels'] as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( in_array( $beaver_extender_import['beaver_extender_labels'][$key]['label_name'], $beaver_extender_labels_array ) )\r\n\t\t\t\t\t\tunset( $beaver_extender_import['beaver_extender_labels'][$key] );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$labels_import = array_merge( $beaver_extender_labels, $beaver_extender_import['beaver_extender_labels'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_labels', $labels_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! empty( $conditionals ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_conditionals'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$beaver_extender_conditionals_array = array();\r\n\t\t\t\tforeach( $beaver_extender_conditionals as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$beaver_extender_conditionals_array[] = $beaver_extender_conditionals[$key]['conditional_id'];\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tforeach( $beaver_extender_import['beaver_extender_conditionals'] as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( in_array( $beaver_extender_import['beaver_extender_conditionals'][$key]['conditional_id'], $beaver_extender_conditionals_array ) )\r\n\t\t\t\t\t\tunset( $beaver_extender_import['beaver_extender_conditionals'][$key] );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$conditionals_import = array_merge( $beaver_extender_conditionals, $beaver_extender_import['beaver_extender_conditionals'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_conditionals', $conditionals_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! empty( $widget_areas ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_widgets'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$beaver_extender_widgets_array = array();\r\n\t\t\t\tforeach( $beaver_extender_widgets as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !in_array( $beaver_extender_widgets[$key]['widget_name'], $beaver_extender_widgets_array ) )\r\n\t\t\t\t\t\t$beaver_extender_widgets_array[] = $beaver_extender_widgets[$key]['widget_name'];\r\n\r\n\t\t\t\t}\r\n\t\t\t\tforeach( $beaver_extender_import['beaver_extender_widgets'] as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( in_array( $beaver_extender_import['beaver_extender_widgets'][$key]['widget_name'], $beaver_extender_widgets_array ) )\r\n\t\t\t\t\t\tunset( $beaver_extender_import['beaver_extender_widgets'][$key] );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$widgets_import = array_merge( $beaver_extender_widgets, $beaver_extender_import['beaver_extender_widgets'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_widget_areas', $widgets_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! empty( $hook_boxes ) ) {\r\n\t\t\t\r\n\t\t\tif ( ! empty( $beaver_extender_import['beaver_extender_hooks'] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t$beaver_extender_hooks_array = array();\r\n\t\t\t\tforeach( $beaver_extender_hooks as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !in_array( $beaver_extender_hooks[$key]['hook_name'], $beaver_extender_hooks_array ) )\r\n\t\t\t\t\t\t$beaver_extender_hooks_array[] = $beaver_extender_hooks[$key]['hook_name'];\r\n\r\n\t\t\t\t}\r\n\t\t\t\tforeach( $beaver_extender_import['beaver_extender_hooks'] as $key => $value ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( in_array( $beaver_extender_import['beaver_extender_hooks'][$key]['hook_name'], $beaver_extender_hooks_array ) )\r\n\t\t\t\t\t\tunset( $beaver_extender_import['beaver_extender_hooks'][$key] );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$hooks_import = array_merge( $beaver_extender_hooks, $beaver_extender_import['beaver_extender_hooks'] );\r\n\t\t\t\tupdate_option( 'beaver_extender_custom_hook_boxes', $hooks_import );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tbeaver_extender_write_files();\r\n\t\twp_redirect( admin_url( 'admin.php?page=beaver-extender-dashboard&activetab=beaver-extender-settings-nav-import-export&notice=import-complete' ) );\r\n\t\texit();\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\twp_redirect( admin_url( 'admin.php?page=beaver-extender-dashboard&activetab=beaver-extender-settings-nav-import-export&notice=import-error' ) );\r\n\t\texit();\r\n\t\t\r\n\t}\r\n\t\r\n}", "function plumbing_parts_woocommerce_importer_import_fields($importer) {\n\t\t$importer->show_importer_fields(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('WooCommerce meta', 'plumbing-parts')\n\t\t\t));\n\t}", "public function __construct() {\n\n\t\t$this->args = array(\n\t\t\t'id_base' => 'wpex_insagram_slider',\n\t\t\t'name' => $this->branding() . __( 'Instagram Grid', 'total' ),\n\t\t\t'options' => array(\n\t\t\t\t'customize_selective_refresh' => true,\n\t\t\t),\n\t\t\t'fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'title',\n\t\t\t\t\t'label' => __( 'Title', 'total' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'username',\n\t\t\t\t\t'label' => __( 'Username', 'total' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'Important: The Instagram feed is refreshed every 2 hours to prevent your site from slowing down.', 'total' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'size',\n\t\t\t\t\t'label' => __( 'Size', 'total' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'thumbnail' => __( 'Thumbnail', 'total' ),\n\t\t\t\t\t\t'small' => __( 'Small', 'total' ),\n\t\t\t\t\t\t'large' => __( 'Large', 'total' ),\n\t\t\t\t\t\t'original' => __( 'Original', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\t'default' => 'thumbnail',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'columns',\n\t\t\t\t\t'label' => __( 'Columns', 'total' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => 'grid_columns',\n\t\t\t\t\t'default' => '3',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'gap',\n\t\t\t\t\t'label' => __( 'Gap', 'total' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => 'grid_gaps',\n\t\t\t\t\t'default' => '10',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'responsive',\n\t\t\t\t\t'label' => __( 'Responsive', 'total' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'default' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'number',\n\t\t\t\t\t'label' => __( 'Number', 'total' ),\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'default' => 9,\n\t\t\t\t\t'description' => __( 'Max 12 items.', 'total' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'target',\n\t\t\t\t\t'label' => __( 'Open links in', 'total' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => 'link_target',\n\t\t\t\t\t'default' => '_self',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$this->create_widget( $this->args );\n\n\t}", "public function add_chanel_options()\n\t{\n\t\tlist($river, $user, $keywords) = Swiftriver_Event::$data;\n\t\t\n\t\t// Get starter URLs from site settings\n\t\t$urls = Model_Setting::get_setting(RSS_Util::SETTING_KEY);\n\t\tif ( ! $urls) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$urls = json_decode($urls);\n\t\tif (empty($urls))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add a rss channel\n\t\t$channel_filter = $river->create_channel_filter('rss', $user->id, TRUE);\n\t\t$channel_filter->add_option('keyword', array(\n\t\t\t'label' => 'Keyword',\n\t\t\t'type' => 'text',\n\t\t\t'value' => trim($keywords)\n\t\t));\n\t\t\n\t\tforeach ($urls as $url => $title)\n\t\t{\n\t\t\t$channel_filter->add_option('url', array(\n\t\t\t\t'label' => $title,\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $url\n\t\t\t));\n\t\t}\n\t}", "function setup_filters()\n{\n add_filter('the_content', 'add_image_placeholders', PHP_INT_MAX);\n add_filter('post_thumbnail_html', 'add_image_placeholders', PHP_INT_MAX);\n add_filter('get_avatar', 'add_image_placeholders', PHP_INT_MAX);\n add_filter('widget_text', 'add_image_placeholders', PHP_INT_MAX);\n add_filter('get_image_tag', 'add_image_placeholders', PHP_INT_MAX);\n add_filter('wp_get_attachment_image_attributes', 'process_image_attributes', PHP_INT_MAX, 2);\n}", "function ample_construction_after_import_setup() {\r\n $social_link= get_term_by( 'name', 'Social Link', 'nav_menu' );\r\n // Assign menus to their locations.\r\n $main_menu = get_term_by( 'name', 'Primary', 'nav_menu' );\r\n\r\n set_theme_mod( 'nav_menu_locations', array(\r\n 'social-link' => $social_link->term_id,\r\n 'primary' => $main_menu->term_id,\r\n )\r\n );\r\n\r\n\r\n\r\n\r\n\r\n // Assign front page and posts page (blog page).\r\n $front_page_id = get_page_by_title( 'Home' );\r\n $blog_page_id = get_page_by_title( 'Blog' );\r\n\r\n update_option( 'show_on_front', 'page' );\r\n update_option( 'page_on_front', $front_page_id->ID );\r\n update_option( 'page_for_posts', $blog_page_id->ID );\r\n\r\n}", "function wp_init_targeted_link_rel_filters()\n{\n}", "function default_filters() {\n\n\t\t/* Remove bbPress theme compatibility if current theme supports bbPress. */\n\t\tif ( current_theme_supports( 'bbpress' ) )\n\t\t\tremove_action( 'bbp_init', 'bbp_setup_theme_compat', 8 );\n\n\t\t/* Move the WordPress generator to a better priority. */\n\t\tremove_action( 'wp_head', 'wp_generator' );\n\t\tadd_action( 'wp_head', 'wp_generator', 1 );\n\n\t\t/* Add the theme info to the header (lets theme developers give better support). */\n\t\tadd_action( 'wp_head', 'hybrid_meta_template', 1 );\n\n\t\t/* Make text widgets and term descriptions shortcode aware. */\n\t\tadd_filter( 'widget_text', 'do_shortcode' );\n\t\tadd_filter( 'term_description', 'do_shortcode' );\n\t}", "function acf_prepare_fields_for_import($fields = array())\n{\n}", "function hungryfeed_init()\n{\n\n\t// register the MCE editor plugin if necessary\n\tif ( current_user_can('edit_posts') || current_user_can('edit_pages') )\n\t{\n\t\tif ( get_user_option('rich_editing') == 'true' && get_option('hungryfeed_enable_editor_button',HUNGRYFEED_DEFAULT_ENABLE_EDITOR_BUTTON))\n\t\t{\n\t\t\tadd_filter(\"mce_external_plugins\", \"hungryfeed_register_mce_plugin\");\n\t\t\tadd_filter('mce_buttons', 'hungryfeed_register_mce_buttons');\n\t\t}\n\t}\n}", "public function init() {\n do_action( 'wp_instagram_init' );\n }", "public function addSupport_CustomPermalinks(){\n $this->addFilter('post_type_link', 'postPermalink', 1, 3);\n $this->addFilter('post_link', 'postPermalink', 1, 3);\n $this->addFilter('term_link', 'termLink', 1, 3);\n $this->addFilter('author_link', 'userLink', 1, 3);\n $this->addFilter('get_comment_link', 'commentPermalink', 1, 2);\n }", "function _wp_post_thumbnail_class_filter_add($attr)\n{\n}", "function __construct() {\n\n\t\t$this->_extension_groups_options = self::get_option_data( self::EXTENSION_S2MEMBER );\n\n\t\tadd_action( WpSolrFilters::WPSOLR_ACTION_SOLARIUM_QUERY, array( $this, 'set_custom_query' ), 10, 1 );\n\n\t\tadd_filter( WpSolrFilters::WPSOLR_FILTER_POST_CUSTOM_FIELDS, array(\n\t\t\t$this,\n\t\t\t'filter_custom_fields'\n\t\t), 10, 2 );\n\n\t}", "public function initialize()\n {\n add_filter('site_icon_image_sizes', [$this, 'siteIconImageSizes']);\n add_filter('site_icon_meta_tags', [$this, 'siteIconMetaTags']);\n }", "function my_plugin_options() { \r\n\t//get the array\r\n\t$rssOptions = get_option(\"rssOptions\");\r\n\t\r\n\tif (empty($rssOptions['feed-url'])){$rssOptions['feed-url'] = 'http://feeds.feedburner.com/PlannedDiet';}\r\n\tif (empty($rssOptions['feed-trunc'])){$rssOptions['feed-trunc'] = 100;}\r\n\tif (empty($rssOptions['feed-title'])){$rssOptions['feed-title'] = 'Helpful Articles';}\r\n\tif (empty($rssOptions['feed_amount'])){$rssOptions['feed_amount'] = '3';}\r\n\t\r\n\t// set the checked option for the radio buttons\r\n\tif ($rssOptions['feed-enabled'] == 'no'){\r\n\t\t$rssYesChecked = '';\r\n\t\t$rssNoChecked = 'CHECKED';\r\n\t} else if ($rssOptions['feed-enabled'] == 'yes') {\r\n\t\t$rssYesChecked = 'CHECKED';\r\n\t\t$rssNoChecked = '';\r\n\t}\r\n\t\r\n\tif ($_POST['rss-submit']){\r\n\t\t\r\n\t\t\r\n\t\t// lets validate this feed before we save it\r\n\t\t$feedVal = validateFeed($_POST['rss-feed']);\r\n\t\tif ($feedVal == 1){\r\n\t\t\t$rssOptions['feed-url'] = $_POST['rss-feed'];\r\n\t\t} else {\r\n\t\t\techo '<div class=\"errorBox\"><b>There is something wrong with that feed.</b></div>';\r\n\t\t\t$fail = true;\r\n\t\t\t$failRss = true;\r\n\t\t}\r\n\t\t\r\n\t\t// set enabled option\r\n\t\t$rssOptions['feed-enabled'] = $_POST['rss-enabled'];\r\n\t\t\r\n\t\t// set the checked option for the radio buttons\r\n\t\tif ($rssOptions['feed-enabled'] == 'no'){\r\n\t\t\t$rssYesChecked = '';\r\n\t\t\t$rssNoChecked = 'CHECKED';\r\n\t\t} else if ($rssOptions['feed-enabled'] == 'yes') {\r\n\t\t\t$rssYesChecked = 'CHECKED';\r\n\t\t\t$rssNoChecked = '';\r\n\t\t}\r\n\t\t\r\n\t\t//set the trancation\r\n\t\t$rssOptions['feed-trunc'] = $_POST['rss-trunc'];\r\n\t\t\r\n\t\t//set item amount\r\n\t\t$rssOptions['feed_amount'] = $_POST['rss_amount'];\r\n\t\t\r\n\t\t// set the title\r\n\t\t$rssOptions['feed-title'] = $_POST['rss-title'];\r\n\t\tupdate_option(\"rssOptions\", $rssOptions);\r\n\t\t\r\n\t\tif (!$fail){\r\n\t\techo '<div class=\"savedBox\"><b>Your settings have been saved</b></div>';\r\n\t\t}\r\n\t\t\r\n\t} ?>\r\n \t\t\r\n <style type=\"text/css\"> \r\n .settingsArea\t{ background-color:#f1f1f1; padding:10px; width:500px; border:1px solid #e3e3e3; margin:10px 0px; position:relative; }\r\n\t .savedBox\t\t{ position:relative; width:500px; border:2px solid #229585; background-color:#c2f7f0; padding:10px; margin:20px 0px 0px}\r\n\t .errorBox\t\t{ position:relative; width:500px; border:2px solid #f7a468; background-color:#f7d8c2; padding:10px; margin:20px 0px 0px}\r\n\t .highlight\t\t{ border:2px solid #f7a468; background-color:#f7d8c2}\r\n\t \r\n\t .rssNotes\t\t{ background-color:#f5f6f7; border:1px solid #e3e3e3; padding:10px; font-size:90%; color:#666}\r\n\t </style>\r\n \r\n \r\n\t\t<script type=\"text/javascript\" src=\"<?php bloginfo('url'); ?>/wp-content/plugins/rss-2-post/scripts/jquery.js\"></script> \r\n <script language=\"JavaScript\" type=\"text/javascript\">\r\n\t\t$(document).ready(function(){\r\n\t\t\t$(\".errorBox\").animate( {opacity: 1.0}, 3000, function() {\r\n\t\t\t\t$(\".errorBox\").animate( {opacity: 0.5}, 2000, function() {\r\n\t\t\t\t\t$(\".errorBox\").slideUp(\"slow\");\r\n\t\t\t\t});\r\n\t\t\t}); \r\n\t\t\r\n\t\t\t$(\".savedBox\").animate( {opacity: 1.0}, 3000, function() {\r\n\t\t\t\t$(\".savedBox\").animate( {opacity: 0.5}, 2000, function() {\r\n\t\t\t\t\t$(\".savedBox\").slideUp(\"slow\");\r\n\t\t\t\t});\r\n\t\t\t}); \r\n\t\t});\r\n\t\t</script>\r\n \r\n <div class=\"wrap\">\r\n <h2><img src=\"<?php bloginfo('url'); ?>/wp-content/plugins/rss-2-post/images/rss-icon30.png\"/> RSS to Post Settings</h2>\r\n\t <div class=\"settingsArea\">\r\n <form name=\"socrates\" method=\"post\" enctype=\"multipart/form-data\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\"/>\r\n \t\t\r\n <p><strong>Enabled: &nbsp; &nbsp; &nbsp;</strong>\r\n Yes: <input type=\"radio\" name=\"rss-enabled\" value=\"yes\" <?php echo $rssYesChecked; ?>/> &nbsp; &nbsp;\r\n No: <input type=\"radio\" name=\"rss-enabled\" value=\"no\" <?php echo $rssNoChecked; ?>/><br>\r\n\t\t\t <small>Enable RSS to Post, you can disable on individual posts when creating a new post</small>.</p>\r\n \r\n <p>\r\n\t\t\t<b>Title:</b> <input type=\"text\" name=\"rss-title\" value=\"<?php echo $rssOptions['feed-title']; ?>\" /><br />\r\n <small>This title will appear before the rss feeds. Example: \"Helpful Articles\".</small></p>\r\n \r\n <p>\r\n\t\t\t<b>Truncate:</b> <input type=\"text\" size=\"7\" name=\"rss-trunc\" value=\"<?php echo $rssOptions['feed-trunc']; ?>\" /><br />\r\n <small>Numerical amount to truncate the feeds(100).</small></p>\r\n \r\n <p>\r\n\t\t\t<b>Amount of Items:</b> \r\n\t\t\t<input type=\"text\" size=\"3\" name=\"rss_amount\" value=\"<?php echo $rssOptions['feed_amount']; ?>\" /><br />\r\n <small>Numerical value for amount of feed items to display (1-10)</small></p>\r\n \r\n <p>\r\n <b>Default RSS Feed:</b> <input type=\"text\" size=\"50\" name=\"rss-feed\" class=\"<?php if ($failRss){ echo 'highlight'; } ?>\" \r\n \t\tvalue=\"<?php echo $rssOptions['feed-url']; ?>\" /><br />\r\n <small>Default RSS Feed to display if one is not set during publication.</small></p>\r\n \r\n <div class=\"rssNotes\">\r\n You can edit the style of your rss feeds with css using the classes below.<br />\r\n Simply add the classes to your style sheet and change as you see fit.<br />\r\n\t\t\t.rssEntree {}<br />\r\n .rssTitle {}<br />\r\n </div>\r\n \r\n <br />\r\n\r\n \r\n <input type=\"hidden\" id=\"rss-submit\" name=\"rss-submit\" value=\"1\" /> \r\n <input name=\"save\" value=\"Save\" type=\"submit\" />\r\n </form>\r\n </div>\r\n \r\n\r\n <h2>Default Feed Data</h2>\r\n <div class=\"settingsArea\">\r\n <?php\r\n\r\n\t\t// what are we parsing?\r\n\t\t$xml_file = $rssOptions['feed-url'];\r\n\t\t\r\n\t\t$xml = simplexml_load_file($xml_file);\r\n\t\t//print_r($xml);\r\n\t\t//echo $xml->channel; \r\n\t\t$i = 1;\r\n\t\tforeach ($xml->channel->item as $post){\r\n\t\t\t\r\n\t\t\tif ($i <= $rssOptions['feed_amount']){\r\n\t\t\t\t$i++;\r\n\t\t\t\techo '\r\n\t\t\t\t\t<div class=\"rssEntree\">\r\n\t\t\t\t\t\t<h3><a href=\"'.$post->link.'\">'.$post->title.' </a></h3>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t $shortdesc = myTruncate($post->description, $rssOptions['feed-trunc']);\r\n\t\t\t\t\t\t\r\n\t\t\t\techo '<p>'.$shortdesc.' </p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t} // foreach\t\t\r\n\r\n echo '</div></div>';\r\n}", "function _wpforo_filter_description_arguments( $defaults, $args ) {\n\n\t//* Disable internal requests only. Undocumentable, to be fixed later.\n\tif ( empty( $args['social'] ) && empty( $args['get_custom_field'] ) )\n\t\t$defaults['get_custom_field'] = false;\n\n\treturn $defaults;\n}" ]
[ "0.60613894", "0.60175943", "0.60175943", "0.59788257", "0.59247166", "0.59020466", "0.58583224", "0.5846452", "0.5830528", "0.58166414", "0.57896", "0.57869405", "0.57213956", "0.5718541", "0.56728554", "0.5649316", "0.5642927", "0.56203365", "0.5619225", "0.5618391", "0.56170607", "0.56168866", "0.5592572", "0.55902165", "0.5585739", "0.55784905", "0.5563884", "0.5561008", "0.5555748", "0.55497295", "0.5538995", "0.5536552", "0.5530727", "0.55274415", "0.55220544", "0.5521571", "0.55120254", "0.5488065", "0.54837996", "0.5483214", "0.5483214", "0.5475129", "0.5455082", "0.5444595", "0.54374737", "0.5435572", "0.5427625", "0.5426996", "0.5425747", "0.54128987", "0.5411876", "0.5408053", "0.5400634", "0.5400001", "0.53938067", "0.5392997", "0.53892094", "0.53839904", "0.53787214", "0.5363177", "0.535648", "0.5354456", "0.5354284", "0.5341933", "0.5340789", "0.5339646", "0.53345853", "0.5333541", "0.5325672", "0.53199697", "0.5313886", "0.53052485", "0.5293902", "0.5292003", "0.528998", "0.5289372", "0.52882147", "0.5275242", "0.5264707", "0.5263614", "0.52626777", "0.52592534", "0.52544224", "0.5254416", "0.52475023", "0.5246874", "0.5246052", "0.52459747", "0.5242047", "0.5237314", "0.5232427", "0.522735", "0.5224448", "0.5224309", "0.52204114", "0.5217685", "0.521758", "0.5215557", "0.52147484", "0.52133834" ]
0.73263705
0
'Article' is an article management module for ImpressCMS File: /include/comment.inc.php File holding functions used by the module to hook with the comment system of ImpressCMS
'Article' — это модуль управления статьями для ImpressCMS Файл: /include/comment.inc.php Файл, содержащий функции, используемые модулем для интеграции с системой комментариев ImpressCMS
function article_com_update($item_id, $total_num) { $article_article_handler = icms_getModuleHandler("article", basename(dirname(dirname(__FILE__))), "article"); $article_article_handler->updateComments($item_id, $total_num); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traitement_comments_article(){\n\n$listecommentaires = CommentsArticle($_GET['id']); \n\n$articles = displayArticleById($_GET['id']); \n\n$titre = format_url($articles['titre']);\n$nom_categ = format_url($articles['nom_categ']);\n\nif(!empty($_POST)){\n\n$idarticle = $_GET['id'];\n$usercomment = htmlspecialchars($_POST['user']);\n$contenucomment = htmlspecialchars($_POST['contenu']);\n$emailcomment = htmlspecialchars($_POST['email']);\n$id_user = htmlspecialchars($_POST['id_user']);\n\n$path = DisplayCategForArticle($articles['id']);\n\n$result = add_comment($idarticle, $usercomment, $contenucomment, $emailcomment, $id_user);\n\n if($result){\n $message = '<div class=\"messageOK\"><i class=\"fas fa-check\"></i>';\n $message .= '<p>Votre commentaire à été pris en compte</p>';\n $message .= '<p>il est en cours de modération</p>';\n $message .= '<img src=\"www/images/bx_loader.gif\" alt=\"chargement de la page\">';\n $message .= '</div>';\n }\n else{ \n $message = '<div class=\"messageError\"><i class=\"fas fa-exclamation-triangle\"></i>';\n $message .= '<p>Votre commentaire n\\'a pas été prise en compte</p>';\n $message .= '<img src=\"www/images/bx_loader.gif\" alt=\"chargement de la page\">';\n $message .= '</div>';\n }\n}\n\n$template = \"www/article/commentaires.phtml\";\nrequire \"www/layout.phtml\";\n\n}", "function BlogComments()\n{\n}", "function mod_core_blog() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n global $NeptuneComments;\n\t\t\n\t\t// Create new CommentEngine class if it doesn't already exist. \n\t\t// The CommentEngine will also create an SQL class so we don't\n\t\t// need to worry about that.\n\t\tif( !isset($NeptuneComments)) {\n\t\t\t$NeptuneComments = new NeptuneComments();\n\t\t}\n\n\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\n\t\t$NeptuneCore->var_set(\"theme\",\"altlayout\",\"layout_blog\"); \n\t\t\n\t\t$InitialQuery = $query;\n\t\tif (!array_key_exists(1,$query)) {\n\t\t\t$query[1] = 1;\n\t\t}\n\n\t\t$PostsPerPage = 10;\n\t\t$Offset = ( $query[1] * $PostsPerPage) - $PostsPerPage;\n\t\t\n\t\t$OffsetNext = $Offset + $PostsPerPage;\n\t\t$sql = $NeptuneSQL->query(\"SELECT * FROM `neptune_blog` ORDER BY `id` DESC LIMIT {$PostsPerPage} OFFSET {$OffsetNext} \");\n\t\tif ($result = $NeptuneSQL->fetch_array($sql)) {\n\t\t\t$MorePosts = true;\n\t\t} else {\n\t\t\t$MorePosts = false;\n\t\t}\n\t\t\n\t\t$sql = $NeptuneSQL->query(\"SELECT * FROM `neptune_blog` ORDER BY `id` DESC LIMIT {$PostsPerPage} OFFSET {$Offset}\");\n\n\n\t\t$Results = 0;\n\t\twhile ($result = $NeptuneSQL->fetch_array($sql)) {\n\t\t\t$Results++;\n\t\t\t$NeptuneCore->title($result[\"title\"]);\n\t\t\t\n\t\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t\t$NeptuneCore->var_set(\"output\",\"title_prepend\",\"<a href='?acp/article/edit/\" . $result[\"id\"] . \"'><!--[if !IE]>--><img src='resources/img/edit.svg' class='editButton'><!--<![endif]--><!--[if IE]><img src='resources/img/edit.png' class='editButton'><![endif]--></a>\");\n\t\t\t}\n\t\t\t\n\t\t\tif ($result[\"editor\"]) {\n\t\t\t\t$NeptuneCore->subtitle(\"Last modified on \" . date(\" F jS, Y \", strtotime($result['edited'])) . \" by \" . neptune_get_username_from_id($result[\"editor\"]));\n\t\t\t} else {\n\t\t\t\t$NeptuneCore->subtitle(\"Last modified on \" . date(\" F jS, Y \", strtotime($result['created'])) . \" by \" . neptune_get_username_from_id($result[\"author\"]));\n\t\t\t}\n\t\t\t\n\t\t\tif ($result[\"bbcode\"] == 1) {\n\t\t\t\t$NeptuneCore->neptune_echo_bbcode($result[\"content\"],2000);\n\t\t\t} else if ($result[\"bbcode\"] == 2) {\n\t\t\t\t$NeptuneCore->neptune_echo_markdown($result[\"content\"],true,2000);\n\t\t\t} else if ($result[\"bbcode\"] == 3) {\n\t\t\t\t$NeptuneCore->neptune_echo_textile($result[\"content\"],false,2000);\n\t\t\t} else {\n\t\t\t\t$NeptuneCore->neptune_echo(truncateHtml($result[\"content\"],2000));\n\t\t\t}\n\t\t\t\n\t\t\t$ResourceString = \"article/{$result[\"id\"]}\";\n\t\t\t\n\t\t\t$CommentData = $NeptuneComments->scan($ResourceString);\n\t\t\t$numComments = $CommentData[\"comments\"];\n\t\t\t\n\t\t\t$CommentString = \"<p><i class='icon-pencil'></i>&nbsp;<a href='?article/{$result[\"id\"]}'>There \" . pluralize(\" is \",\" are \",$numComments) . \"<b>$numComments</b>\" . pluralize(\" comment\",\" comments\",$numComments) . \".</a></p>\";\n\t\t\t$NeptuneCore->neptune_echo($CommentString);\n\t\t\trequire('theme/bootstrap/snippet_blog_article.php');\n\t\t}\n\t\t\n\t\tif ($Results == 0) {\n\t\t\t$NeptuneCore->var_del(\"theme\",\"altlayout\");\n\t\t\t$NeptuneCore->title(\"404 No Results Found\");\n\t\t\t$NeptuneCore->neptune_echo(\"No results were found for the requested query.\");\n\t\t} else {\n\t\t\tif (!array_key_exists(1,$InitialQuery)) {\n\t\t\t\t$NeptuneCore->var_set(\"output\",\"rawtitle\",true);\n\t\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"config\",\"sitename\"));\n\t\t\t} else {\n\t\t\t\t$NeptuneCore->title(\"Page \" . ($Offset + $PostsPerPage) / $PostsPerPage);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($query[1] > 1 || $MorePosts) {\n\t\t\t$NeptuneCore->neptune_echo(\"<hr>\");\n\t\t}\n\t\t\n\t\tif ($query[1] > 1) {\n\t\t\t$NeptuneCore->neptune_echo(\"<a href='?blog/\" . ($query[1] - 1) . \"' class='float-right'>Newer posts »</a>\");\n\t\t\t$NeptuneCore->neptune_echo(\"&nbsp;\");\n\t\t}\n\t\tif ($MorePosts) {\n\t\t\t$NeptuneCore->neptune_echo(\"<a href='?blog/\" . ($query[1] + 1) . \"'>« Older posts</a>\");\n\t\t}\n\t}", "function edit_comment()\n{\n}", "function actionComments()\r\n {\r\n $commentManagerr = new CommentManager();\r\n $actionComments = $commentManagerr->getCommentsForAction();\r\n require_once 'view/pagesSite/actionComments.php';\r\n }", "function the_comment()\n{\n}", "function article()\r\n {\r\n $articleId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n $articleManager = new ArticleManager();\r\n $commentManager = new CommentManager();\r\n\r\n $article = $articleManager->getArticle($articleId);\r\n $comments = $commentManager->getComments($articleId);\r\n require 'view/articleView.php';\r\n }", "function lim_process_comment(&$vars) {}", "function comment();", "function modifierCommentaire() {\n\t}", "function framework_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time('F jS, Y'); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),'framework','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"help\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.', 'framework') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function comment()\r\n{\r\n $commentManager = new \\OpenClassrooms\\Blog\\Model\\CommentManager();\r\n \r\n $comment = $commentManager->getComment($_GET['id']);\r\n \r\n require('view/frontend/commentView.php');\r\n\r\n}", "function actionCommentAdmin()\r\n {\r\n $articleId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_SPECIAL_CHARS);\r\n if(isset($articleId))\r\n {\r\n $action = $_GET['action'];\r\n $commentManager = new CommentManager();\r\n\r\n if($action == \"validationCurrentComment\")\r\n {\r\n $commentValidated = $commentManager->validationComment($articleId);\r\n }\r\n elseif($action == \"rejectCurrentComment\")\r\n {\r\n $commentValidated = $commentManager->refuseComment($articleId);\r\n }\r\n elseif($action == \"deleteCommentDashboard\")\r\n {\r\n $currentComment = $commentManager->getComment($articleId);\r\n //$commentId = $commentManager->getPost_id();\r\n $comments = $commentManager->deleteComment($articleId);\r\n }\r\n $actionComments = $commentManager->getCommentsForAction();\r\n require_once 'view/pagesSite/actionComments.php';\r\n }\r\n else\r\n {\r\n $commentManager = new CommentManager();\r\n $actionComments = $commentManager->getCommentsForAction();\r\n require_once 'view/pagesSite/actionComments.php';\r\n }\r\n }", "function appthemes_page_comment() {\n\t_deprecated_function( __FUNCTION__, '2012-11-30' );\n\n\tdo_action( 'appthemes_page_comment' );\n}", "function comment_text_rss()\n{\n}", "function commentChapter($id_chapter,$message){\n $chapterManager=new jeanForteroche\\Model\\ChapterManager;\n $commentsManager=new jeanForteroche\\Model\\CommentsManager;\n $post=$chapterManager->getChap($id_chapter);\n $comments=$commentsManager->getComments($id_chapter);\n $message=$message;\n require('view/frontend/pageComments.php');\n}", "function comments_rss()\n{\n}", "function CMT_userComments( $sid, $title, $type='article', $order='', $mode='', $pid = 0, $page = 1, $cid = false, $delete_option = false, $ccode = 0 )\n{\n global $_CONF, $_TABLES, $_USER, $LANG01;\n\n if( !empty( $_USER['uid'] ) ) {\n $result = DB_query( \"SELECT commentorder,commentmode,commentlimit FROM {$_TABLES['usercomment']} WHERE uid = '{$_USER['uid']}'\" );\n $U = DB_fetchArray( $result );\n if( empty( $order ) ) {\n $order = $U['commentorder'];\n }\n if( empty( $mode ) ) {\n $mode = $U['commentmode'];\n }\n $limit = $U['commentlimit'];\n }\n\n if( $order != 'ASC' && $order != 'DESC' ) {\n $order = 'ASC';\n }\n\n if( empty( $mode )) {\n $mode = $_CONF['comment_mode'];\n }\n\n if( empty( $limit )) {\n $limit = $_CONF['comment_limit'];\n }\n\n if( !is_numeric($page) || $page < 1 ) {\n $page = 1;\n }\n\n $start = $limit * ( $page - 1 );\n\n $template = new Template( $_CONF['path_layout'] . 'comment' );\n $template->set_file( array( 'commentarea' => 'startcomment.thtml' ));\n $template->set_var( 'xhtml', XHTML );\n $template->set_var( 'site_url', $_CONF['site_url'] );\n $template->set_var( 'site_admin_url', $_CONF['site_admin_url'] );\n $template->set_var( 'layout_url', $_CONF['layout_url'] );\n $template->set_var( 'commentbar',\n CMT_commentBar( $sid, $title, $type, $order, $mode, $ccode ));\n $template->set_var( 'sid', $sid );\n $template->set_var( 'comment_type', $type );\n\n if( $mode == 'nested' || $mode == 'threaded' || $mode == 'flat' ) {\n // build query\n switch( $mode ) {\n case 'flat':\n if( $cid ) {\n $count = 1;\n\n $q = \"SELECT c.*, u.username, u.fullname, u.photo, u.email, \"\n . \"UNIX_TIMESTAMP(c.date) AS nice_date \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['users']} AS u \"\n . \"WHERE c.uid = u.uid AND c.cid = $pid AND type='{$type}'\";\n } else {\n $count = DB_count( $_TABLES['comments'],\n array( 'sid', 'type' ), array( $sid, $type ));\n\n $q = \"SELECT c.*, u.username, u.fullname, u.photo, u.email, \"\n . \"UNIX_TIMESTAMP(c.date) AS nice_date \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['users']} AS u \"\n . \"WHERE c.uid = u.uid AND c.sid = '$sid' AND type='{$type}' \"\n . \"ORDER BY date $order LIMIT $start, $limit\";\n }\n break;\n\n case 'nested':\n case 'threaded':\n default:\n if( $order == 'DESC' ) {\n $cOrder = 'c.rht DESC';\n } else {\n $cOrder = 'c.lft ASC';\n }\n\n // We can simplify the query, and hence increase performance\n // when pid = 0 (when fetching all the comments for a given sid)\n if( $cid ) { // pid refers to commentid rather than parentid\n // count the total number of applicable comments\n $q2 = \"SELECT COUNT(*) \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['comments']} AS c2 \"\n . \"WHERE c.sid = '$sid' AND (c.lft >= c2.lft AND c.lft <= c2.rht) \"\n . \"AND c2.cid = $pid AND c.type='{$type}'\";\n $result = DB_query( $q2 );\n list( $count ) = DB_fetchArray( $result );\n\n $q = \"SELECT c.*, u.username, u.fullname, u.photo, u.email, c2.indent AS pindent, \"\n . \"UNIX_TIMESTAMP(c.date) AS nice_date \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['comments']} AS c2, \"\n . \"{$_TABLES['users']} AS u \"\n . \"WHERE c.sid = '$sid' AND (c.lft >= c2.lft AND c.lft <= c2.rht) \"\n . \"AND c2.cid = $pid AND c.uid = u.uid AND c.type='{$type}' \"\n . \"ORDER BY $cOrder LIMIT $start, $limit\";\n } else { // pid refers to parentid rather than commentid\n if( $pid == 0 ) { // the simple, fast case\n // count the total number of applicable comments\n $count = DB_count( $_TABLES['comments'],\n array( 'sid', 'type' ), array( $sid, $type ));\n\n $q = \"SELECT c.*, u.username, u.fullname, u.photo, u.email, 0 AS pindent, \"\n . \"UNIX_TIMESTAMP(c.date) AS nice_date \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['users']} AS u \"\n . \"WHERE c.sid = '$sid' AND c.uid = u.uid AND type='{$type}' \"\n . \"ORDER BY $cOrder LIMIT $start, $limit\";\n } else {\n // count the total number of applicable comments\n $q2 = \"SELECT COUNT(*) \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['comments']} AS c2 \"\n . \"WHERE c.sid = '$sid' AND (c.lft > c2.lft AND c.lft < c2.rht) \"\n . \"AND c2.cid = $pid AND c.type='{$type}'\";\n $result = DB_query($q2);\n list($count) = DB_fetchArray($result);\n\n $q = \"SELECT c.*, u.username, u.fullname, u.photo, u.email, c2.indent + 1 AS pindent, \"\n . \"UNIX_TIMESTAMP(c.date) AS nice_date \"\n . \"FROM {$_TABLES['comments']} AS c, {$_TABLES['comments']} AS c2, \"\n . \"{$_TABLES['users']} AS u \"\n . \"WHERE c.sid = '$sid' AND (c.lft > c2.lft AND c.lft < c2.rht) \"\n . \"AND c2.cid = $pid AND c.uid = u.uid AND c.type='{$type}' \"\n . \"ORDER BY $cOrder LIMIT $start, $limit\";\n }\n }\n break;\n }\n\n $thecomments = '';\n $result = DB_query( $q );\n $thecomments .= CMT_getComment( $result, $mode, $type, $order,\n $delete_option, false, $ccode );\n\n // Pagination\n $tot_pages = ceil($count / $limit);\n $pLink = $_CONF['site_url'] . \"/article.php?story=$sid&amp;type=$type&amp;order=$order&amp;mode=$mode\";\n $template->set_var('pagenav',\n COM_printPageNavigation($pLink, $page, $tot_pages));\n\n $template->set_var('comments', $thecomments);\n $retval = $template->finish($template->parse('output', 'commentarea'));\n }\n\n return $retval;\n}", "function moderated_comments_init() {\n\telgg_extend_view('css','moderated_comments/css');\n\telgg_register_js('moderated_comments', elgg_get_site_url() . \"mod/moderated_comments/js/javascript.js\");\n\n\t//register action to approve/delete comments\n\telgg_register_action(\"annotation/review\", elgg_get_plugins_path() . \"moderated_comments/actions/annotation/review.php\");\n\telgg_register_action(\"comments/anon_add\", elgg_get_plugins_path() . \"moderated_comments/actions/comments/anon_add.php\", 'public');\n\t\n\t// register plugin hook to monitor comment counts - return only the count of approved comments\n\telgg_register_plugin_hook_handler('comments:count', 'all', 'moderated_comments_comment_count', 1000); \n\t\n // override permissions for the rssimport_cron context\n\telgg_register_plugin_hook_handler('permissions_check', 'all', 'moderated_comments_permissions_check');\t\n \n // prevent complications with editable comments\n elgg_register_plugin_hook_handler('editablecomments:canedit', 'comment', 'moderated_comments_editablecomments_check');\n}", "function onBeforePublish($comment_id){}", "function addComments($comment, $language='en', $article_id, $old_article) \n {\n global $feeback, $conn;\n $qu = \"\";\n $qi = \"\";\n $qcw = \"\";\n if (user_is_loggedin()) {\n $qu .= \"creation_user_id = '\".User::getID().\"', creation_role = '\".User::getRole().\"', \";\n $qi .= \"'\".User::getRole().\"', '\".User::getID().\"', \";\n $qcw .= \"AND creation_user_id = '\".User::getID().\"' AND creation_role = '\".User::getRole().\"' \";\n } elseif (client_is_loggedin()) {\n $qu .= \"creation_user_id = '\".Client::getID().\"', creation_role = 'client', \";\n $qi .= \"'client', '\".Client::getID().\"', \";\n $qcw .= \"AND creation_user_id = '\".Client::getID().\"' AND creation_role = 'client' \";\n } else {\n $feedback = \"Please sign in this system\";\n return false;\n }\n\n $q = \"SELECT COUNT(*) AS count FROM comments_on_articles \".\n \"WHERE article_id = '\".$article_id.\"' AND comment = '\".$comment.\"' \".\n \"AND version_number = '\".$old_article['current_version_number'].\"' \".$qcw;\n $rs = &$conn->Execute($q);\n $do_comment = true;\n if ($rs) {\n if ($rs->fields['count'] > 0) {\n $do_comment = false;\n }\n $rs->Close();\n }\n\n //add comments\n if ($comment != '' && $do_comment) {//do comment\n $comment_id = $conn->GenID('seq_comments_on_articles_comment_id');\n $q = \"INSERT INTO comments_on_articles (`comment_id`, `article_id`, `creation_role`, `creation_user_id`, \".\n \"`creation_date`, `language`, `comment`, `version_number`) \".\n \"VALUES ('\".$comment_id.\"', \".\n \"'\".$article_id.\"', \".$qi.\n \"'\".date('Y-m-d H:i:s').\"', \".\n \"'\".$language.\"', \".\n \"'\".$comment.\"', \".\n \"'\".$old_article['current_version_number'].\"')\";\n $conn->Execute($q);\n }\n\n if ($conn->Affected_Rows() > 0) {\n return true;\n } else {\n return false;\n }\n }", "function pse_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "public function comments()\n {\n\n }", "public function comments(){\n }", "public function the_comment()\n {\n }", "function onContentBeforeDisplay( $context, &$article, &$params) /*J16*/\n {\n if (!class_exists('cmsFramework') || !class_exists('Sanitize')) return;\n\n $this->setCmsVersion();\n\n // Check whether to perform the replacement or not\n $option = Sanitize::getString($_REQUEST, 'option', '');\n $view = Sanitize::getString($_REQUEST, 'view', '');\n $layout = Sanitize::getString($_REQUEST, 'layout', '');\n $id = Sanitize::getInt($_REQUEST,'id');\n\n \t\tif($option == 'com_content' && $view == 'featured') {\n \t\t\tif(!$this->articleinJReviewsCategory($article->id)) return;\n \t\t}\n\n if($option == 'com_content' && ($layout == 'blog' || $view == 'featured'))\n {\n $row = &$article;\n $row->text = &$row->introtext;\n if(\n (isset($row->params) || isset($row->parameters))\n && isset($row->id) && $row->id > 0\n && isset($row->catid) && $row->catid > 0\n ) {\n $cache_file = S2CacheKey('jreviews_config');\n\n $Config = S2Cache::read($cache_file,'_s2framework_core_');\n\n $debug = false;\n\n $debug_php = Sanitize::getBool($Config,'debug_enable',false);\n\n $debug_ipaddress = Sanitize::getString($Config,'debug_ipaddress');\n\n if($debug_php &&\n ($debug_ipaddress == '' || $debug_ipaddress == s2GetIpAddress())) {\n\n $debug = true;\n }\n\n $Dispatcher = new S2Dispatcher(array('app'=>'jreviews','debug'=>$debug));\n\n if ($option=='com_content' && $view == 'article' & $id > 0)\n {\n $_GET['url'] = 'com_content/com_content_view';\n }\n elseif ($option=='com_content' && (($layout == 'blog' && $view=='category') || $view == 'featured'))\n {\n $_GET['url'] = 'com_content/com_content_blog';\n }\n\n $passedArgs = array(\n 'params'=>$params,\n 'row'=>$row,\n 'component'=>'com_content'\n );\n\n $passedArgs['cat'] = $row->catid;\n $passedArgs['listing_id'] = $row->id;\n\n $output = $Dispatcher->dispatch($passedArgs);\n\n if($output)\n {\n $row = &$output['row'];\n unset($params);\n $params = &$output['params'];\n }\n\n /**\n * Store a copy of the $listing and $crumbs arrays in memory for use in the onBeforeDisplayContent method\n */\n ClassRegistry::setObject(array('listing'=>&$output['listing'],'crumbs'=>&$output['crumbs']),'jreviewsplugin');\n\n // Destroy pathway\n if(!empty($output['crumbs']))\n {\n cmsFramework::setPathway(array());\n }\n\n unset($output,$passedArgs,$Dispatcher);\n }\n }\n /***********************************************************************\n * ABOVE BLOCK HERE BECAUSE J16 DOESN'T MAKE THE WHOLE ARTICLE OBJECT\n * AVAILABLE IN THE ONCONTENTPREPARE CALLBACK IN BLOG LAYOUT PAGES\n ***********************************************************************/\n\n if (!class_exists('cmsFramework') || !class_exists('Sanitize')) return;\n\n // Make sure this is a Joomla article page\n $option = Sanitize::getString($_REQUEST, 'option', '');\n\n $view = Sanitize::getString($_REQUEST, 'view', '');\n\n $layout = Sanitize::getString($_REQUEST, 'layout', '');\n\n $id = Sanitize::getInt($_REQUEST,'id');\n\n if(!($option == 'com_content' && $view == 'article' && $id)) return;\n\n /**\n * Retrieve $listing array from memory\n */\n $Config = Configure::read('JreviewsSystem.Config');\n\n if(Sanitize::getInt($Config,'override_listing_title')) {\n\n $title = '{title}';\n }\n else {\n\n $title = trim(Sanitize::getString($Config,'type_metatitle'));\n }\n\n if($this->cms_version >= 1.6) {\n\n // Allow title override via article menu\n if(!$params->exists('display_num') && $params->get('page_title') != '') {\n\n $params->set('page_title',$params->get('page_title'));\n }\n else {\n\n $params->set('page_title',$article->title); // Fixes J16 bug that uses cat menu title as page title\n }\n }\n\n $keywords = trim(Sanitize::getString($Config,'type_metakey'));\n\n $description = trim(Sanitize::getString($Config,'type_metadesc'));\n\n $listing = classRegistry::getObject('listing','jreviewsplugin'); // Has all the data that's also available in the detail.thtml theme file so you can create any sort of conditionals with it\n\n $crumbs = classRegistry::getObject('crumbs','jreviewsplugin');\n\n if($title != '' || $keywords != '' || $description != '')\n {\n\n if($listing && is_array($listing))\n {\n // Get and process all tags\n $tags = plgContentJreviews::extractTags($title.$keywords.$description);\n $tags_array = array();\n foreach($tags AS $tag)\n {\n switch($tag)\n {\n case 'title':\n $tags_array['{title}'] = Sanitize::stripAll($listing['Listing'],'title');\n break;\n case 'directory':\n $tags_array['{directory}'] = Sanitize::stripAll($listing['Directory'],'title');\n break;\n case 'category':\n $tags_array['{category}'] = Sanitize::stripAll($listing['Category'],'title');\n break;\n case 'metakey':\n $tags_array['{metakey}'] = Sanitize::stripAll($listing['Listing'],'metakey');\n break;\n case 'metadesc':\n $tags_array['{metadesc}'] = Sanitize::stripAll($listing['Listing'],'metadesc');\n break;\n case 'summary':\n $tags_array['{summary}'] = Sanitize::htmlClean(Sanitize::stripAll($listing['Listing'],'summary'));\n break;\n case 'description':\n $tags_array['{description}'] = Sanitize::htmlClean(Sanitize::stripAll($listing['Listing'],'description'));\n break;\n default:\n if(substr($tag,0,3) == 'jr_')\n {\n $fields = $listing['Field']['pairs'];\n $tags_array['{'.$tag.'}'] = isset($listing['Field']['pairs'][$tag]) && isset($fields[$tag]['text']) ? html_entity_decode(implode(\", \", $fields[$tag]['text']),ENT_QUOTES,'utf-8') : '';\n }\n break;\n }\n }\n\n # Process title\n $title != '' and $title = str_replace('&amp;','&',str_replace(array_keys($tags_array),$tags_array,$title)) and cmsFramework::meta('title', $title);\n $title != '' and $this->cms_version >= 1.6 and $params->set('page_title',$title);\n\n # Process description\n $description != '' and $description= str_replace('&amp;','&',str_replace(array_keys($tags_array),$tags_array,$description)) and cmsFramework::meta('description', $description);\n $description != ''and $this->cms_version >= 1.6 and $article->metadesc = htmlspecialchars($description,ENT_COMPAT,'utf-8');\n\n # Process keywords\n $keywords != '' and $keywords = mb_strtolower(str_replace('&amp;','&',str_replace(array_keys($tags_array),$tags_array,$keywords)),'utf-8') and cmsFramework::meta('keywords', $keywords);\n $keywords != '' and $this->cms_version >= 1.6 and $article->metakey = htmlspecialchars($keywords,ENT_COMPAT,'utf-8');\n }\n }\n elseif(\n isset($article->parameters)\n && $article->parameters->get('show_page_title')\n && $article->parameters->get('num_leading_articles') == '' /* run only if it's an article menu */\n && $article->parameters->get('filter_type') == '' /* run only if it's an article menu */\n ) {\n $title = $article->parameters->get('page_title');\n $title != '' and $params->set('page_title',$title);\n }\n\n if($crumbs && !empty($crumbs))\n {\n \t\t\tarray_pop($crumbs); // Remove extra title from breadcrumb because it's automatically appended by Joomla\n\n cmsFramework::setPathway($crumbs);\n }\n\n $this->facebookOpenGraph($listing, compact('title','keywords','description'));\n }", "function onBeforeEdit($comment_id){}", "function beans_comment_content() {\n\n\techo beans_output( 'beans_comment_content', beans_render_function( comment_text() ) );\n\n}", "function ncstate_official_preprocess_comment_wrapper(&$variables) {\n if ($variables['content'] && $variables['node']->type != 'forum') {\n $variables['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $variables['content'];\n }\n}", "function CMT_prepareText($comment, $postmode, $type, $edit = false, $cid = null)\n{\n global $_USER, $_TABLES, $LANG03, $_CONF; \n \n if ($postmode == 'html') {\n $html_perm = ($type == 'article') ? 'story.edit' : \"$type.edit\";\n $comment = COM_checkWords(COM_checkHTML(COM_stripslashes($comment),\n $html_perm));\n } else {\n \t// plaintext\n $comment = htmlspecialchars(COM_checkWords(COM_stripslashes($comment)));\n $newcomment = COM_makeClickableLinks ($comment);\n if (strcmp ($comment, $newcomment) != 0) {\n $comment = nl2br ($newcomment);\n }\n }\n \n if ($edit) {\n $comment .= '<div class=\"comment-edit\">' . $LANG03[30] . ' '\n . strftime($_CONF['date'], time()) . ' ' .$LANG03[31] .' ' \n . $_USER['username'] . '</div><!-- /COMMENTEDIT -->';\n $text = $comment;\n \n }\n \n if (empty ($_USER['uid'])) {\n $uid = 1;\n } elseif ($edit && is_numeric($cid) ){\n //if comment moderator\n $uid = DB_getItem ($_TABLES['comments'], 'uid', \"cid = '$cid'\");\n } else {\n $uid = $_USER['uid'];\n }\n \n $sig = '';\n if ($uid > 1) {\n $sig = DB_getItem ($_TABLES['users'], 'sig', \"uid = '$uid'\");\n if (!empty ($sig)) {\n $comment .= '<!-- COMMENTSIG --><div class=\"comment-sig\">';\n if ( $postmode == 'html') {\n $comment .= '---<br' . XHTML . '>' . nl2br($sig);\n } else {\n $comment .= '---' . LB . $sig;\n }\n $comment .= '</div><!-- /COMMENTSIG -->';\n }\n }\n \n return $comment;\n}", "function edit_comment($comment)\n {\n }", "function dispXedocsModifyComment()\n {\n\n if(!$this->grant->write_comment){\n return $this->dispXedocsMessage('msg_not_permitted');\n }\n\n\n $document_srl = Context::get('document_srl');\n $comment_srl = Context::get('comment_srl');\n\n\n if(!$comment_srl) {\n return new Object(-1, 'msg_invalid_request');\n }\n\n $oCommentModel = &getModel('comment');\n $oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager);\n\n if(!$oComment->isExists()) {\n return $this->dispXedocsMessage('msg_invalid_request');\n }\n\n if(!$oComment->isGranted()) {\n\t\t\t\t\t\treturn new Object(-1,'msg_not_permitted');\n }\n\n Context::set('oSourceComment', $oCommentModel->getComment());\n Context::set('oComment', $oComment);\n\n Context::addJsFilter($this->module_path.'tpl/filter', 'insert_comment.xml');\n\n /* Set custom editor for comments instead of default one */\n $oEditorModel = &getModel('editor');\n\n // get an editor\n $option->primary_key_name = 'comment_srl';\n $option->content_key_name = 'content';\n $option->allow_fileupload = false;\n $option->enable_autosave = false;\n $option->disable_html = true;\n $option->enable_default_component = false;\n $option->enable_component = false;\n $option->resizable = true;\n $option->height = 150;\n $editor = $oEditorModel->getEditor(0, $option);\n Context::set('editor', $editor);\n\n $oDocumentModel = &getModel(\"document\");\n $oDocument = $oDocumentModel->getDocument($document_srl);\n Context::set('oDocument', $oDocument);\n\n /* Get manual tree */\n $module_srl=$oDocument->get('module_srl');\n $this->_loadSidebarTreeMenu($module_srl, $document_srl);\n\n $this->setTemplateFile('document_view');\n Context::addJsFilter($this->module_path.'tpl/filter', 'delete_comment.xml');\n }", "function informal_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n\n if (get_comment_type() == 'pingback' || get_comment_type() == 'trackback') : ?>\n\n <li class=\"pingback\" id=\"comment-<?php comment_ID(); ?>\">\n\n <article <?php comment_class('clearfix'); ?>>\n\n <header>\n\n <h4><?php _e('Pingback:', THEMEDOMAIN); ?></h4>\n <p><?php edit_comment_link(); ?></p>\n\n </header>\n\n <?php comment_author_link(); ?>\n\n </article>\n\n <?php endif; ?>\n\n <?php if (get_comment_type() == 'comment') : ?>\n <li id=\"comment-<?php comment_ID(); ?>\">\n <article <?php comment_class('clearfix'); ?>>\n <figure class=\"comment-avatar\">\n <?php\n $avatar_size = 80;\n if ($comment->comment_parent != 0) {\n $avatar_size = 48;\n }\n\n echo get_avatar($comment, $avatar_size);\n ?>\n </figure>\n\n <div class=\"comment-wrapper\">\n <div class=\"comment-info\">\n <h4><span><?php _e('AUTOR', THEMEDOMAIN); ?></span> <?php comment_author_link(); ?> <?php //comment_date(); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?></h4>\n <!-- <p></p> -->\n <p><span>Comentario</span></p>\n </div><!-- end comment-info -->\n\n <div class=\"comment-text\">\n\n <?php if ($comment->comment_approved == '0') : ?>\n\n <p class=\"awaiting-moderation text-center\"><?php _e('Tu comentario está esperando ser moderado.', THEMEDOMAIN); ?></p>\n\n <?php endif; ?>\n\n <?php comment_text(); ?>\n\n </div><!-- end comment-text -->\n </div><!-- end comment-wrapper -->\n </article>\n <?php endif;\n}", "function comments_link_feed()\n{\n}", "function comment_excerpt($comment_ID = 0)\n{\n}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function ascent_comments_before() {\n\tdo_action( 'ascent_comments_before' );\n}", "function comment_author_rss()\n{\n}", "function doc_preprocess_comment_wrapper(&$vars) {\r\n if (!isset($vars['content'])) return;\r\n \r\n ob_start();?>\r\n<div class=\"art-post\">\r\n <div class=\"art-post-body\">\r\n <div class=\"art-post-inner\">\r\n \r\n <?php $result .= ob_get_clean();\r\n \r\n if ($vars['node']->type != 'forum') {\r\n $result .= '<h2 class=\"art-postheader comments\">' . t('Comments') . '</h2>';\r\n }\r\n \r\n ob_start();?>\r\n<div class=\"art-postcontent\">\r\n \r\n <?php $result .= ob_get_clean();\r\n \r\n $result .= $vars['content'];\r\n ob_start();?>\r\n\r\n </div>\r\n <div class=\"cleared\"></div>\r\n \r\n <?php $result .= ob_get_clean();\r\n \r\n ob_start();?>\r\n\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <?php $result .= ob_get_clean();\r\n \r\n $vars['content'] = $result;\r\n}", "function parallax_hook_comments_before() {\n \tdo_action( 'parallax_comments_before' );\n \tdo_action( 'tha_comments_before' );\n }", "function addChap($titre, $chapitre)\r\n{\r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n\r\n $affectedLines = $postManager->postChap($titre, $chapitre);\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n }\r\n else {\r\n require('view/frontend/adminView.php'); \r\n }\r\n}", "function have_comments()\n{\n}", "function modify($event = false)\r\n {\r\n \tglobal $mainframe;\r\n $user = JFactory::getUser();\r\n\r\n if (!$event) {\r\n if (!$user->username && $this->_only_registered) {\r\n\t\t\t\t/* only registered */\r\n JOSC_utils::showMessage(_JOOMLACOMMENT_ONLYREGISTERED);\r\n } else {\r\n \tif (!($this->_captcha && !JOSC_security::captchaResult(true))) {\r\n\t\t\t\t\t/* captcha ok */\r\n\t $published = $this->insertNewPost();\r\n \t unset($this->_tcomment);\r\n\t\t\t\t\t$this->_comObject->cleanComponentCache();\r\n\t\t\t\t\tif ($published) {\r\n \t \t$mainframe->redirect($this->_comObject->linkToContent($this->_content_id, $this->_comment_id));\r\n\t\t\t\t\t} else {\r\n \t \t\t$mainframe->redirect($this->_comObject->linkToContent($this->_content_id), _JOOMLACOMMENT_BEFORE_APPROVAL);\r\n\t\t\t\t\t}\r\n \t}\r\n }\r\n $mainframe->redirect($this->_comObject->linkToContent($this->_content_id, $this->_comment_id));\r\n }\r\n \t$header = 'Content-Type: text/xml; charset=utf-8'; //.$this->_local_charset;\r\n \theader($header);\r\n if (!($this->_captcha && !JOSC_security::captchaResult(true))) {\r\n $item = $this->$event(true);\r\n if (!$item) exit();\r\n $this->parse();\r\n $xml = '<?xml version=\"1.0\" standalone=\"yes\"?>';\r\n $xml .= '<post>';\r\n $xml .= '<id>' . $item['id'] . '</id>';\r\n if ($this->_tree && isset($item['after'])) $xml .= '<after>' . $item['after'] . '</after>';\r\n $xml .= '<published>' \t. $item['view'] \t. '</published>';\r\n $xml .= '<noerror>' \t. $item['noerror'] \t. '</noerror>';\r\n $xml .= '<debug>'\t\t. $item['debug'] \t. '</debug>';\r\n if ($item['view']) {\r\n\t $html = JOSC_utils::cdata(JOSC_utils::filter($this->encodeData_Charset($this->insertPost($item, ''))));\r\n \t $xml .= \"<body>$html</body>\";\r\n }\r\n if ($this->_captcha) {\r\n $captcha = JOSC_utils::cdata(JOSC_security::insertCaptcha('security_refid'));\r\n $xml .= \"<captcha>$captcha</captcha>\";\r\n }\r\n $xml .= '</post>';\r\n\t\t\t$this->_comObject->cleanComponentCache();\r\n exit($xml);\r\n } else if ($this->_captcha) {\r\n $xml = $this->xml_refreshCaptcha(true);\r\n exit($xml);\r\n } else exit;\r\n }", "public function addCommentAction()\n {\n }", "function preprocessArticles() { }", "function list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n?>\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"icon icon-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\n<?php\n\n}", "function adminComments()\r\n{\r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n $commentManager = new \\OpenClassrooms\\Blog\\Model\\CommentManager();\r\n\r\n $comments = $commentManager->getAllComments();\r\n \r\n $signaledComments = $commentManager->getSignaledComments();\r\n \r\n $chaps = $postManager->getChaps();\r\n $arrayChaps = $chaps->fetchAll();\r\n\r\n require('view/frontend/adminCommentsView.php');\r\n}", "function addComment($postId, $author, $comment)\r\n{\r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n $chap = $postManager->getChap($_GET['id']);\r\n \r\n $commentManager = new \\OpenClassrooms\\Blog\\Model\\CommentManager();\r\n\r\n $affectedLines = $commentManager->postComment($postId, $chap['title'], $author, $comment);\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n }\r\n else {\r\n header('Location: index.php?action=oneChap&id=' . $postId);\r\n }\r\n}", "function comment_ID()\n{\n}", "function add_comment($paw,$comment,$DBconn) {\n \n}", "function add_comments_page($page_title, $menu_title, $capability, $menu_slug, $function = '')\n{\n}", "private /*String*/ function getArticle() { ?>\n<<<<<<< HEAD\n\t\t<ul data-role=\"listview\" data-filter=\"true\" data-theme=\"c\" data-dividertheme=\"b\" >\n\t\t<li data-role=\"list-divider\" data-theme='b'>Pending</li>\n\t\t\t<?php $i=0 ?>\n\t\t\t<?php \n\t\t\t$request = new Request(\"FindRequestHandler\", READ);\n=======\n\t\t<ul data-role=\"listview\" data-filter=\"true\" data-theme=\"c\" data-dividertheme=\"a\" >\n\t\t\t\t<?php $i=0 ?>\n\t\t\t\t<?php \n\t\t\t\t$request = new Request(\"FindRequestHandler\", READ);\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t \t$request->addArgument(\"application\", APPLICATION_NAME . \"_ADMIN\");\n\t\t \t$request->addArgument(\"predicate\", \"commentGroup\" . APPLICATION_NAME);\n\t\t \t$responsejSon = $request->send();\n\t\t \t$responseObject = json_decode($responsejSon);\n\t\t \tif($responseObject->status == 200) {\n\t\t\t \tforeach(json_decode($responseObject->data->results) as $controller) { ?>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<!-- RESULT DETAILS -->\n\t\t\t\t\t\t\t<form action=\"#EditCommentView\" method=\"post\" name=\"getCommentDetailForm<?= $i ?>\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"application\" value=\"<?= APPLICATION_NAME ?>_ADMIN\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"method\" value=\"getDetail\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"user\" value=\"<?= $controller->publisherID ?>\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"predicate\" value=\"<?= $controller->predicate ?>\" />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"document.getCommentDetailForm<?= $i ?>.submit()\">\n\t\t\t\t\t\t\t\t<?= $controller->data ?>\n<<<<<<< HEAD\n\t\t\t\t\t\t\t\t<span style=\"margin-right:10px;\" class=\"ui-li-aside ui-link\" ><?= $controller->publisherName ?></span>\n=======\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php $i++ ?>\n\t\t\t\t\t<?php } ?>\n<<<<<<< HEAD\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t<?php echo \"<h3><center>Nessun commento in Pending</center></h3>\";?>\n\t\t\t\t<?php } ?>\n\t\t\t<br/>\n\t\t\t<li data-role=\"list-divider\" data-theme='b'>Validated</li>\n\t\t\t<?php \n\t\t\t$request = new Request(\"FindRequestHandler\", READ);\n\t\t \t$request->addArgument(\"application\", APPLICATION_NAME);\n\t\t \t$request->addArgument(\"predicate\", \"commentGroup\" . APPLICATION_NAME);\n\t\t \t$responsejSon = $request->send();\n\t\t \t$responseObject = json_decode($responsejSon);\n\t\t \tif($responseObject->status == 200) {\n\t\t\t \tforeach(json_decode($responseObject->data->results) as $controller) { ?>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<!-- RESULT DETAILS -->\n\t\t\t\t\t\t\t<form action=\"#EditCommentView\" method=\"post\" name=\"getCommentDetailForm<?= $i ?>\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"application\" value=\"<?= APPLICATION_NAME ?>\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"method\" value=\"getDetail\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"user\" value=\"<?= $controller->publisherID ?>\" />\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"predicate\" value=\"<?= $controller->predicate ?>\" />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"document.getCommentDetailForm<?= $i ?>.submit()\">\n\t\t\t\t\t\t\t\t<?= $controller->data ?>\n\t\t\t\t\t\t\t\t<span style=\"margin-right:10px;\" class=\"ui-li-aside ui-link\" ><?= $controller->publisherName ?></span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php $i++ ?>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t<?php echo \"<h3><center>Nessun commento Validated</center></h3>\";?>\n=======\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t<?php } ?>\n\t\t\t</ul>\n\t\t\t<br/><br/>\n\t<?php }", "function admin_comments() {\n\t$action=$_GET['action'];\n\tif ($action == \"edit\" && isset($_GET['edit'])) {\n\t\t$id=$_GET['edit'];\n\t\techo \"<b>Editing comment number $id...</b>\";\n\t\t\n\t\t$query=\"SELECT * FROM comments WHERE id = '$id' LIMIT 1\";\n\t\t$result=mysql_query($query);\n\t\t\n\t\t$article_id=htmlentities(mysql_result($result,$i,\"article\"));\n\t\t$comment_user=htmlentities(mysql_result($result,$i,\"username\"));\n\t\t$comment=htmlentities(mysql_result($result,$i,\"comment\"));\n\t\t$comment=stripslashes($comment);\n\t\t\n\t\techo \"<form action=\\\"index.php?module=admin&admin=comments&action=editupdate&edit=$id\\\" method=\\\"POST\\\">\";\n\t\techo \"<table>\";\n\t\techo \"<tr>\";\n\t\techo \"<td>Article ID:</td> <td><input type=\\\"text\\\" name=\\\"article_id\\\" size=70 value=\\\"$article_id\\\" /></td>\";\n\t\techo \"</tr>\";\n\t\techo \"<tr>\";\n\t\techo \"<td>Comment User:</td> <td><input type=\\\"text\\\" name=\\\"comment_user\\\" size=70 value=\\\"$comment_user\\\" /></td>\";\n\t\techo \"</tr>\";\n\t\techo \"<tr>\";\n\t\techo \"<td>Comment:</td> <td><textarea cols=\\\"68\\\" rows=\\\"20\\\" name=\\\"comment\\\">$comment</textarea></td>\";\n\t\techo \"</tr>\";\n\t\techo \"<tr><td><input type=\\\"submit\\\" value=\\\"Apply\\\" name=\\\"submit\\\" /></td><td><input type=\\\"reset\\\" value=\\\"Reset\\\" name=\\\"reset\\\" /></td></tr>\";\n\t\techo \"</table>\";\n\t\techo \"</form>\";\n\t} elseif ($action == \"editupdate\" && isset($_GET['edit'])) {\n\t\t$id=$_GET['edit'];\n\t\techo \"<b>Updating Comment number $id...</b><br />\";\n\t\t$article_id=$_POST['article_id'];\n\t\t$comment_user=$_POST['comment_user'];\n\t\t$comment=$_POST['comment'];\n\t\t$comment = eregi_replace(\"fuck\", \"****\", $comment);\n\t\t$comment = eregi_replace(\"piss\", \"****\", $comment);\n\t\t$comment = eregi_replace(\"shit\", \"****\", $comment);\n\t\t$comment = eregi_replace(\"cunt\", \"****\", $comment);\n\t\t$comment = eregi_replace(\"dick\", \"****\", $comment);\n\t\t$comment = eregi_replace(\"bastard\", \"*******\", $comment);\n\t\t$comment = preg_replace(\"[\\n]\", \"<br />\", $comment);\n\t\t$comment = str_replace(\" i \", \" I \", $comment);\n\t\t$comment = addslashes($comment);\n\t\t$query=\"UPDATE comments SET article='$article_id', username='$comment_user', comment='$comment' WHERE id = '$id' LIMIT 1\";\n\t\t$result=mysql_query($query);\n\t\techo \"Comment updated successfully\";\n\t} elseif ($action == \"delete\" && isset($_GET['delete'])) {\n\t\t$id=$_GET['delete'];\n\t\techo \"<b>Deleting Article number $id...</b><br />\";\n\t\t$query=\"DELETE FROM comments WHERE id='$id' LIMIT 1\";\n\t\t$result=mysql_query($query);\n\t\techo \"Comment deleted successfully\";\n\t} else {\n\t\techo \"<table>\";\n\t\techo \"<tr>\";\n\t\techo \"<td><b>Comment ID:</b></td><td><b>Article ID:</b></td><td><b>Comment Poster:</b></td><td><b>Actions:</b></td>\";\n\t\techo \"</tr>\";\n\t\t\n\t\t$query=\"SELECT * FROM comments ORDER BY id DESC\";\n\t\t$result=mysql_query($query);\n\t\t$num=mysql_numrows($result);\n\t\t\n\t\t$i=0;\n\t\twhile ($i < $num) {\n\t\t\t$id=mysql_result($result,$i,\"id\");\n\t\t\t$article_id=mysql_result($result,$i,\"article\");\n\t\t\t$comment_user=mysql_result($result,$i,\"username\");\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td>$id</td><td>$article_id</td><td>$comment_user</td><td><a href=\\\"index.php?module=admin&admin=comments&action=edit&edit=$id\\\">Edit</a> <a href=\\\"index.php?module=admin&admin=comments&action=delete&delete=$id\\\">Delete</a></td>\";\n\t\t\techo \"</tr>\";\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\techo \"</table>\";\n\t}\n}", "function SimplyCivi_comment_wrapper($content, $node) {\n global $user;\n $output = '';\n\n if ($node = menu_get_object()) {\n if ($node->type != 'forum') {\n $count = ($node->comment_count > 0) ? format_plural($node->comment_count, '1 comment', '@count comments') : t('No comments available.');\n $output .= '<h3 id=\"comment-number\">'. $count .'</h3>';\n }\n }\n\n $output .= '<div id=\"comments\">';\n $msg = '';\n if (!user_access('post comments')) {\n $dest = 'destination='. $_GET['q'] .'#comment-form';\n $msg = '<div id=\"messages\"><div class=\"error-wrapper\"><div class=\"messages error\">'. t('Please <a href=\"!register\">register</a> or <a href=\"!login\">login</a> to post a comment.', array('!register' => url(\"user/register\", array('query' => $dest)), '!login' => url('user', array('query' => $dest)))) .'</div></div></div>';\n }\n $output .= $content;\n $output .= $msg;\n\n return $output .'</div>';\n}", "function commentAdmin($allowComment ,$commentID) {\r\n\t$commentManagerInstance = new commentManager();\r\n\tif ( $allowComment === \"true\" ) {\r\n\t\t$commentManagerInstance->allowComment($commentID);\r\n\t\t} \r\n\tif ( $allowComment === \"false\" ) {\r\n\t\t$commentManagerInstance->deleteComment($commentID);\r\n\t\t} \r\n}", "public function testCommentPlugin() {\n // Add the comment field to articles.\n $this->addDefaultCommentField('node', 'article');\n\n // Create an article with comments enabled..\n $title = 'Sample article';\n $edit = array(\n 'title[0][value]' => $title,\n 'body[0][value]' => '<p>Revision 1</p>',\n 'comment[0][status]' => CommentItemInterface::OPEN,\n );\n $this->drupalPostNodeForm('node/add/article', $edit, t('Save and publish'));\n $node = $this->drupalGetNodeByTitle($title);\n\n // Edit the article and close its comments.\n $edit = array(\n 'comment[0][status]' => CommentItemInterface::CLOSED,\n 'revision' => TRUE,\n );\n $this->drupalPostNodeForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));\n\n // Check the difference between the last two revisions.\n $this->clickLink(t('Revisions'));\n $this->drupalPostForm(NULL, NULL, t('Compare selected revisions'));\n $this->assertText('Comments');\n $this->assertText('Comments for this entity are open.');\n $this->assertText('Comments for this entity are closed.');\n }", "function avia_inc_custom_comments($comment, $args, $depth)\n{\n $GLOBALS['comment'] = $comment;\n\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n\n <div id=\"comment-<?php comment_ID(); ?>\">\n <article>\n <div class=\"gravatar\">\n <?php\n //display the gravatar\n $gravatar_alt = esc_html(get_comment_author());\n echo get_avatar($comment,'60', '', $gravatar_alt); ?>\n </div>\n\n <!-- display the comment -->\n <div class='comment_content'>\n <header class=\"comment-header\">\n <?php\n $author = '<cite class=\"comment_author_name\">'.get_comment_author().'</cite>';\n $link = get_comment_author_url();\n if(!empty($link))\n $author = '<a rel=\"nofollow\" href=\"'.$link.'\" >'.$author.'</a>';\n\n printf('<cite class=\"author_name heading\">%s</cite> <span class=\"says\">%s</span>', $author, __('says:','avia_framework')) ?>\n <?php edit_comment_link(__('(Edit)','avia_framework'),' ','') ?>\n\n <!-- display the comment metadata like time and date-->\n <div class=\"comment-meta commentmetadata\">\n <a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\">\n <time <?php /* avia_markup_helper(array('context' => 'comment_time'));*/ ?> >\n <?php printf(__('%1$s at %2$s','avia_framework'), get_comment_date(), get_comment_time()) ?>\n </time>\n </a>\n </div>\n </header>\n\n <!-- display the comment text -->\n <div class='comment_text entry-content-wrapper clearfix' <?php /* avia_markup_helper(array('context' => 'comment_text')); */ ?>>\n <?php comment_text(); ?>\n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.','avia_framework') ?></em>\n <?php endif; ?>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div>\n </div>\n\n </article>\n </div>\n<?php\n}", "function comment_author($comment_ID = 0)\n{\n}", "function comment( $fieldName )\r\n \t{\r\n \t}", "function get_comment_ID()\n{\n}", "public function comment ($comment) {}", "function toolbox_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'toolbox' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'toolbox' ), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer>\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'toolbox' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em><?php _e( 'Your comment is awaiting moderation.', 'toolbox' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time pubdate datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tprintf( __( '%1$s at %2$s', 'toolbox' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t</time></a>\n\t\t\t\t\t<?php edit_comment_link( __( '(Edit)', 'toolbox' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function wetkit_adaptivetheme_preprocess_comment(&$variables, $hook) {\n\n}", "function oneltd_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'oneltd' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'oneltd' ), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer>\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'oneltd' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em><?php _e( 'Your comment is awaiting moderation.', 'oneltd' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time pubdate datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tprintf( __( '%1$s at %2$s', 'oneltd' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t</time></a>\n\t\t\t\t\t<?php edit_comment_link( __( '(Edit)', 'oneltd' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function modifyComment($commentId, $comment, $postId)\r\n{\r\n $commentManager = new \\OpenClassrooms\\Blog\\Model\\CommentManager();\r\n\r\n $affectedLines = $commentManager->updateComment($commentId, $comment);\r\n \r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n\r\n $comments = $commentManager->getAllComments();\r\n $signaledComments = $commentManager->getSignaledComments();\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n }\r\n else {\r\n require('view/frontend/adminCommentsView.php');\r\n }\r\n}", "function SimplyCivi_preprocess_comment(&$vars) {\n static $comment_count = 1; // keep track the # of comments rendered\n // Calculate the comment number for each comment with accounting for pages.\n $page = 0;\n $comments_previous = 0;\n if (isset($_GET['page'])) {\n $page = $_GET['page']; \n $comments_per_page = variable_get('comment_default_per_page_' . $vars['node']->type, 1);\n $comments_previous = $comments_per_page * $page;\n }\n $vars['comment_count'] = $comments_previous + $comment_count;\n\n // if the author of the node comments as well, highlight that comment\n $node = node_load($vars['comment']->nid);\n if ($vars['comment']->uid == $node->uid) {\n $vars['author_comment'] = TRUE;\n }\n\n // If comment subjects are disabled, don't display them.\n if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) {\n $vars['title'] = '';\n }\n else {\n $vars['title'] = l($vars['comment']->subject, 'node/'. $vars['node']->nid, array('query' => $query, 'fragment' => $fragment));\n }\n\n // Add the pager variable to the title link if it needs it.\n $fragment = 'comment-' . $vars['comment']->cid;\n $query = '';\n if (!empty($page)) {\n $query = 'page='. $page;\n }\n\n $vars['comment_count_link'] = l('#'. $vars['comment_count'], 'node/'. $vars['node']->nid, array('query' => $query, 'fragment' => $fragment));\n\n $comment_count++;\n}", "function socialwiki_add_comment($context, $pid, $content, $editor) {\n global $CFG;\n require_once($CFG->dirroot . '/comment/lib.php');\n\n list($contextid, $course, $cm) = get_context_info_array($context->id);\n $cmt = new stdClass();\n $cmt->context = $contextid;\n $cmt->itemid = $pid;\n $cmt->area = 'socialwiki_page';\n $cmt->course = $course;\n $cmt->component = 'mod_socialwiki';\n\n $manager = new comment($cmt);\n\n if ($editor == 'creole') {\n $manager->add($content, SOCIALFORMAT_CREOLE);\n } else if ($editor == 'html') {\n $manager->add($content, FORMAT_HTML);\n } else if ($editor == 'nwiki') {\n $manager->add($content, SOCIALFORMAT_NWIKI);\n }\n}", "function thn_ping($comment, $args, $depth) {\n \n$GLOBALS['comment'] = $comment; ?>\n\t\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n \n <div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.', 'theron') ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"org_ping\">\n \t<?php printf(__('<cite class=\"citeping\">%s</cite> <span class=\"says\">:</span>'), get_comment_author_link()) ?>\n\t \t<?php comment_text() ?>\n <div class=\"comm_meta_reply\">\n <a class=\"comm_date\"><?php printf(get_comment_date()) ?></a>\n <?php edit_comment_link(__('Edit', 'theron'),' ','') ?></div>\n </div>\n </div>\n \n \n<?php }", "function edit_comment_link($text='Edit') {\n\tif(we_can('edit_comments')) { ?><a href=\"<?php siteinfo('adminurl'); ?>comments.php?req=edit&amp;id=<?php comment_ID(); ?>\"><?php echo $text; ?></a><?php }\n}", "function custom_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <li <?php comment_class(); ?>>\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n <header class=\"comment-author vcard\">\n <?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\n <?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n <time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\n <?php edit_comment_link(__('(Edit)'),' ','') ?>\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"help\">\n <p><?php _e('Your comment is awaiting moderation.') ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content clearfix\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function ct_before_post_comments() {\n\t// Your Code Here\n}", "function gpro_comments_template() {\n do_action('gpro_comments_template');\n}", "function affinity_mikado_page_comments() {\n\n\t\t$comments = affinity_mikado_show_comments();\n\n\t\tif ($comments) {\n\t\t\tcomments_template('', true);\n\t\t}\n\n\t}", "function article($atts)\n\t{\n\t\tglobal $pretext;\n\t\treturn ($pretext['id']) ? doArticle($atts) : doArticles($atts);\n\t}", "function signalComment($commentId, $commentPostId)\r\n{\r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n $commentManager = new \\OpenClassrooms\\Blog\\Model\\CommentManager();\r\n\r\n $affectedLines = $commentManager->updateSignalComment($commentId);\r\n \r\n $chap = $postManager->getChap($_GET['postId']);\r\n $maxId = $postManager->getMaxId();\r\n $comments = $commentManager->getComments($chap['id']);\r\n\r\n require('view/frontend/postView.php'); \r\n}", "function HERITAGE_before_comment_fields()\n {\n echo '<div class=\"before_comment_input clearfix\">';\n }", "public function GaweCommentPosEr ()\n {\n $cal = new GaweCommentPosEr();\n //send the webclass\n $webClass = __CLASS__;\n\n //run the crud utility\n Crud::run($cal, $webClass);\n\n //pr($mps);\n //mode=ws\n }", "public function commentsTask()\n\t{\n\t\tif (!$this->config->get('feeds_enabled'))\n\t\t{\n\t\t\tthrow new Exception(Lang::txt('COM_KB_ERROR_ARTICLE_NOT_FOUND'), 404);\n\t\t}\n\n\t\t// Incoming\n\t\t$alias = Request::getString('alias', '');\n\t\t$id = Request::getInt('id', 0);\n\n\t\t// Load the article\n\t\t$category = Category::oneByAlias(Request::getString('category'));\n\n\t\t$article = ($alias ? Article::oneByAlias($alias) : Article::oneOrFail($id));\n\t\tif (!$article->get('id'))\n\t\t{\n\t\t\tthrow new Exception(Lang::txt('COM_KB_ERROR_ARTICLE_NOT_FOUND'), 404);\n\t\t}\n\n\t\t// Set the mime encoding for the document\n\t\tDocument::setType('feed');\n\n\t\t// Start a new feed object\n\t\tDocument::setLink(Route::url($article->link()));\n\n\t\t// Build some basic RSS document information\n\t\t$title = Config::get('sitename') . ' - ' . Lang::txt(strtoupper($this->_option));\n\t\t$title .= ($article->get('title')) ? ': ' . stripslashes($article->get('title')) : '';\n\t\t$title .= ': ' . Lang::txt('COM_KB_COMMENTS');\n\n\t\tDocument::setTitle($title);\n\n\t\tDocument::instance()->description = Lang::txt('COM_KB_COMMENTS_RSS_DESCRIPTION', Config::get('sitename'), stripslashes($article->get('title')));\n\t\tDocument::instance()->copyright = Lang::txt('COM_KB_COMMENTS_RSS_COPYRIGHT', gmdate(\"Y\"), Config::get('sitename'));\n\n\t\t// Start outputing results if any found\n\t\t$this->_feedItem($article->comments('list'));\n\t}", "function handle_comment() {\n\tif(!is_commenting()) {\n\t\treturn;\n\t}\n\tglobal $option, $themetemplates, $tplext, $themecss;\n\tif(!isFlooding($option->floodcontrol)) {\n\t\t$req = getOption('required_comment_list');\n\t\t$commenthandle = new commentProcess;\n\t\t$moderate_comments = isset($option->moderate_comments) && $option->moderate_comments == 1 ? true : false;\n\t\t$commenthandle->Subject = $moderate_comments == false ? sprintf(L_COMMENT_MAILER_SUBJECT,$option->sitename) : sprintf(L_COMMENT_PENDING_MAILER_SUBJECT,$option->sitename);\n\t\t$commenthandle->FromName = sprintf(L_COMMENT_MAILER_FROM,$option->sitename);\n\t\t$commenthandle->RequiredFields = ($req) ? $req : 'name,email,message,itemid';\n\t\t$commenthandle->Template = \"$themetemplates/@commentmailer{$tplext}\";\n\t\t$commenthandle->ExtraVars = array('themecss' => YOUR_SITE. $themecss, 'pageurl' => ltrim($_SERVER['REQUEST_URI'], '/'), 'ip' => $_SERVER['REMOTE_ADDR'], 'hostmask' => gethostbyaddr($_SERVER['REMOTE_ADDR']), 'expanseurl' => EXPANSE_URL, 'cms_name' => CMS_NAME, 'company_url' => COMPANY_URL);\n\t\tregister_flooding();\n\t\t$commenthandle->commentHandle();\n\t} else {\n\t\tprintOut(FAILURE, sprintf(L_FLOODING_MESSAGE, $option->floodcontrol));\n\t}\n}", "function list_pings($comment, $args, $depth) {\r\n$GLOBALS['comment'] = $comment; ?>\r\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\r\n<?php }", "function custom_comments($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n?>\n<li id=\"comment-<?php comment_ID() ?>\" class=\"comments post-styles\">\n <div class=\"user-meta-data\">\n\t\t<h3><?php comment_author() ?></h3>\n\t\t<h4 class=\"time-stamp-comment-main\"><span class=\"stamp-before\">Published: </span><?php comment_date('F d, Y') ?></h4>\n </div>\n \t<?php if ($comment->comment_approved == '0') _e(\"ttttt<span class='unapproved'>Your comment is awaiting moderation.</span>n\", 'your-theme') ?>\n \t<p><?php comment_text() ?></p>\n \t<div class=\"reply\">\n\t\t<a class=\"comments-reply-link\" href=\"#\">Reply</a>\n\t</div>\n<?php }", "function comment_text($comment_ID = 0, $args = array())\n{\n}", "function admin_notify_comment_title()\n{\nreturn <<<EOF\nYeni bir yorum aldınız\nEOF;\n}", "function blogfirst_comment($comment, $args, $depth ) { \n \n $GLOBALS['comment'] = $comment; ?>\n\n <li class=\"comment-item\">\n <a class=\"comment-item-gravatar\" href=\"<?php comment_author_url(); ?>\"><?php echo get_avatar($comment, 80); ?></a>\n <div class=\"comment\">\n <span class=\"author\"><?php comment_author_link() ?> - <?php comment_date('F jS, Y') ?></span>\n <div class=\"comment-text\"><?php if ($comment->comment_approved == '0') : ?>\n <p>Your comment is awaiting moderation.</p>\n <?php endif; ?>\n <?php comment_text() ?>\n </div>\n </div>\n </li>\n <?php }", "public function showSingleArticle($template = '', $data, $commentData)\n {\n \n $admin = new Admin();\n// Zend_Debug::dump($data, $label=null, $echo=true);exit();\n if($template != '') {\n $this->template = $template;\n }\n $this->tpl->setFile('tpl_main','article/' . $this->template . \".tpl\");\n $this->tpl->setBlock('tpl_main','comment_display','comment_display_block');\n $this->tpl->setBlock('comment_display','comment_reply','comment_reply_block');\n $this->tpl->setBlock('comment_display','comment_controls','comment_controls_block');\n $this->tpl->setBlock('comment_reply','reply_controls','reply_controls_block');\n \n foreach($data as $key => $value) {\n \n $this->tpl->setVar('ARTICLE_'.strtoupper($key), $value);\n }\n \n// Zend_Debug::dump($commentData, $label=null, $echo=true);\n \n foreach ($commentData as $commentKey => $comment) {\n\n //verify if the comment is posted by an admin\n //if yes it means the value from the admin field from 'comments' is set to Y, by default the value is set to 'N'\n if($comment['admin'] == 'Y')\n { \n $usernameAdmin = $admin->getUserBy('id', $comment['userId']);\n $this->tpl->setVar('COMMENT_USERID',$usernameAdmin['username']);\n }\n else \n {\n $this->tpl->setVar('COMMENT_USERID',$comment['username']);\n }\n \n $this->tpl->setVar('COMMENT_ID',$comment['id']);\n $this->tpl->setVar('COMMENT_CONTENT',$comment['content']);\n // if(isset($this->session->user->id)) {\n // if ($comment['userId'] == $this->session->user->id) {\n // $this->tpl->setVar('COMMENT_ID',$commentKey);\n $this->tpl->parse('comment_controls_block','comment_controls',false);\n // } else {\n // $this->tpl->parse('comment_controls_block','',false);\n // }\n // }\n // we empty the block before we make any changes, \n // just in case this block was already set in a previous loop from the foreach\n $this->tpl->parse('comment_reply_block','');\n if(isset($comment['replies'])) {\n \n// \n foreach($comment['replies'] as $replyKey => $reply) {\n \n //verify if the reply is posted by an admin\n //if yes it means the value from the admin field from 'comments' is set to Y, by default the value is set to 'N'\n if($reply['admin'] == 'Y')\n { \n $usernameAdmin = $admin->getUserBy('id', $reply['userId']);\n// Zend_Debug::dump($usernameAdmin, $label=null, $echo=true);exit;\n $this->tpl->setVar('REPLY_USERNAME',$usernameAdmin['username']);\n }\n else \n {\n $this->tpl->setVar('REPLY_USERNAME',$reply['username']);\n }\n \n $this->tpl->setVar('REPLY_ID', $reply['id']);\n $this->tpl->setVar('REPLY_CONTENT',$reply['content']);\n // if(isset($this->session->user->id)) {\n // if ($reply['userId'] == $this->session->user->id) {\n // $this->tpl->setVar('REPLY_ID',$reply['id']);\n $this->tpl->parse('reply_controls_block','reply_controls',false);\n // } else {\n // $this->tpl->setVar('REPLY_ID','');\n // $this->tpl->parse('reply_controls_block','',false);\n // }\n // }\n $this->tpl->parse('comment_reply_block','comment_reply',true);\n }\n }\n $this->tpl->parse('comment_display_block','comment_display',true);\n }\n }", "function post(){\n $chapterManager=new jeanForteroche\\Model\\ChapterManager;\n $commentsManager=new jeanForteroche\\Model\\CommentsManager;\n $post=$chapterManager->getChapter();\n $len=$chapterManager->len();\n $comments=$commentsManager->getComments($post['id_chapter']);\n $num=$chapterManager->num();\n require('view/frontend/frontpage.php');\n}", "function run_author_commentary() {\n\n\t$author_commentary = new Author_Commentary_Admin();\n\t$author_commentary->run();\n\n}", "function comments_popup_script()\n{\n}", "function updateChap($id, $titre, $chapitre)\r\n{\r\n $postManager = new \\OpenClassrooms\\Blog\\Model\\PostManager();\r\n\r\n $affectedLines = $postManager->updateChapContent($id, $titre, $chapitre);\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n }\r\n else {\r\n require('view/frontend/adminView.php'); \r\n }\r\n}", "function avada_comment( $comment, $args, $depth ) {\r\n\tAvada()->template->comment_template( $comment, $args, $depth );\r\n}", "function avada_comment( $comment, $args, $depth ) {\r\n\tAvada()->template->comment_template( $comment, $args, $depth );\r\n}", "function wp_new_comment_notify_moderator($comment_ID)\n{\n}", "static function insert_custom_comment_fields( $comment_id, $arr_insert, &$approved, $params, $node ){\n global $FUNCS, $DB, $CTX;\n\n require_once( K_COUCH_DIR.'comment.php' );\n\n $FUNCS->remove_event_listener( 'alter_comment_fields_info', array('KExtendedComments', 'add_custom_comment_fields') );\n $comment = new KComment( $comment_id );\n\n $pg = &$CTX->get_object( 'k_bound_page', 'form' ); // is the form data-bound?\n if( is_null($pg) ){\n $pg = KExtendedComments::_get_associated_page( $comment );\n if( !$pg ) return;\n }\n else{\n // a bit of sanity check for databound forms\n $comment_masterpage = KExtendedComments::_get_comment_masterpage( $comment->tpl_name );\n if( $comment_masterpage!=$pg->tpl_name ){\n die( \"ERROR: form masterpage '\".$FUNCS->cleanXSS($pg->tpl_name).\"' is not the comment_masterpage\" );\n }\n\n if( $pg->id!='-1' ){ //huh? can only happen if 'mode' of form set to 'edit' (instead of the required 'create')\n die( \"ERROR: 'mode' param of form has to be 'create'\" );\n }\n }\n\n $title = 'comment-'.$comment->id;\n $pg->_fields['k_page_title']->store_posted_changes( $title );\n $pg->_fields['k_page_name']->store_posted_changes( $title );\n $pg->_fields['k_publish_date']->store_posted_changes( $comment->date );\n\n // gather static values provided as parameters of this tag\n $fields = array();\n $arr_known_params = array( 'k_page_name', 'k_publish_date' );\n foreach( $params as $param ){\n $pname = strtolower( trim($param['lhs']) );\n if( in_array($pname, $arr_known_params) ) continue;\n $fields[$pname]=$param['rhs'];\n }\n\n for( $x=0; $x<count($pg->fields); $x++ ){\n $f = &$pg->fields[$x];\n\n if( !$f->system && isset($_POST[$f->name]) ){\n $f->store_posted_changes( $_POST[$f->name] );\n }\n\n // explicit param will override submitted values\n if( isset($fields[$f->name]) ){\n if( $f->k_type== 'checkbox' ){\n // supplied static checkbox values are supposed to be comma-separated -\n // this needs to be changed to match the separator expected by page-field\n $separator = ( $f->k_separator ) ? $f->k_separator : '|';\n $sep = '';\n $str_val = '';\n $fields[$f->name] = explode(',', $fields[$f->name]);\n foreach( $fields[$f->name] as $v ){\n $str_val .= $sep . trim( $v );\n $sep = $separator;\n }\n $f->store_posted_changes( $str_val );\n }\n else{\n $f->store_posted_changes( $fields[$f->name] );\n }\n }\n\n unset( $f );\n }\n\n // Save..\n $errors = $pg->save();\n\n if( $errors ){\n $sep = '';\n $form_separator = $CTX->get('k_cur_form_separator');\n\n $str_err = '';\n for( $x=0; $x<count($pg->fields); $x++ ){\n $f = &$pg->fields[$x];\n if( $f->err_msg ){\n $str_err .= $sep . '<b>' . (($f->label) ? $f->label : $f->name) . ':</b> ' . $f->err_msg;\n $sep = $form_separator;\n }\n unset( $f );\n }\n\n return $str_err;\n }\n\n }", "public function articles();", "function load_comments()\n{\t\n\t\t$this -> index -> load_comments($_POST);\n}", "function apex_comment( $comment, $args, $depth ) {\n\n\tif ( function_exists( 'get_option_tree') ) {\n\t\t$commentmoderation = __( 'Your Comment Is Awaiting Moderation.', 'apex' );\n\t}\n\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n <!-- Reply Start -->\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n \n \t<div class=\"commentwrap\">\n \t<div class=\"posterpic\"><?php echo get_avatar( $comment, 40 ); ?></div>\n <div class=\"author\"><?php comment_author_link(); ?></div>\n <div class=\"timestamp\"><?php printf( __( '%1$s', 'apex' ), get_comment_date() ); ?><?php edit_comment_link( __( '(Edit)', 'apex' ), ' ' ); ?></div><div class=\"clear\"></div>\n <div class=\"postertext\"><?php if ( $comment->comment_approved == '0' ) : ?><p><em><?php _e( $commentmoderation, 'apex' ); ?></em></p><?php endif; ?><?php comment_text(); ?></div><div class=\"clear\"></div>\n <div class=\"replylink\"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></div><div class=\"clear\"></div>\n </div>\n \n\t</li>\n <!-- Reply End -->\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'apex' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'apex'), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function admin_notify_gallery_comment_title()\n{\nreturn <<<EOF\nYeni bir yorum aldınız\nEOF;\n}", "function viewEditCom($comId)\n{\n $commentManager = new CommentManager();\n $comment = $commentManager->getComment($comId);\n require('view/backend/editCommentView.php');\n}", "function cms_comment($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\textract($args, EXTR_SKIP);\n\n\tif ( 'div' == $args['style'] ) {\n\t\t$tag = 'div';\n\t\t$add_below = 'comment';\n\t} else {\n\t\t$tag = 'li';\n\t\t$add_below = 'div-comment';\n\t}\n?>\n<<?php echo esc_attr($tag) ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ) ?> id=\"comment-<?php comment_ID() ?>\">\n<?php if ( 'div' != $args['style'] ) : ?>\n<div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body clearfix\">\n<?php endif; ?>\n<?php if($comment->comment_type !='pingback' && $comment->comment_type !='trackback'): ?>\n<div class=\"comment-author-image vcard\">\n\t<?php echo get_avatar( $comment, 109 ); ?>\n</div>\n<?php endif; ?>\n<?php if ( $comment->comment_approved == '0' ) : ?>\n\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.' , THEME_NAME); ?></em>\n<?php endif; ?>\n<div class=\"comment-main\">\n\t<div class=\"comment-content\">\n\t\t<?php if($comment->comment_type !='pingback' && $comment->comment_type !='trackback'): ?>\n\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t<?php printf( __( '<span class=\"comment-author\">%s</span>' ), get_comment_author_link() ); ?>\n\t\t<span class=\"comment-date\">\n\t\t<?php\n\t\t\techo get_comment_date(get_option('date_format', 'Y/m/d'),get_comment_ID());\n\t\t?>\n\t\t</span>\n\t</div>\n\t\t\t<?php comment_text(); ?>\n\t\t\t<div class=\"reply\">\n\t\t\t<span></span><?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div>\n\t\t<?php else: ?>\n\t\t\t<?php _e( 'Pingback:' ,THEMENAME); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', THEMENAME ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t<?php endif; ?>\n\t</div>\n</div>\n<?php if ( 'div' != $args['style'] ) : ?>\n</div>\n<?php endif; ?>\n<?php\n}", "function mytheme_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; \n \n ?>\n\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\">\n <div class=\"comment-author vcard\">\n <?php echo get_avatar( $comment, $size = '80'); ?>\n\n <?php printf(__('<h4 class=\"fn\">%s</h4>'), get_comment_author_link()) ?>\n <time class=\"comment-meta commentmetadata\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></time>\n\n </div>\n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.') ?></em>\n <br />\n <?php endif; ?>\n\n \n <div class=\"c-text\">\n <?php comment_text() ?>\n </div>\n <!-- <div class=\"reply\">\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div> -->\n </div>\n<?php\n }" ]
[ "0.68186426", "0.6811843", "0.6803026", "0.67927206", "0.67782736", "0.6739212", "0.66836524", "0.6678244", "0.6591876", "0.65446997", "0.65274155", "0.65076417", "0.64910525", "0.6467614", "0.6425262", "0.64199215", "0.641104", "0.641104", "0.64015627", "0.6398497", "0.63938695", "0.6386942", "0.63637227", "0.6360786", "0.6359287", "0.63540417", "0.63379383", "0.6333424", "0.633245", "0.6322202", "0.628086", "0.62780297", "0.62758565", "0.62579006", "0.6247173", "0.6234649", "0.6226299", "0.62245643", "0.62077814", "0.61991733", "0.61987954", "0.619337", "0.6191215", "0.61881393", "0.6185111", "0.61795336", "0.6179182", "0.6177156", "0.61736846", "0.616725", "0.61617583", "0.6149925", "0.6145796", "0.61377317", "0.613745", "0.6136302", "0.6131965", "0.61296415", "0.6127073", "0.611848", "0.6113987", "0.6112768", "0.6106949", "0.6098694", "0.60939705", "0.6091407", "0.60774606", "0.60657525", "0.6053738", "0.60532486", "0.6044159", "0.6041104", "0.603634", "0.60352534", "0.60342056", "0.6028692", "0.60264456", "0.60234463", "0.601403", "0.60114247", "0.6005723", "0.60044533", "0.59827316", "0.5978165", "0.5976868", "0.5969886", "0.5968696", "0.596778", "0.5960571", "0.5959988", "0.5959988", "0.59580326", "0.59548306", "0.5953201", "0.59518456", "0.59476626", "0.59405315", "0.5938273", "0.5931881", "0.5923793" ]
0.7235219
0
Delete a custom resource.
Удалить пользовательский ресурс.
public function delete(string $resource) { $name = Normalizer::className($resource); $path = PATH_CUSTOM_RESOURCES . "{$name}.php"; if (!file_exists($path)) { self::error("Resource not found!", true); } if (!unlink($path)) { self::error("Failed to delete resource!"); return; } self::success("Resource deleted!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function del($resource)\n {\n }", "public function deleteResource($resourceId);", "public function deleted(Resource $resource)\n {\n //\n }", "function delete($resource, $data='') {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('DELETE', $this->_resourcefix($resource), $data);\n\t\t}", "public function deleteResource(PersistentResource $resource);", "public function delete() {\n $this->resourceable->delete();\n return parent::delete();\n }", "function delete_instance($resource) {\n //Design note (decision): delete of the mrcutejr resource itself can only be done by admin from a different\n //view; this delete only deletes resource link in specific course, not the mrcutejr resource.\n //TODO: implement full delete\n return parent::delete_instance($resource);\n }", "public function deleteResource($id)\n\t{\n\t}", "public function deleteResourceById(Request $request, $id = 0);", "public function delete(resource $resource) {\n $stmt = $this->db->prepare(\"DELETE from resource WHERE id=?\");\n $stmt->execute(array($resource->getIdresource()));\n }", "function delete_resource($resource, $id) {\n $valid_resources = ['categories', 'customers', 'products'];\n\n // check if valid resource are given\n if (!in_array($resource, $valid_resources)) {\n throw new Exception('Invalid resource');\n }\n\n // The key-value array\n $this->current_options = [];\n $this->current_options['resource'] = $resource;\n $this->current_options['id'] = $id;\n\n $this->web_service->delete($this->current_options); // Delete\n // If we can see this message, that means we have not left the try block\n echo $resource . $this->current_options['id'] . ' successfully deleted!';\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public function deleteResource(\\Illuminate\\Http\\Request &$request, &$model): void\n {\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {\n\t\treturn $this->_resource->delete();\n\t}", "public function destroy(Resource $resource)\n {\n //\n // $this->authorize('delete',Resource::class);\n // $resource->delete();\n // return redirect('/resource');\n return response(['message'=>'Deleted']);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function forceDeleted(Resource $resource)\n {\n //\n }", "public function delete() {\n\t\t$this->getRequest()->request($this->getUri().'delete.json', 'DELETE', [\n\t\t\t'id' => $this->getId(),\n\t\t]);\n\n\t\t$this->data = null;\n\t}" ]
[ "0.78604066", "0.77395946", "0.7654218", "0.74862534", "0.7436115", "0.7071202", "0.7041381", "0.7013526", "0.67644376", "0.67335725", "0.6708297", "0.6685639", "0.6680197", "0.66462606", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6645386", "0.6644519", "0.66248006", "0.6612833", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6605958", "0.6594926", "0.65920395" ]
0.7775237
1
Get the value of presentacion
Получить значение presentacion
public function getPresentacion() { return $this->presentacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPresentaciones()\r\n {\r\n return $this->presentaciones;\r\n }", "public function getPresenca()\n {\n return $this->presenca;\n }", "function getContingencia(){\r\n return $this->contingencia;\r\n }", "public function getOcupacion(){\n return $this->ocupacion;\n }", "private function getMinimo()\n {\n return $this->getImpuestos()->minimo;\n }", "public function getTituloUbicacion(){return $this->vTituloUbicacion;}", "public function getPuesto()\n {\n return $this->puesto;\n }", "public function getPresion()\n {\n return $this->presion;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getModificado()\n {\n return $this->modificado;\n }", "public function getPuesto()\r\n {\r\n return $this->puesto;\r\n }", "public function getPuesto()\n {\n\n return $this->puesto;\n }", "public function getActividad()\n {\n return $this->actividad;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getPantalla(){\n return $this->pantalla; \n }", "private function getImpuestoEmpleado()\n {\n return $this->getImpuestos()->empleado;\n }", "public function get_estatura(){\r return $this->estatura;\r }", "public function getDataPublicacao()\n {\n return $this->dataPublicacao;\n }", "public function getobservacionPrematricula(){\n\t\treturn $this->observacionPrematricula;\n\t}", "public function getPaisDeOrigen(){\n return $this -> paisDeOrigen;\n }", "public function getActivo(){\n\t\treturn $this->activo;\n\t}", "function getFicheCom(){\n return $this->fichecom;\n }", "public function getRespuesta()\r\n {\r\n return $this->respuesta;\r\n }", "public function getDispo()\r\n {\r\n return $this->dispo;\r\n }", "public function getDispositivo( ) {\n\n return $this->dispositivo;\n\n }", "public function getEntrega()\r\r\n {\r\r\n return $this->entrega;\r\r\n }", "public function getAttivo() {\n return $this->attivo;\n }", "public function getAprobacion(){\n return $this->aprobacion;\n }", "public function getContenu(){\n return $this->contenu;\n }", "function getCodice_prodotto() {\r\n return $this->codice_prodotto;\r\n }", "function getHora_arrivo()\n {\n return $this->hora_arrivo;\n }", "public function getMataPelajaran();", "public function getDispensadorSimple(){\n\t\treturn $this->dispensador_simple;\n\t}", "public function getDispensadorBotonera(){\n\t\treturn $this->dispensador_botonera;\n\t}", "public function getPropriete()\n {\n return $this->propriete;\n }", "public function getProba()\n {\n return $this->proba;\n }", "public function getValeur()\n {\n return $this->valeur;\n }", "public function getModalidad()\n {\n if ($this->modalidad=='C') {\n return $this->getTextoModalidad();\n }\n \n if ($this->modalidad=='P') {\n return $this->getTextoModalidad();\n }\n }", "public function getRepresentante()\n {\n return $this->representante;\n }", "function getProposition() {\n return $this->proposition;\n }", "function getPeriodo(){\n\t\tif(setNoMenorQueCero($this->mPeriodoActivo) <= 0 AND $this->isPagable() == true){\n\t\t\t$sql\t\t\t\t\t= \"SELECT MAX(periodo_socio) AS 'parcialidad' FROM operaciones_mvtos WHERE recibo_afectado=\" . $this->mCodigoDeRecibo;\n\t\t\t$this->mPeriodoActivo\t= mifila($sql, \"parcialidad\");\n\t\t}\n\t\treturn $this->mPeriodoActivo;\n\t}", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getActivo()\r\n {\r\n return $this->activo;\r\n }", "public function getActivo()\r\n {\r\n return $this->activo;\r\n }", "public function getPonta(){\n return $this->ponta;\n }", "public function getempleado()\r\n {\r\n return $this->empleado;\r\n }", "public function getproduccion()\r\n {\r\n return $this->produccion;\r\n }", "public function getNomPublicador()\n {\n return $this->nomPublicador;\n }", "public function getInnovacion()\n {\n\n return $this->innovacion;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getDoc_entrega()\r\r\n {\r\r\n return $this->doc_entrega;\r\r\n }", "public function getPlazaActualAttribute()\n\t{\n\t\treturn $this->datosLaborales()->whereNull('fin')->first();\n\t}", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function getActa_consejo(){\n return $this->acta_consejo;\n }", "function consultarNotaAprobatoria() {\n\n $variables=array('codProyectoEstudiante'=> $this->datosEstudiante['codProyectoEstudiante'] \n );\n $cadena_sql = $this->sql->cadena_sql(\"nota_aprobatoria\", $variables);\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n return $resultado[0][0];\n }", "public function getMinimo()\n {\n return $this->minimo;\n }", "public function get_apellido(){\r return $this->apellido;\r }", "public function getContenu()\r\n {\r\n return $this->contenu;\r\n }", "public function getContenu()\r\n {\r\n return $this->contenu;\r\n }", "public function getModalita()\n {\n return isset($this->Modalita) ? $this->Modalita : null;\n }", "public function getValutas()\n {\n return $this->getOptionalElement('valuta');\n }", "public function get_pruebas_record_hasta() {\n return $this->pruebas_record_hasta;\n }", "function nominaActiva(){\n\t\t$sql = $this->query(\"select n.*,p.nombre\n\t\t\tfrom \n\t\t\tnomi_nominasperiodo n\n\t\t\tinner join nomi_configuracion c on n.idtipop=c.idtipop\n\t\t\tinner join nomi_tiposdeperiodos p on p.idtipop=n.idtipop\n\t\t\twhere \n\t\t\tn.autorizado=0 \n\t\t\torder by numnomina asc limit 1\");\n\t\t/* en teoría siempre tendría q ver una nomina activa\n\t\t * ya que al finalizar un ejercicio abre otro por default \n\t\t */\n\t\tif($sql->num_rows>0){\n\t\t\treturn $sql->fetch_array();\n\t\t}else{\n\t\t\t0;\n\t\t}\n\t}", "public function getVisuelObtenu()\n\t{\n\t\treturn $this->_visuel_obtenu;\n\t}", "public function setPresentacion($presentacion)\n {\n $this->presentacion = $presentacion;\n return $this;\n }", "public function getActivo()\r\n\t{\r\n\t\treturn($this->activo);\r\n\t}", "public function getContinente()\n {\n return $this->continente;\n }", "public function getProcedimentoDeAvaliacao() {\n return $this->getTurma()->getProcedimentoDeAvaliacaoDaEtapa($this->getMatricula()->getEtapaDeOrigem());\n }", "public function getPaisPublicador()\n {\n return $this->paisPublicador;\n }", "public function getVivienda()\n {\n if ($this->vivienda=='S') {\n return $this->getTextoVivienda();\n }\n\n if ($this->vivienda=='N') {\n return $this->getTextoVivienda();\n }\n }", "public function getCreacion()\r\n{\r\nreturn $this->creacion;\r\n}", "private function actual_correlativo_en_maestro()\n {\n $this->abrirConexionPg();\n $this->sql = \"select tipo1 as correlativo from maestro where id=\" . $this->id_padre;\n $data = $this->ejecutarSentenciaPg(2);\n return $data[0]['correlativo'];\n }", "public function getDocente(){\n return $this->docente;\n }", "public function getLectura_contenido(){\n return $this->lectura_contenido;\n }", "function getAvis_profesor()\n {\n if (!isset($this->savis_profesor) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->savis_profesor;\n }", "public function getUserPresentationValuation()\n {\n return $this->userPresentationValuation;\n }", "function get_presentation() { return $this->form->param->presentation;\t}", "public function getObservacao() {\n return $this->sObservacao;\n }", "public function getPotencia()\n {\n return $this->potencia;\n }", "public function getUltimo()\n {\n return $this->ultimo;\n }", "public function getModificacao() {\n\t\treturn $this->modificacao;\n\t}", "public function getProduto()\n {\n return $this->produto;\n }" ]
[ "0.69392395", "0.6674499", "0.64596367", "0.6376526", "0.63757366", "0.61351603", "0.61319774", "0.6121816", "0.6113534", "0.61080545", "0.61080545", "0.61080545", "0.61080545", "0.61080545", "0.61080545", "0.60928476", "0.60722834", "0.60714316", "0.6061134", "0.6061134", "0.6061134", "0.6061134", "0.6061134", "0.6061134", "0.6061134", "0.60519576", "0.6051063", "0.6049527", "0.60378116", "0.6035752", "0.60245794", "0.5998479", "0.5998041", "0.59980345", "0.5958022", "0.59469575", "0.59338987", "0.5929104", "0.5911994", "0.5911659", "0.5896664", "0.58788246", "0.5876436", "0.58741796", "0.5866031", "0.5860669", "0.58547527", "0.5847753", "0.58469963", "0.5846555", "0.58430034", "0.583142", "0.5828848", "0.58267", "0.58267", "0.5826372", "0.58242065", "0.581493", "0.58102256", "0.5808354", "0.5797671", "0.5797671", "0.5797671", "0.5797671", "0.5797671", "0.5797671", "0.5797671", "0.5797671", "0.57966155", "0.5790692", "0.5781182", "0.5780045", "0.5764328", "0.5763592", "0.57629883", "0.57583225", "0.57583225", "0.5753169", "0.5743729", "0.5741745", "0.5740411", "0.57347226", "0.5725445", "0.5721232", "0.57195836", "0.5717336", "0.57112134", "0.5705848", "0.5700119", "0.56915516", "0.56905746", "0.5682901", "0.5680719", "0.56805384", "0.5676905", "0.56746805", "0.5671393", "0.56706035", "0.5666916", "0.5664552" ]
0.83454925
0
Get the value of reposicion
Получить значение reposicion
public function getReposicion() { return $this->reposicion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getRepoInfo();", "public function getProduto()\n {\n return $this->produto;\n }", "public function getProduto()\n {\n return $this->produto;\n }", "public function getDispositivo( ) {\n\n return $this->dispositivo;\n\n }", "public function getOpciones() {\t \n $opciones=$this->repositorio->findAll();\n return $opciones;\n }", "private function getProdutosCarrinho() \n {\n $rep = $this->getDoctrine()->getRepository(\"NutrividaLojaBundle:Produto\");\n $session = $this->get(\"session\");\n $carrinho = $session->get('carrinho', array());\n \n return $rep->findById(array_keys($carrinho));\n }", "private function getRepository():\\Renan\\Repository\\Produto\n {\n return $this->repository;\n }", "public function getRepoId(){\n return $this->repoId;\n }", "public function getResultado(){\n return $this->resultado;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "function getResultado() {\r\n return $this->resultado;\r\n }", "function getResultado() {\r\n return $this->resultado;\r\n }", "public function repo(){\n\t\treturn $this->hint;\n\t}", "protected abstract function reposotory() : string;", "public function getRepo()\n {\n return $this->_repo;\n }", "public function getRepo()\n {\n\treturn yaml_parse_file($this->fileRepository);\n }", "public function getResultado()\n {\n return $this->resultado;\n }", "public function getRepo(): string\n {\n return $this->repo;\n }", "function getResultado(){\r\n return $this->resultado;\r\n }", "public function getResultado()\n {\n return $this->resultado;\n }", "public function getRepo()\n {\n return $this->repo;\n }", "function getProjectSetting($tag,$project_id,$cnx_num)\r\n{\r\n $request=new requete(\"SELECT setting_value FROM kados_projects_settings WHERE setting_tag='\".$tag.\"' AND project_id_fk=\".$project_id,$cnx_num);\r\n $request->getObject();\r\n return $request->objet->setting_value;\r\n}", "public function getProducto()\n {\n return $this->producto;\n }", "public function getProducto()\n {\n return $this->producto;\n }", "public function UserRepos()\n {\n $client = new Client();\n $res = $client->request('GET', 'https://api.github.com/users/romanegreen/repos', [\n \n ]);\n \n $data = $res->getBody();\n return $data;\n }", "public function getProdutos()\n {\n return $this->produtos;\n }", "function getDescLarga () {\n \treturn $this -> inciDescLarga;\n }", "function getCodice_prodotto() {\r\n return $this->codice_prodotto;\r\n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "private function selecionarProduto()\n {\n $id = (int) $this->params('id');\n if (! isset($id)) {\n $this->redirect()->toRoute('estoque', [\n 'action' => 'manter-produto'\n ]);\n }\n $table = $this->container->get('ProdutoTable');\n\n $produtoSelecionado = $table->getOne($id)->toArray();\n return $produtoSelecionado;\n }", "public function getValores()\n {\n return $this->valores;\n }", "public function get_valor($id);", "public function getComuna()\n {\n return $this->comuna;\n }", "public function getOpcion($parametro){\n\t\t$record = Opciones::model()->find('opcion = \"' . $parametro . '\"');\n\t\tif($record != null){\n\t\t\treturn $record['valor'];\n\t\t}\n\t\treturn null;\n\t}", "function getCodPro() {\n return $this->codPro;\n }", "function getFicheCom(){\n return $this->fichecom;\n }", "public function getComprobantePedido(){\n\t\t$this->db->select(\"*\");\n\t\t$this->db->from(\"comprobante\");\n\t\t$this->db->where(\"idComprobante\",\"4\");\n\t\t$this->db->limit(1);\n\t\t$resultados = $this->db->get();\n\t\treturn $resultados->result();\n\t}", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM productos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }", "public function __get($name)\n {\n return (isset($this->repositories[$name]) ? $this->repositories[$name] : null);\n }", "public function getComprobante(){\r\n\t\t$this->db->where(\"Id\",'2');\r\n\t\t$resultado = $this->db->get(\"ta_correlativo\");\r\n\t\treturn $resultado->row();\r\n\t}", "function get_proyecto()\n\t{\n\t\tif (!isset($this->proyecto_id)) {\n\t\t\tthrow new toba_error('Punto de montaje: el punto de montaje\n\t\t\t\t\t\t\t\t no tiene un proyecto válido');\n\t\t}\n\t\treturn $this->proyecto_id;\n\t}", "public function getCodigo() {\n return $this -> codigo;\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "function getProductos() {\r\n return $this->productos;\r\n }", "public function getProdutos()\n\t{\n\t\t$query = $this->db->get(\"produtos\");\n\t\treturn $query->result();\n\t}", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();" ]
[ "0.62021834", "0.6112956", "0.6112956", "0.6035185", "0.59843343", "0.5970053", "0.5902831", "0.58962625", "0.5877377", "0.58570343", "0.58570343", "0.58570343", "0.58570343", "0.58570343", "0.58193475", "0.58193475", "0.5781724", "0.5778694", "0.576393", "0.57513714", "0.5729112", "0.572067", "0.57139266", "0.5705055", "0.56775737", "0.56620693", "0.56512535", "0.56512535", "0.56355727", "0.5594367", "0.55817133", "0.55702806", "0.5568988", "0.5568988", "0.55572575", "0.555177", "0.5548212", "0.55333704", "0.5506729", "0.54858315", "0.54849404", "0.5480986", "0.54644984", "0.54644984", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5451757", "0.5445085", "0.5441084", "0.541383", "0.5410102", "0.5408261", "0.53959197", "0.53959197", "0.53839314", "0.53839314", "0.5380732", "0.53765935", "0.5366419", "0.5366419", "0.5366419", "0.5366419", "0.5366419", "0.5366419", "0.5366419", "0.5366419" ]
0.7508201
0
Get the value of precio_compra
Получить значение precio_compra
public function getPrecio_compra() { return $this->precio_compra; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function setPrecio_compra($precio_compra)\n {\n $this->precio_compra = $precio_compra;\n return $this;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function getCpa()\n {\n return $this->cpa;\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function calcularCURP( ) {\n \tif ($this->validarVacio()) {\n \t$this->CURP='';\n //inicial del primer apellido\n $this->apellidop= $this->depurar($this->apellidop);\n $this->CURP[0]=$this->apellidop[0];\n //primera vocal del primer apellido\n $this->CURP[1]=$this->primeraVocalInterna($this->apellidop);\n //inical del segundo apellido\n $this->apellidom= $this->depurar($this->apellidom);\n $this->CURP[2]=$this->apellidom[0];\n //inicial del nombre de pila\n //@TODO creo que el nombre de pila es el ultimo nombre que tengas\n $nombrePila= $this->depurar($this->nombre);\n $this->CURP[3]=$nombrePila[0];\n //los siguientes 6 caracteres son la fecha anio,mes,dia\n //@TODO quizas deberia de usar timestamp para pasar toda la fecha junta\n $this->CURP[4]=$this->fechaanio[2];\n $this->CURP[5]=$this->fechaanio[3];\n $this->CURP[6]=$this->fechames[0];\n $this->CURP[7]=$this->fechames[1];\n $this->CURP[8]=$this->fechadia[0];\n $this->CURP[9]=$this->fechadia[1];\n //si es hombre es H si es mujer M\n $this->CURP[10]=$this->sexo;\n //la entidad federativa son dos caracteres dadas por entidad donde nacio\n $this->CURP[11]=$this->entidad[0];\n $this->CURP[12]=$this->entidad[1];\n //la primera consonate de primer apellido,segundo apellido, nombre de pila\n $this->CURP[13]=$this->primeraConsonanteInterna($this->apellidop);\n $this->CURP[14]=$this->primeraConsonanteInterna($this->apellidom);\n $this->CURP[15]=$this->primeraConsonanteInterna($nombrePila);\n $this->CURP[16]='0';\n $this->CURP[17]=$this->calcularDigitoVerificador();\n\t}else{\n \techo 'colocar todos los datos';\n }\n }", "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getFacturationComptaPrec(): ?DateTime {\n return $this->facturationComptaPrec;\n }", "public function petroleoportonelada()\n\t{\n\t\t \n\t\t \n\t\t if($this->descargada>0) {\n\t\t $this->consumoportonelada=round($this->d2/$this->descargada,1);\n\t\t \t} else {\n\t\t\t $this->consumoportonelada=0;\n\t\t\t}\n\t\t\treturn $this->consumoportonelada;\n\t\t \n\t}", "public function getId_compra(){\n\t\treturn $this->id_compra;\n\t}", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function get_cotizacion_detalle_precio() : float {\n return $this->cotizacion_detalle_precio;\n }", "public function getProcResultado() {\n return $this->iProcResultado;\n }", "function getQuantidadeConsumida() {\n return $this->quantidadeConsumida;\n }", "public function getCompras()\n {\n return $this->compras;\n }", "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function getPrice() {\n $prezzo= $this->prezzo;\n if ($this->sconto==true) {\n $sconto = ($prezzo * $this->percSconto) / 100;\n $prezzo = round($prezzo - $sconto, 2);\n }\n return $prezzo;\n }", "function precio($precio)\n {\n $precio = number_format($precio, 0, '.', '.');\n\n return $precio;\n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function get_precio_producto($producto)\r\n\t\t{\r\n\t\t\t$sql=\"SELECT precio FROM productos WHERE id_productos =\".$producto;\r\n\t\t\t$this->query($sql);\r\n\t\t\t$res=$this->execute();\r\n\t\t\tif($res){\r\n\t\t\t\t$result=$this->resultset();\r\n\r\n\t\t\t}else {$result=null;}\r\n\t\t\treturn $result;\r\n\t\t}", "public function getInfCTeNormInfCargaProPred()\n {\n return $this->infCTeNorm_infCarga_proPred;\n }", "public function getCompte()\n {\n return $this->compte;\n }", "public function getPVP($idproductos){\n\t\t$sql = \"SELECT precio \".\n\t\t\t\"FROM `productos` \".\n\t\t\t\"WHERE idproductos = \".$idproductos;\n\t\t$q = $this->c->prepare($sql);\n\t\t$q->execute();\n\t\treturn $q->fetch()['precio'];\n\t}", "function get_car_price($occasion)\n {\n $price_total = $occasion->prijs->totaal;\n return number_format($price_total, 0, \",\", \".\");\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "static public function ctrMostrarCentroCostos($valor){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostos($valor);\n\n\t\treturn $respuesta;\n\n }", "public function prixTTCPanier()\n {\n return $this->prix_ht * 1.2;\n }", "public function costoPesos()\n {\n $costodsmv = ($this->costodsmv) ? $this->costodsmv : 0;\n return salario::smv(Config::get('sicare.entidad.zona')) * $costodsmv;\n }", "public function getMarcaPiquete()\n\t{\n\t\treturn $this->marca_piquete;\n\t}", "public function getNum_compte()\n {\n return $this->num_compte;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function getIdcompra()\n {\n return $this->idcompra;\n }", "public function getCintura()\n {\n return $this->cintura;\n }", "static public function ctrMostrarCentroCostosCaja(){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostosCaja();\n\n\t\treturn $respuesta;\n\n }", "public function getPsicofisico(){\n return $this->psicofisico;\n }", "public function getCompounds()\n {\n return $this->getValues();\n }", "public function getPodtcost()\n {\n return $this->podtcost;\n }", "function get_acomp_viagem($data){\n $sqlObj->query(\"SELECT acomp FROM viagem where CPF = \",CPF); // SELECT * FROM 'grupo3'.'viagem' WHERE { 'CPF' LIKE ''}\n if ($sqlObj->lin) { // Verifica se o total de resultados é maior que Zero\n $res1 = $sqlObj->resultado(0); // Salva o primeiro retorno da query na variavel $res1\n return $res1;\n }\n return null;\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "function fun_prec($prec){\r\n\t\t\tif($prec=='vlow')\r\n\t\t\t\t$prec = 4.05 ;\r\n\t\t\telse if($prec==\"low\")\r\n\t\t\t\t$pre = 3.24 ;\r\n\t\t\telse if($prec==\"nom\")\r\n\t\t\t\t$prec = 2.43 ;\r\n\t\t\telse if($prec=='high')\r\n\t\t\t\t$prec = 1.62 ;\r\n\t\t\telse if($prec=='vhigh')\r\n\t\t\t\t$prec = 0.81 ;\r\n\t\t\telse if($prec=='ehigh')\r\n\t\t\t\t$prec = 0.00 ;\r\n\t\t\treturn $prec;\r\n\t\t}", "public function ObtieneCompra()\n\t\t\t\t{\n\t\t\t\t$Compra=\"\";\n\t\t\t\t$query= \"select * from ecompra\";\n\t\t\t\t$resul=mysql_query($query,conectar::con());\n\t\t\t\twhile($row=mysql_fetch_assoc($resul))\n\t\t\t\t{\n\t\t\t\t\t$Compra=$row[\"contador\"];\n\t\t\t\t}\n\t\t\t\tif(!$Compra)\n\t\t\t\t{\n\t\t\t\t\t$Compra=\"10000001\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$Compra= $Compra + 1;\n\t\t\t\t}\n\t\t\t\treturn $Compra;\n\t\t\t\t\n\t\t\t\t}", "static public function ctrMostrarCentroCostosResumen($valor){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostosResumen($valor);\n\n\t\treturn $respuesta;\n\n }", "public function getCp()\n {\n return $this->cp;\n }", "public function getCp()\n {\n return $this->cp;\n }", "public function getGetCompetitivePricingForASINResult() \n {\n return $this->_fields['GetCompetitivePricingForASINResult']['FieldValue'];\n }", "function nbquestions_par_competence($comp) {\n\t\treturn $this->tabcomp_nbqr[$comp];\n\t}", "public function getCoPessoa()\n {\n return $this->co_pessoa;\n }", "public function getCPF()\n {\n return $this->cPF;\n }", "public function getQuantidadeProduto()\n {\n return $this->quantidadeProduto;\n }", "public function getCompras()\n {\n $query = $this->db->query(\"SELECT * FROM compras\");\n\n $resultado = $query->result_array();\n if($resultado == NULL)\n {\n return 0;\n }\n else\n {\n return $resultado;\n }\n }", "public function get_term_orden_compra($q='',$precioOrdenCompra)\n\t{\n $query = $this->connection->query(\"SELECT * FROM producto s\n LEFT JOIN impuesto i ON s.impuesto = i.id_impuesto \n WHERE s.activo='1' AND s.ingredientes = '0' AND s.combo = '0'\n AND CONCAT(nombre,' ',ifNull(codigo, '')) LIKE '%$q%' LIMIT 0,30\" );\n if($precioOrdenCompra == 1)\n {\n $query = $this->connection->query(\"SELECT *,s.precio_venta as precio_compra, s.precio_venta as precio_venta FROM producto s\n LEFT JOIN impuesto i ON s.impuesto = i.id_impuesto \n WHERE s.activo='1' AND s.ingredientes = '0' AND s.combo = '0'\n AND CONCAT(nombre,' ',ifNull(codigo, '')) LIKE '%$q%' LIMIT 0,30\" );\n }\n \n return $query->result_array();\n\t}", "function getCentro($codigo_contable) {\r\n $db = new MySQL(Sesion::getConexion());\r\n $sql = \"SELECT * FROM `inventarios_centros` \"\r\n . \"WHERE `codigo_contable`='{$codigo_contable}';\";\r\n $consulta = $db->sql_query($sql);\r\n $fila = $db->sql_fetchrow($consulta);\r\n $db->sql_close();\r\n return($fila[\"centro\"]);\r\n }", "public function getCompte()\n {\n return $this->Compte;\n }", "public function getTipoCompra() {\n return $this->iTipoCompra;\n }", "public function getCURP( ) {\n \t$this->calcularCURP();\n return implode('', $this->CURP);\n }", "public function calcular()\n {\n // e consigo fazer isso pois um objeto pessoa foi armazenado na propriedade,\n // que nesse caso, tem o mesmo nome\n return $this->pessoa->getPeso() / ($this->pessoa->getAltura() ** 2);\n }", "public function getCoeffPatricien($id){\r\n // retourne un tableau associatif contenant les informations d'un praticiens\r\n $req=\"Select pra_coefnotoriete\r\n from praticien \r\n where praticien.pra_num=\".$id;\r\n $rs = PdoGsb::$monPdo->query($req);\r\n $ligne = $rs->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n $coeff = 0;\r\n if(count($ligne) > 0){\r\n $praticien = $ligne[0];\r\n $coeff = $praticien['pra_coefnotoriete'];\r\n }\r\n return $coeff;\r\n }", "public function getPiso()\r\n\t{\r\n\t\treturn($this->piso);\r\n\t}", "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "public function getRoundEmpeno($PrecioProducto,$PorcentajeEmpeno,$PorcentajeCompra,$Clasificacion,$opc,$PorcentajeCompra01,$PorcentajeCompra02,$Categoria_Producto){\n $Empeno = $PorcentajeEmpeno;\n $Compra = $PorcentajeCompra;\n $Compra01 = $PorcentajeCompra02;\n $Compra02 = $PorcentajeCompra01;\n\n $ValorTotalEmpeno = round(($PrecioProducto * $Empeno ), -1);\n $ValorTotalCompra = round(($PrecioProducto * $Compra), -1);\n $ValorTotalCompra01 = round(($PrecioProducto * $Compra01), -1);\n $ValorTotalCompra02 = round(($PrecioProducto * $Compra02), -1);\n\n $ValorPorClasificacionAempeno = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('A',1,$Categoria_Producto)),-1);\n $ValorPorClasificacionACompra = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('A',2,$Categoria_Producto)),-1);\n $ValorPorClasificacionACompra01 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('A',3,$Categoria_Producto)),-1);\n $ValorPorClasificacionACompra02 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('A',4,$Categoria_Producto)),-1);\n\n $ValorPorClasificacionBempeno = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('B',1,$Categoria_Producto)),-1);\n $ValorPorClasificacionBCompra = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('B',2,$Categoria_Producto)),-1);\n $ValorPorClasificacionBCompra01 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('B',3,$Categoria_Producto)),-1);\n $ValorPorClasificacionBCompra02 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('B',4,$Categoria_Producto)),-1);\n\n $ValorPorClasificacionCempeno = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('C',1,$Categoria_Producto)),-1);\n $ValorPorClasificacionCCompra = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('C',2,$Categoria_Producto)),-1);\n $ValorPorClasificacionCCompra01 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('C',3,$Categoria_Producto )),-1);\n $ValorPorClasificacionCCompra02 = round(($PrecioProducto * $this->getVerPorcentajeClasificacion('C',4,$Categoria_Producto)),-1);\n\n if($Clasificacion == 'C'){\n $td_row = \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCempeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra.\"</td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n }\n\n if($Clasificacion == 'B'){\n $td_row = \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCempeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra.\"</td>\";\n\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorTotalEmpeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra.\"</td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 90px;'></td>\";\n }\n\n if($Clasificacion == 'A'){\n $td_row = \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCempeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionCCompra.\"</td>\";\n\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBempeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionBCompra.\"</td>\";\n\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionAempeno.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionACompra02.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionACompra01.\"</td>\";\n $td_row .= \"<td class='tdhideImporte right currency text-right' style='display: none;min-width: 90px;'>\".$ValorPorClasificacionACompra.\"</td>\";\n }\n\n if($Clasificacion == 'D'){\n $td_row = \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n $td_row .= \"<td class='tdhideImporte' style='display: none;min-width: 70px;'></td>\";\n }\n\n\n\n switch($opc){\n case 1:\n return $ValorTotalEmpeno;\n break;\n case 2:\n return $ValorTotalCompra;\n break;\n case 3:\n echo $td_row;\n break;\n case 4:\n // retornar c Empeno\n return $ValorPorClasificacionCempeno;\n break;\n case 5:\n // retornar c Empeno\n return $ValorPorClasificacionCCompra02;\n break;\n case 6:\n // retornar c Empeno\n return $ValorPorClasificacionCCompra01;\n break;\n case 7:\n // retornar c Empeno\n return $ValorPorClasificacionCCompra;\n break;\n case 8:\n // retornar b Empeno\n return $ValorPorClasificacionBempeno;\n break;\n case 9:\n // retornar b Empeno\n return $ValorPorClasificacionBCompra02;\n break;\n case 10:\n // retornar b Empeno\n return $ValorPorClasificacionBCompra01;\n break;\n case 11:\n // retornar b Empeno\n return $ValorPorClasificacionBCompra;\n break;\n case 12:\n // retornar a Empeno\n return $ValorPorClasificacionAempeno;\n break;\n case 13:\n // retornar a Empeno\n return $ValorPorClasificacionACompra02;\n break;\n case 14:\n // retornar a Empeno\n return $ValorPorClasificacionACompra01;\n break;\n case 15:\n // retornar a Empeno\n return $ValorPorClasificacionACompra;\n break;\n }\n\n }", "public function getDataCarrera()\n {\n return $this->data_carrera;\n }", "final public function precio(int $com_cliente_id, int $com_producto_id): float|array\n {\n\n $com_producto = $this->registro(registro_id: $com_producto_id, columnas_en_bruto: true, retorno_obj: true);\n if(errores::$error){\n return $this->error->error(mensaje: 'Error al obtener producto',data: $com_producto);\n }\n $com_cliente = (new com_cliente(link: $this->link))->registro(registro_id: $com_cliente_id,\n columnas_en_bruto: true,retorno_obj: true);\n if(errores::$error){\n return $this->error->error(mensaje: 'Error al obtener cliente',data: $com_cliente);\n }\n\n $precio = $this->precio_final(com_cliente: $com_cliente,com_producto: $com_producto);\n if(errores::$error){\n return $this->error->error(mensaje: 'Error al obtener precio',data: $precio);\n }\n\n\n return round($precio,2);\n }", "public function getQuantiteCdeCli(): ?float {\n return $this->quantiteCdeCli;\n }", "public function getProba()\n {\n return $this->proba;\n }", "public function getPremiumnetofcomminlocalcurrency()\n\t{\n\t\treturn $this->premiumnetofcomminlocalcurrency;\n\t}", "public function getCompetitivePrices() \n {\n return $this->_fields['CompetitivePrices']['FieldValue'];\n }", "public function getPorc() : int\n {\n return $this->porc;\n }", "public function getCptTva() {\n return $this->cptTva;\n }", "public function getCp()\n\t{\n\t\treturn $this->cp;\n\t}", "public function getCommisRate()\n {\n return $this->commis_rate;\n }", "function monta_corpo()\n {\n if (isset($this->array_total_participante))\n {\n foreach ($this->array_total_participante as $campo_participante => $dados_participante)\n {\n $val_grafico_participante = $dados_participante[5];\n $this->resumo_campos = $dados_participante;\n $this->monta_linha($dados_participante[5], 0, \"normal\", \"&participante=\" . urlencode($val_grafico_participante) . \"\");\n if (isset($this->array_total_pista[$campo_participante]))\n {\n foreach ($this->array_total_pista[$campo_participante] as $campo_pista => $dados_pista)\n {\n $val_grafico_pista = $dados_pista[5];\n $this->resumo_campos = $dados_pista;\n $this->monta_linha($dados_pista[5], 1, \"normal\", \"\");\n } // foreach pista\n } // isset pista\n } // foreach participante\n } // isset participante\n }", "function Obtener_Nombre_FacturaCompra($prm){\n $Obj=new mysqlhelper;\n $result= $Obj->consulta(\"SELECT Concat(LPAD(co.sgo_int_serie,3,'0'),'-',LPAD(co.sgo_int_numero,6,'0')) as sgo_vch_nrofacturacompra FROM tbl_sgo_comprobantecompra co WHERE co.sgo_int_comprobantecompra=\" . $prm);\n while ($row = mysqli_fetch_array($result))\n {\n return $row[\"sgo_vch_nrofacturacompra\"];\n }\n return \"\";\n }", "public function getProduto()\n {\n return $this->produto;\n }", "public function getProduto()\n {\n return $this->produto;\n }", "public function getNumCompte() {\n return $this->numCompte;\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getPuBrut(): ?float {\n return $this->puBrut;\n }", "function DameIdProximoCargCivl()\r\n {\r\n return $this->modelcargocvil->buscaridproximo();\r\n\r\n }", "public function getPValue() {\n $z = $this->getZScore();\n $r = new RAdapter();\n $p = $r->execute(\"pnorm($z)\")[0][0]; // Two tailed\n return (1 - $p) * 2;\n }", "private function getCpt(){\n $entityManager = $this->getDoctrine()->getManager();\n $user = $entityManager->getRepository(User::class)->findOneBy(['email' => $this->username]);\n if($user){\n // get user preferences.\n $preferences = $entityManager->getRepository(UserPreferences::class)->findOneBy( ['user_id' => $user]);\n return $preferences->getMaxDisplay();\n }\n return 10;\n }", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function prixTTC(){\n $prix_ttc = $this->prix_ht * self::$facteur_tva;\n return number_format($prix_ttc, 2);\n }", "public function getPodtcosttot()\n {\n return $this->podtcosttot;\n }", "public function getCodprice()\n {\n return $this->codprice;\n }", "static public function ctrSumaTotalCompras(){\n\n\t\t$tabla = \"tbl_producto\";\n\n\t\t$respuesta = ModeloProductos::mdlSumaTotalCompras($tabla);\n\n\t\treturn $respuesta;\n\n\t}" ]
[ "0.74874175", "0.7092159", "0.7065224", "0.7047745", "0.70286065", "0.70286065", "0.70286065", "0.70286065", "0.68198186", "0.6663336", "0.6564277", "0.6541938", "0.6390556", "0.62910986", "0.62819445", "0.62772113", "0.6199085", "0.61603427", "0.6159055", "0.61314857", "0.60997564", "0.6099649", "0.60644853", "0.6035155", "0.6035155", "0.60331535", "0.60306704", "0.6009829", "0.6008197", "0.60071516", "0.6006141", "0.5985393", "0.59712285", "0.5950073", "0.59495217", "0.5940904", "0.5939167", "0.5928743", "0.5927487", "0.5924388", "0.5904384", "0.58851314", "0.58774716", "0.5865333", "0.5860307", "0.5857512", "0.58498216", "0.58481413", "0.5842241", "0.5825133", "0.58129495", "0.5784051", "0.57821995", "0.5778674", "0.576666", "0.5764193", "0.5753116", "0.5742115", "0.5742115", "0.57322097", "0.57304376", "0.5730357", "0.571969", "0.5719678", "0.5719", "0.571454", "0.5689257", "0.56853616", "0.567616", "0.56737155", "0.5672276", "0.5668363", "0.56682295", "0.56619", "0.5657206", "0.5653898", "0.56500643", "0.56497496", "0.5644725", "0.5641782", "0.56348956", "0.56316084", "0.5626484", "0.5626402", "0.5620543", "0.5616303", "0.5614164", "0.56123585", "0.56123585", "0.55978656", "0.5592612", "0.5591508", "0.5591007", "0.55905443", "0.5582951", "0.55740917", "0.5570972", "0.55679244", "0.5564051", "0.55551803" ]
0.8460351
0
Set the value of precio_compra
Задайте значение precio_compra
public function setPrecio_compra($precio_compra) { $this->precio_compra = $precio_compra; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function testSetValoriseCp() {\n\n $obj = new Bulletins();\n\n $obj->setValoriseCp(10.092018);\n $this->assertEquals(10.092018, $obj->getValoriseCp());\n }", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public function setPrecio_compra_total($precio_compra_total)\n {\n $this->precio_compra_total = $precio_compra_total;\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = floatval($precio);\n\n return $this;\n }", "public function set_compra($total,$alumno)\r\n\t\t{\r\n\t\t\t$sql=\"INSERT INTO compras (precio_total,fechas,alumnos) VALUES(\".$total.\",'NOW()',\".$alumno.\")\";\r\n\t\t\t$this->query($sql);\r\n\t\t\t$res=$this->execute();\r\n\t\t}", "public function otroPrecio($posicion,$precio){\n $coleccion=$this->getFunciones();\n $coleccion[$posicion]->setPrecio($precio);\n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "public function testSetProvCp() {\n\n $obj = new Bulletins();\n\n $obj->setProvCp(10.092018);\n $this->assertEquals(10.092018, $obj->getProvCp());\n }", "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function testSetTotAcompteCp() {\n\n $obj = new Bulletins();\n\n $obj->setTotAcompteCp(10.092018);\n $this->assertEquals(10.092018, $obj->getTotAcompteCp());\n }", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "public function setProcesos($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->procesos !== $v) {\n $this->procesos = $v;\n $this->modifiedColumns[] = comlabPeer::PROCESOS;\n }\n\n\n return $this;\n }", "public function testSetFacturationComptaPrec() {\n\n // Set a Date/time mock.\n $facturationComptaPrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationComptaPrec($facturationComptaPrec);\n $this->assertSame($facturationComptaPrec, $obj->getFacturationComptaPrec());\n }", "function setProgreso($progreso) {\r\n\t\t$this->progreso = $progreso;\r\n\t}", "public function setCompte($compte)\n {\n $this->compte = $compte;\n\n \n }", "public function testSetCumMtCpPris() {\n\n $obj = new Bulletins();\n\n $obj->setCumMtCpPris(10.092018);\n $this->assertEquals(10.092018, $obj->getCumMtCpPris());\n }", "public function SetNumerodaConta($valor){\n\t\t $this->numerodaConta= $valor;\n\t }", "public function setLPUParcial ($orcamento) {\n $this->setOrcamento($orcamento);\n $this->setOrcamentoId($orcamento->getId());\n $this->save(); \n }", "public function set_imagenC($valor){\n $this->ImagenC = \"02\".trim($valor);\n }", "public function testSetNbJourCpAcquis() {\n\n $obj = new Etablissements();\n\n $obj->setNbJourCpAcquis(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpAcquis());\n }", "public function testSetProvCp1() {\n\n $obj = new Bulletins();\n\n $obj->setProvCp1(10.092018);\n $this->assertEquals(10.092018, $obj->getProvCp1());\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function testSetCumMtCpPris1() {\n\n $obj = new Bulletins();\n\n $obj->setCumMtCpPris1(10.092018);\n $this->assertEquals(10.092018, $obj->getCumMtCpPris1());\n }", "public function testSetChomPartielCp() {\n\n $obj = new Bulletins();\n\n $obj->setChomPartielCp(10.092018);\n $this->assertEquals(10.092018, $obj->getChomPartielCp());\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "function getPrecio() {\n return $this->precio;\n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "static public function mdlModificarPrecioCombo($tabla,$datosProducto){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET precio = :precio, stock = :stock WHERE id = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datosProducto[\"id\"], PDO::PARAM_INT);\n\t\t$stmt -> bindParam(\":precio\", $datosProducto[\"idCategoria\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":stock\", $datosProducto[\"idSubCategoria\"], PDO::PARAM_STR);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\t\t\n\t}", "public function testSetNbJourCpAcquis() {\n\n $obj = new Bulletins();\n\n $obj->setNbJourCpAcquis(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpAcquis());\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function testSetNumCptPayeur() {\n\n $obj = new PointageReglementsTetes();\n\n $obj->setNumCptPayeur(\"numCptPayeur\");\n $this->assertEquals(\"numCptPayeur\", $obj->getNumCptPayeur());\n }", "public function setPlaca($parametroPlaca){\r\n //Validação da placa\r\n \r\n $this->placa = $parametroPlaca;\r\n }", "function precio($precio)\n {\n $precio = number_format($precio, 0, '.', '.');\n\n return $precio;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function testSetIndCp() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setIndCp(10.092018);\n $this->assertEquals(10.092018, $obj->getIndCp());\n }", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "public function setPro_peso($pro_peso)\n {\n $this->pro_peso = str_replace(',', '.', $pro_peso);\n }", "public function testSetCumImpos() {\n\n $obj = new Bulletins();\n\n $obj->setCumImpos(10.092018);\n $this->assertEquals(10.092018, $obj->getCumImpos());\n }", "public function testSetBrutCaisseCp() {\n\n $obj = new Bulletins();\n\n $obj->setBrutCaisseCp(10.092018);\n $this->assertEquals(10.092018, $obj->getBrutCaisseCp());\n }", "public function setConta($valor) {\n\t\t$this->conta = $valor;\n\t}", "function SetCnPar($p,$v){\n $this->Cn[$p] = $v;\n }", "public function setCoeficienteEntornoPueblo($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_coeficienteEntornoPueblo != $data) {\n $this->_logChange('coeficienteEntornoPueblo');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_coeficienteEntornoPueblo = $data;\n } else if (!is_null($data)) {\n $this->_coeficienteEntornoPueblo = (string) $data;\n } else {\n $this->_coeficienteEntornoPueblo = $data;\n }\n return $this;\n }", "private function setMinComp($val)\n {\n $this->settings['min_comp'] = $val;\n }", "function crear_compra()\r\n {\r\n $total=filter_input(INPUT_POST, 'total');\r\n\r\n $alumno=$this->model->get_alumno($_SESSION['iduser']);\r\n $this->model->set_compra($total,$alumno[0]['id_alumnos']);\r\n }", "function set_commissioner_price()\n {\n $commissioner_price = $this->input->post(\"commissioner_price\");\n $this->sale_lib->set_commissioner_price($commissioner_price);\n $this->_reload();\n }", "public function setPricing();", "function set_fecha_ctr_correlativas($parametros)\n\t{\n\t\tif ($parametros['fecha_ctr_correlat'] != \"''\" ) \n\t\t{\n\t\t\t$fecha = $this->get_fecha_ctr_correlativas($parametros);\n\t\t\t$nueva_fecha = self::strToMDY($parametros['fecha_ctr_correlat']);\n\t\t\tif (isset($fecha['FECHA'])) {\n\t\t\t\t$sql = \"UPDATE ufce_fechas_ctr_correlat\n\t\t\t\t\t\t\tSET fecha = $nueva_fecha\n\t\t\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \"; \n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"INSERT INTO ufce_fechas_ctr_correlat (anio_academico, periodo_lectivo, fecha)\n\t\t\t\t\t\t\tVALUES ({$parametros['anio_academico']}, {$parametros['periodo']}, $nueva_fecha) \"; \n\t\t\t}\n\t\t\tkernel::db()->ejecutar($sql);\n\t\t}\n\t}", "function setQuantidadeConsumida($quantidadeConsumida) {\n $this->quantidadeConsumida = $quantidadeConsumida;\n }", "public function calcularCURP( ) {\n \tif ($this->validarVacio()) {\n \t$this->CURP='';\n //inicial del primer apellido\n $this->apellidop= $this->depurar($this->apellidop);\n $this->CURP[0]=$this->apellidop[0];\n //primera vocal del primer apellido\n $this->CURP[1]=$this->primeraVocalInterna($this->apellidop);\n //inical del segundo apellido\n $this->apellidom= $this->depurar($this->apellidom);\n $this->CURP[2]=$this->apellidom[0];\n //inicial del nombre de pila\n //@TODO creo que el nombre de pila es el ultimo nombre que tengas\n $nombrePila= $this->depurar($this->nombre);\n $this->CURP[3]=$nombrePila[0];\n //los siguientes 6 caracteres son la fecha anio,mes,dia\n //@TODO quizas deberia de usar timestamp para pasar toda la fecha junta\n $this->CURP[4]=$this->fechaanio[2];\n $this->CURP[5]=$this->fechaanio[3];\n $this->CURP[6]=$this->fechames[0];\n $this->CURP[7]=$this->fechames[1];\n $this->CURP[8]=$this->fechadia[0];\n $this->CURP[9]=$this->fechadia[1];\n //si es hombre es H si es mujer M\n $this->CURP[10]=$this->sexo;\n //la entidad federativa son dos caracteres dadas por entidad donde nacio\n $this->CURP[11]=$this->entidad[0];\n $this->CURP[12]=$this->entidad[1];\n //la primera consonate de primer apellido,segundo apellido, nombre de pila\n $this->CURP[13]=$this->primeraConsonanteInterna($this->apellidop);\n $this->CURP[14]=$this->primeraConsonanteInterna($this->apellidom);\n $this->CURP[15]=$this->primeraConsonanteInterna($nombrePila);\n $this->CURP[16]='0';\n $this->CURP[17]=$this->calcularDigitoVerificador();\n\t}else{\n \techo 'colocar todos los datos';\n }\n }", "public function testSetNbJourCpPris() {\n\n $obj = new Bulletins();\n\n $obj->setNbJourCpPris(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpPris());\n }", "public function fillCapValue()\n\t{\n\t\t$product = $this->product;\n\t\t\n\t\t// cap is reliable\n\t\tif($this->cap && !$this->cap_for_reference && !$this->value)\n\t\t{\n\t\t\t$this->value = $this->cap / $product->initial_cap;\n\t\t\t$this->value_for_reference = true;\n\t\t}\n\t\t\n\t\t// value is reliable\n\t\tif($this->value && !$this->value_for_reference && !$this->cap)\n\t\t{\n\t\t\t$this->cap = $product->initial_cap * $this->value;\n\t\t\t$this->cap_for_reference = true;\n\t\t}\n\t\t\n\t\t// inferior value required\n\t\tif(in_array($product->type, array('伞型', '结构化')) && (!$this->value_inferior || $this->value_inferior_for_reference))\n\t\t{\n\t\t\tif(empty($product->meta->劣后资金规模) || empty($product->meta->杠杆配比))\n\t\t\t{\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t\n\t\t\t$cap_inferior = $product->meta->劣后资金规模;\n\t\t\t$cap_preferred = $product->meta->劣后资金规模 * $product->meta->杠杆配比;\n\t\t\t$this->value_inferior = ($this->cap - $cap_preferred - $product->getCost($this->date)) / $cap_inferior;\n\t\t\t$this->value_inferior_for_reference = true;\n\t\t}\n\t\t\n\t\t$total_dividend = $product->quotes()->where('date', '<', $this->date)->get()->reduce(function($total_dividend, $quote)\n\t\t{\n\t\t\treturn $quote->dividend ? $total_dividend + $quote->dividend : $total_dividend;\n\t\t}\n\t\t, 0);\n\t\t\n\t\t$total_dividend += $this->dividend;\n\t\t\n\t\t$this->value_total = ($this->cap + $total_dividend) / $product->initial_cap;\n\t\t\n\t\treturn $this;\n\t}", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "public function setCoPessoa($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->co_pessoa !== $v) {\n $this->co_pessoa = $v;\n $this->modifiedColumns[] = PessoaPeer::CO_PESSOA;\n }\n\n\n return $this;\n }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "public function testSetTvaFictivePrec() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePrec(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePrec());\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setValor($valor){\n $this->valor = $valor;\n }", "function monta_corpo()\n {\n if (isset($this->array_total_participante))\n {\n foreach ($this->array_total_participante as $campo_participante => $dados_participante)\n {\n $val_grafico_participante = $dados_participante[5];\n $this->resumo_campos = $dados_participante;\n $this->monta_linha($dados_participante[5], 0, \"normal\", \"&participante=\" . urlencode($val_grafico_participante) . \"\");\n if (isset($this->array_total_pista[$campo_participante]))\n {\n foreach ($this->array_total_pista[$campo_participante] as $campo_pista => $dados_pista)\n {\n $val_grafico_pista = $dados_pista[5];\n $this->resumo_campos = $dados_pista;\n $this->monta_linha($dados_pista[5], 1, \"normal\", \"\");\n } // foreach pista\n } // isset pista\n } // foreach participante\n } // isset participante\n }", "public function set_cotizacion_detalle_precio(float $cotizacion_detalle_precio) : void {\n $this->cotizacion_detalle_precio = $cotizacion_detalle_precio;\n }", "public function actualizarCampos2($tabla, $clavePrimaria, $camposValores) {\n\n foreach ($clavePrimaria as $campoCPrimaria => $campoValorCP) {\n \n }\n\n $longitud = count($camposValores);\n $x = 0;\n foreach ($camposValores as $camposDb => $valoresUs) {\n $camposActualizar.=$camposDb . '= ' . $valoresUs;\n if ($x < $longitud - 1) {\n $camposActualizar.=', ';\n }\n $x++;\n }\n\n $query = \" UPDATE \" . $tabla . ' SET ' . $camposActualizar . ' WHERE ' . $campoCPrimaria . \"= \" . $campoValorCP;\n //echo $query.'<br />';\n $result = $this->_conexion->query($query);\n }", "public function testSetGpecMntExoCotSecu() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setGpecMntExoCotSecu(10.092018);\n $this->assertEquals(10.092018, $obj->getGpecMntExoCotSecu());\n }", "public function testSetPu() {\n\n $obj = new TempsPasses();\n\n $obj->setPu(10.092018);\n $this->assertEquals(10.092018, $obj->getPu());\n }", "public function setCoEmpresa($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->co_empresa !== $v) {\n $this->co_empresa = $v;\n $this->modifiedColumns[] = PessoaPeer::CO_EMPRESA;\n }\n\n if ($this->aEmpresa !== null && $this->aEmpresa->getCoEmpresa() !== $v) {\n $this->aEmpresa = null;\n }\n\n\n return $this;\n }", "public function setIdcompra($idcompra)\n {\n $this->idcompra = $idcompra;\n }", "public function setValorCampo($valor){\r\n $this->valor_campo = $valor;\r\n }", "private function setValor($valor) {\n $this->valor = (float) str_replace(',', '.', $valor);\n }", "public function testSetCumRttPris() {\n\n $obj = new Bulletins();\n\n $obj->setCumRttPris(10.092018);\n $this->assertEquals(10.092018, $obj->getCumRttPris());\n }", "public function setFacturationComptaPrec(?DateTime $facturationComptaPrec): Clients {\n $this->facturationComptaPrec = $facturationComptaPrec;\n return $this;\n }", "public function atualizar($parametros)\n\t{\n\t\tif (isset($parametros->_0, $parametros->_1) AND is_numeric($parametros->_1))\n\t\t{\n\t\t\t$produto_identificador = $parametros->_0;\n\t\t\t$quantidade = $parametros->_1;\n\t\t\tif (isset($_SESSION['carrinho'][$produto_identificador]))\n\t\t\t{\n\t\t\t\tif ($quantidade > 0)\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['carrinho'][$produto_identificador]['quantidade'] = $quantidade;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tunset($_SESSION['carrinho'][$produto_identificador]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\theader('Location: '.SITE_URL.'/carrinho');\n\t\texit;\n\t}", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function setPiso($data)\n {\n\n if ($this->_piso != $data) {\n $this->_logChange('piso');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_piso = $data;\n } else if (!is_null($data)) {\n $this->_piso = (string) $data;\n } else {\n $this->_piso = $data;\n }\n return $this;\n }", "public function testSetPourcent() {\n\n $obj = new HistoPaieAnal();\n\n $obj->setPourcent(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcent());\n }", "public function setColeccionPropio($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->coleccion_propio !== $v || $this->isNew()) {\n\t\t\t$this->coleccion_propio = $v;\n\t\t\t$this->modifiedColumns[] = AlpzaMiembroAnexoPeer::COLECCION_PROPIO;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function testSetTauxRetTrCps() {\n\n $obj = new Etablissements();\n\n $obj->setTauxRetTrCps(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxRetTrCps());\n }", "public function testSetFacturationPaiePrec() {\n\n // Set a Date/time mock.\n $facturationPaiePrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationPaiePrec($facturationPaiePrec);\n $this->assertSame($facturationPaiePrec, $obj->getFacturationPaiePrec());\n }", "public function testSetMtICpCp() {\n\n $obj = new Bulletins();\n\n $obj->setMtICpCp(10.092018);\n $this->assertEquals(10.092018, $obj->getMtICpCp());\n }", "public function testSetPourcentExo() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentExo(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentExo());\n }", "public function setCpfAttribute($value)\n {\n $this->attributes['cpf'] = preg_replace( '/[^0-9]*/', '', $value);\n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function setPma($comp)\n {\n $this->pma = (boolean)$comp;\n return $this;\n }", "public function setPr($value)\n {\n return $this->set(self::PR, $value);\n }", "public function setCelular($p_celular){\r\n\t$this->celular=$p_celular;\r\n}", "public function setCompetitivePrices($value) \n {\n $this->_fields['CompetitivePrices']['FieldValue'] = $value;\n return;\n }", "public function assignElCentroEffective($el_centro_effective) { $this->el_centro_effectives[] = $el_centro_effective; }", "public function testSetIndemnCpPlaf() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setIndemnCpPlaf(10.092018);\n $this->assertEquals(10.092018, $obj->getIndemnCpPlaf());\n }", "public function testSetCompteChargeFc() {\n\n $obj = new Etablissements();\n\n $obj->setCompteChargeFc(\"compteChargeFc\");\n $this->assertEquals(\"compteChargeFc\", $obj->getCompteChargeFc());\n }", "public function setQntAulas($valor){\n\t\t\t$this->qntAulas = $valor;\n\t\t}", "public function ControlarPagoDeFactura()\n\t{\n\t\t// marca como pagada\n\t\t\n\t\t$f\t=\t$this->GetFacturaCompra();\n\t\t// una factura de compra puede pagarse como anticipos de ordenes de compra\n\t\t// o con pagos parciales\n\t\tif(!$f->IsPendienteDePago())\n\t\t{\n\t\t\t$f->PendienteDePago = 'NO';\n\t\t\t$f->save();\n\t\t}\n\t}" ]
[ "0.71076846", "0.70677704", "0.67330074", "0.6459018", "0.6191557", "0.6095861", "0.6041207", "0.5968187", "0.594055", "0.59145397", "0.5905806", "0.5862397", "0.5862397", "0.5856345", "0.58331513", "0.57981473", "0.5779106", "0.574451", "0.57389694", "0.5730813", "0.56362194", "0.56089294", "0.55975217", "0.5570637", "0.5564999", "0.5487534", "0.547447", "0.5467716", "0.54325664", "0.5422905", "0.5414035", "0.53826445", "0.53783894", "0.53783894", "0.53783894", "0.53783894", "0.53731674", "0.536832", "0.5368194", "0.53644705", "0.53566235", "0.53482246", "0.5336535", "0.5328325", "0.5301055", "0.5299581", "0.52925974", "0.5286684", "0.5257728", "0.52386516", "0.5221001", "0.5220693", "0.52159137", "0.5211201", "0.5199533", "0.5195", "0.5174307", "0.51724386", "0.51716125", "0.5169252", "0.51689905", "0.5139973", "0.5127905", "0.5127225", "0.5125725", "0.5124465", "0.5123419", "0.5111782", "0.5104276", "0.5103379", "0.51006407", "0.5088422", "0.5083385", "0.5057787", "0.50567955", "0.50564414", "0.5047055", "0.5021282", "0.50203633", "0.5017818", "0.5010848", "0.501047", "0.50086355", "0.5003811", "0.499803", "0.49974653", "0.49955365", "0.49929792", "0.49921548", "0.49907503", "0.4978424", "0.49783468", "0.49747944", "0.49639785", "0.49624097", "0.4938238", "0.49357742", "0.49340367", "0.49328512", "0.49299356" ]
0.7168897
0
Get the value of costos_directos
Получить значение costos_directos
public function getCostos_directos() { return $this->costos_directos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function costoPesos()\n {\n $costodsmv = ($this->costodsmv) ? $this->costodsmv : 0;\n return salario::smv(Config::get('sicare.entidad.zona')) * $costodsmv;\n }", "public function setCostos_directos($costos_directos)\n {\n $this->costos_directos = $costos_directos;\n return $this;\n }", "public function costo()\n {\n $this->calcularCosto();\n\n return $this->costoFormato();\n }", "public function cost() {\n\t\treturn $this->meta( 'wprm_cost', '' );\n\t}", "public function getCargoDirectivo( ){\n\t\treturn $this->cargoDirectivo;\n\t}", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "static public function ctrMostrarCentroCostos($valor){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostos($valor);\n\n\t\treturn $respuesta;\n\n }", "public function getCoste_total(){\n\t\treturn $this->coste_total;\n\t}", "private function costos()\n {\n return DB::table('pagoesquedeta')\n ->join('pagoperador', 'pagoperador.id', '=', 'pagoesquedeta.pago_id')\n ->where('pagoesquedeta.esquema_id', $this->idesquema)\n ->select('pagoesquedeta.id', 'pagoesquedeta.pago_id', 'pagoesquedeta.valor', 'pagoperador.cargo')\n ->orderBy('pagoperador.cargo', 'ASC')\n ->get();\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "function get_cost() {\n if(($v=$this->is_selected()) !== false) {\n return $this->costs[$v];\n }\n return 0;\n }", "public function getCostoTotal()\n {\n return $this->costoTotal;\n }", "public function grabarDetallePuestoaCentroCosto($datos) {\n $oLRrhh = new LRrhh();\n $resultado = $oLRrhh->grabarDetallePuestoaCentroCosto($datos);\n return $resultado;\n }", "public function getGastos_directos()\n {\n return $this->gastos_directos;\n }", "public function getOehshdiscfrtcost()\n {\n return $this->oehshdiscfrtcost;\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "static public function ctrMostrarCentroCostosCaja(){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostosCaja();\n\n\t\treturn $respuesta;\n\n }", "static public function ctrMostrarCentroCostosResumen($valor){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostosResumen($valor);\n\n\t\treturn $respuesta;\n\n }", "private function calcularCosto()\n {\n $this->costo = 0;\n if($this->odontogramaDientes->count() > 0) {\n // hay dientes\n foreach ($this->odontogramaDientes as $odontogramaDiente) {\n if ($odontogramaDiente->tieneTratamientos()) {\n foreach ($odontogramaDiente->getTratamientos() as $tratamiento) {\n $this->costo += $tratamiento->getDienteTratamiento()->getCosto();\n }\n }\n }\n }\n\n if ($this->tieneOtrosTratamientos()) {\n foreach ($this->otrosTratamientos as $otroTratamiento) {\n $this->costo += $otroTratamiento->getOtroTratamiento()->getCosto();\n }\n }\n }", "function get_sgd_pnufe_codi() {\n\treturn $this->sgd_pnufe_codi;\n}", "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "function oaGetDiscountValue( $cartContent, $log )\r\n{\r\n\t$price = oaGetClearPrice( $cartContent );\r\n\t$res = dscCalculateDiscount( $price, $log );\r\n\treturn $res['discount_standart_unit'];\r\n}", "public function getPodtcost()\n {\n return $this->podtcost;\n }", "public function getNetShippingCost();", "public function getDirect() {}", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getStatisticsPci(){\n\t\t\treturn json_decode(self::getClient()->getStatisticsPci($this->getDomain()));\n\t\t}", "public function totalColecao(){\r\n $oSicasDespesaGolBD = new SicasDespesaGolBD();\r\n return $oSicasDespesaGolBD->totalColecao();\r\n }", "public function getCost() {\r\n return $this->cost;\r\n }", "public function getCustpo()\n {\n return $this->custpo;\n }", "public function getCostoEquipo()\n {\n return $this->costo_equipo;\n }", "public function getCost() {\n return $this->cost;\n }", "public function getCost(){\n\t \tif ($this->getAttr('cost') != 0){\n\t\t\treturn h( $this->getAttr('cost') . \" \" . $this->Currency->getAttr('code')); \n\t\t}\t\n\t }", "public function getDiscmo()\r\n\t{\r\n\t\treturn($this->discmo);\r\n\t}", "public function getCostoMantenimiento()\n {\n return $this->costoMantenimiento;\n }", "public function getPodtforeigncosttot()\n {\n return $this->podtforeigncosttot;\n }", "public function getCost($destination, $courier)\n {\n $headers = [\n \"content-type\"=>\"application/x-www-form-urlencoded\",\n \"key\"=>''.$this->api_key\n ];\n $client = new Client(['headers'=>$headers]);\n $params = array('origin'=>22, 'destination'=>$destination, 'weight'=>1000, 'courier'=>$courier);\n $request = $client->post($this->endpoint.'/cost', [\n 'form_params' => $params]);\n $status = $request->getStatusCode();\n // dd($status);\n $response = $request->getBody();\n $hasil = json_decode($response, true);\n if($status==200){\n return json_decode($response, true)['rajaongkir']['results'][0]['costs'][0]['cost'][0]['value'];\n }\n }", "public function getCostCategory(){\n \treturn $this->cost_category;\n }", "public function getOedtcost()\n {\n return $this->oedtcost;\n }", "public function getDataOperacao() {\n return $this->data_operacao;\n }", "public function DirectionsValue() {\n\treturn NULL;\t// not currently supported for buyer\n }", "public function getAtiShippingCost();", "public function getOtradisc()\r\n\t{\r\n\t\treturn($this->otradisc);\r\n\t}", "public function getPodtforeigncost()\n {\n return $this->podtforeigncost;\n }", "public function getCost() {\n\t\t\treturn $this->cost;\n\t\t}", "public function costoCarrera($carrera){\n $sql = \"SELECT costo FROM carreras WHERE \".$carrera.\"\";\n $data = $this->mysql->query($sql);\n \n return $data; \n }", "public function getPodtcosttot()\n {\n return $this->podtcosttot;\n }", "public function getCostProperty()\n\t{\n\t\treturn $this->costProperty;\n\t}", "function getCost($origin, $destination, $weight, $courier = null) {\n $response = CJSON::decode($this->rest->post('api/cost', [\n 'origin' => $origin,\n 'destination' => $destination,\n 'weight' => $weight,\n 'courier' => $courier,\n ]));\n return isset($response['rajaongkir']['results']) ? $response['rajaongkir']['results'] : null;\n }", "public function getOrderShippingCost($params, $shipping_cost)\n\t{\n\t\tglobal $cart;\n\t\t$currency_id=$cart->id_currency;\t\t\n\t\t$RataConversie = Db::getInstance()->getRow('select conversion_rate from '._DB_PREFIX_.'currency where id_currency = '.$currency_id.'');\n\t\t$RataConversie[\"conversion_rate\"]=round((float)$RataConversie[\"conversion_rate\"],4);\n\t\t\n\t\t//selectare rata conversie leu\n\t\t$RataConversieLeu = Db::getInstance()->getRow('select conversion_rate from '._DB_PREFIX_.'currency where iso_code=\"RON\"');\n\t\t$RataConversieLeu[\"conversion_rate\"]=round((float)$RataConversieLeu[\"conversion_rate\"],4);\n\t\t\n\t\t//echo $RataConversieLeu[\"conversion_rate\"];\n\t\t\n\t\t\n\t\tif (!Configuration::get('fancourier_enabled')) {\n\t\t\treturn false;\n\t\t}\n\n $suma_fixa = Configuration::get('fancourier_suma_fixa');\n\n if (!isset($this->context->cart)) {\n if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n return $suma_fixa;\n } else {\n $delivery_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('select * from `'._DB_PREFIX_.'fancourier_delivery_info` where id_cart = \\''.($params->id).'\\'');\n foreach ($delivery_info as $delivery)\n {\n $shipping_cost = $shipping_cost + $delivery[\"price\"];\n return $shipping_cost;\n }\n }\n }\n \n $address = new Address((int)($this->context->cart->id_address_delivery));\n \n $username = Configuration::get('fancourier_username');\n $parola = Configuration::get('fancourier_password');\n $clientid = Configuration::get('fancourier_clientid');\n $parcel = Configuration::get('fancourier_parcel');\n $labels = Configuration::get('fancourier_labels');\n $ramburs = Configuration::get('fancourier_ramburs');\n $content = Configuration::get('fancourier_content');\n $serviciu = Configuration::get('fancourier_serviciu');\n $paymentdest = Configuration::get('fancourier_paymentdest');\n $paymentrbdest = Configuration::get('fancourier_paymentrbdest');\n $payment0 = Configuration::get('fancourier_payment0');\n $min_gratuit = Configuration::get('fancourier_min_gratuit');\n \n\t \t\t\t//transformare minim gratuit in orice valuta \n if (is_numeric($min_gratuit))\n {\n $min_gratuit=($min_gratuit*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n }\n \n $observatii = Configuration::get('fancourier_comment');\n\t\t\t\t//boby 02.05.2014 afisare persoana de contact expeditor\n\t\t\t\t$pers_contact_expeditor = Configuration::get('pers_contact_expeditor');\n\t\t\t\t//end boby\n\t\t\t\t//boby 05.05.2014 deschidere la livrare\n\t\t\t\t$optiuni = Configuration::get('deschidere_livrare');\n\t\t\t\t//end boby\n $asigurare = Configuration::get('fancourier_asigurare');\n $totalrb = Configuration::get('fancourier_totalrb');\n $onlyadm = Configuration::get('fancourier_onlyadm');\n $fara_tva = Configuration::get('fancourier_fara_tva');\n\t\t\t\t//fara km suplimentari\n\t\t\t\t//$fara_km = Configuration::get('fancourier_fara_km');\n\t\t\t\t//doar km suplimentari\n\t\t\t\t$doar_km = Configuration::get('fancourier_doar_km');\n\t\t\t\t\n $msg = \"Comanda nu a fost procesata de catre FAN Courier.<br>Va rugam sa corectati datele de livrare conform mesajului de mai jos: <br><br>\";\n\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&return=services\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n\n //$servicii_data = str_getcsv($page,\"\\n\"); // COMPATIBIL PENTRU VERSIUNE PHP > 5.3.X\n $servicii_data = explode(\"\\n\",ltrim(rtrim($page))); // COMPATIBIL PENTRU VERSIUNE PHP < 5.2.X\n\n foreach($servicii_data as $tip_serviciu_info){\n $tip_serviciu_info = str_replace('\"','',$tip_serviciu_info);\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n\n if ('FAN Courier - '.$tip_serviciu[0] == $serviciu){\n $contcolector = $tip_serviciu[1];\n if ($contcolector==1) $ramburs=1;\n $redcode = $tip_serviciu[2];\n $express = $tip_serviciu[3];\n }\n }\n\n $method_data = array();\n $error = '';\n\n if (is_numeric($min_gratuit)) $min_gratuit = $min_gratuit + 0; else $min_gratuit = 0 + 0;\n\n if ($parcel){\n $plic=\"0\";\n if (is_numeric($labels)){\n $colet=$labels;\n } else {\n $colet=1;\n }\n } else {\n $colet=\"0\";\n if (is_numeric($labels)){\n $plic=$labels;\n } else {\n $plic=1;\n }\n }\n\n if ($totalrb){\n $totalrb = \"1\";\n } else {\n $totalrb = \"0\";\n }\n\n if ($asigurare){\n $valoaredeclarata = number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '');\n } else {\n $valoaredeclarata = 0;\n }\n\n $greutate = number_format(round((float)$this->context->cart->getTotalWeight(),0), 0, '.', '');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif ($greutate>1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$plic=0;\n\t\t\t\t\t\t\t\t\t\tif (is_numeric($labels))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$colet=$labels;\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$colet=1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\n if (round((float)$this->context->cart->getTotalWeight(),0)>5) $redcode = false;\n\n $lungime=0;\n $latime=0;\n $inaltime=0;\n \n if ($paymentdest){\n $plata_expeditiei=\"destinatar\";\n }else{\n $plata_expeditiei=\"expeditor\";\n }\n\n $rambursare = '';\n $rambursare_number = 0 + 0;\n\n $plata_expeditiei_ramburs = \"\";\n\n if ($ramburs or $contcolector){\n if ($contcolector){\n $rambursare = number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '');\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n if ($paymentrbdest){\n $plata_expeditiei_ramburs=\"destinatar\";\n }else{\n $plata_expeditiei_ramburs=\"expeditor\";\n }\n } else {\n $rambursare = (string)number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '').\" LEI\";\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n if ($paymentrbdest){\n $plata_expeditiei_ramburs=\"destinatar\";\n }else{\n $plata_expeditiei_ramburs=\"expeditor\";\n }\n }\n } else {\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n }\n\n $localitate_dest = $address->city;\n\n if ($address->id_state!=0 and is_numeric($address->id_state)){\n $state_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('select name from `'._DB_PREFIX_.'state` where id_state = \\''.($address->id_state).'\\'');\n foreach ($state_info as $state)\n {\n $judet_dest = $state[\"name\"];\n }\n } else {\n $judet_dest = 'Bucuresti';\n }\n\n $localitate_dest = trim($localitate_dest);\n \n $judet_dest = trim($judet_dest);\n \n //$pers_contact_expeditor = '';\n\n $continut='';\n if ($content){\n $continut = \"\";\n foreach($this->context->cart->getProducts() as $Products){\n //$continut = $continut.', '.$Products[\"category\"];\n\t\t\t\t\t\t$continut = $continut.', '.$Products[\"quantity\"].' x '.$Products[\"name\"];\n }\n if ($continut!='') $continut = substr($continut, 2, 35);\n\n }\n\n if(trim($address->company)!=''){\n $nume_destinatar =$address->company;\n $persoana_contact = $address->firstname.\" \".$address->lastname;\n } else {\n $nume_destinatar = $address->firstname.\" \".$address->lastname;\n $persoana_contact = '';\n }\n\n $telefon = $address->phone;\n if (!is_null($address->phone_mobile) and $address->phone_mobile!='') $telefon=$telefon.\" / \".$address->phone_mobile;\n \n\n $strada = $address->address1;\n if ($address->address2!=''){\n $strada = $strada.\", \".$address->address2;\n }\n\n $postalcode = str_pad($address->postcode, 6 ,\"0\");\n\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&return=services\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n\n //$servicii_data = str_getcsv($page,\"\\n\"); // COMPATIBIL PENTRU VERSIUNE PHP > 5.3.X\n $servicii_data = explode(\"\\n\",ltrim(rtrim($page))); // COMPATIBIL PENTRU VERSIUNE PHP < 5.2.X\n\n foreach($servicii_data as $tip_serviciu_info){\n $tip_serviciu_info = str_replace('\"','',$tip_serviciu_info);\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n if ('FAN Courier - '.$tip_serviciu[0] == $serviciu){\n if ((!$contcolector or round($ramburs, 0)==0)){\n if ($tip_serviciu[1]==0 and (($tip_serviciu[2]==0 and $tip_serviciu[3]==0) or ($tip_serviciu[2]==1 and $redcode) or ($tip_serviciu[3]==1 and $express))){\n \t\t// alex g 22.04.2014\n \t\tif (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {} else {$suma_fixa=0; $totalrb=0;}\n \t\t//sfarsit alex g\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&plata_expeditiei=$plata_expeditiei&tip_serviciu=$tip_serviciu[0]&localitate_dest=$localitate_dest&judet_dest=$judet_dest&plic=$plic&colet=$colet&greutate=$greutate&lungime=$lungime&latime=$latime&inaltime=$inaltime&valoare_declarata=$valoaredeclarata&plata_ramburs=$plata_expeditiei_ramburs&ramburs=$rambursare&pers_contact_expeditor=$pers_contact_expeditor&observatii=$observatii&continut=$continut&nume_destinatar=$nume_destinatar&persoana_contact=$persoana_contact&telefon=$telefon&strada=$strada&postalcode=$postalcode&totalrb=$totalrb&admin=$onlyadm&fara_tva=$fara_tva&suma_fixa=$suma_fixa&doar_km=$doar_km&optiuni=$optiuni\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n $price = explode(\"|||\",$page);\n if (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {$price_standard = $price[0];} else {$price_standard = 0;$suma_fixa=0;}\n $link_standard = $price[1];\n if (is_numeric($price_standard) and $link_standard!=\"\")\n\t\t\t\t\t\t\t\t\t\t{\n// file_put_contents('C:/xampp/php/logs/log5.txt', 'FAN_PRICE'.$this->context->cart->id);\n //if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n // Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n // Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($suma_fixa).'\\',\\''.($link_standard).'\\')'); \n // $_SESSION['cost']=$shipping_cost;\n // return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //} else {\n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($price_standard).'\\',\\''.($link_standard).'\\')');\n $shipping_cost = $shipping_cost + $price_standard;\n $_SESSION['cost']=$shipping_cost;\n return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //}\n }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n $shipping_cost=99999;\n $_SESSION['cost']=$shipping_cost;\n return false;\n }\n }\n unset($tip_serviciu);\n } else {\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n if ($tip_serviciu[1]==1 and (($tip_serviciu[2]==0 and $tip_serviciu[3]==0) or ($tip_serviciu[2]==1 and $redcode) or ($tip_serviciu[3]==1 and $express))){\n \t\t// alex g 22.04.2014\n \t\tif (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {} else {$suma_fixa=0; $totalrb=0;}\n \t\t//sfarsit alex g\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&plata_expeditiei=$plata_expeditiei&tip_serviciu=$tip_serviciu[0]&localitate_dest=$localitate_dest&judet_dest=$judet_dest&plic=$plic&colet=$colet&greutate=$greutate&lungime=$lungime&latime=$latime&inaltime=$inaltime&valoare_declarata=$valoaredeclarata&plata_ramburs=$plata_expeditiei_ramburs&ramburs=$rambursare&pers_contact_expeditor=$pers_contact_expeditor&observatii=$observatii&continut=$continut&nume_destinatar=$nume_destinatar&persoana_contact=$persoana_contact&telefon=$telefon&strada=$strada&postalcode=$postalcode&totalrb=$totalrb&admin=$onlyadm&fara_tva=$fara_tva&suma_fixa=$suma_fixa&doar_km=$doar_km&optiuni=$optiuni\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n $price = explode(\"|||\",$page);\n if (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {$price_standard = $price[0];} else {$price_standard = 0;$suma_fixa=0;}\n $link_standard = $price[1];\n if (is_numeric($price_standard) and $link_standard!=\"\")\n\t\t\t\t\t\t\t\t\t\t{\n// file_put_contents('C:/xampp/php/logs/log5.txt', 'FAN_PRICE'.$this->context->cart->id);\n //if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n // Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n // Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($suma_fixa).'\\',\\''.($link_standard).'\\')');\n //$shipping_cost = $shipping_cost + $suma_fixa;\n\t\t\t\t\t\t\t\t\t\t\t\t // $shipping_cost = $shipping_cost + $price_standard;\n // $_SESSION['cost']=$shipping_cost;\n // return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //} \n\t\t\t\t\t\t\t\t\t\t\t\t//else \n\t\t\t\t\t\t\t\t\t\t\t\t//{ \n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($price_standard).'\\',\\''.($link_standard).'\\')');\n $shipping_cost = $shipping_cost + $price_standard;\n $_SESSION['cost']=$shipping_cost;\n return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //}\n }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n \t \n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n //echo var_dump($params); exit;\n $shipping_cost=99999;\n $_SESSION['cost']=$shipping_cost;\n //echo $_SESSION['cost'];\n \t//echo $shipping_cost; \n return false;\n }\n }\n unset($tip_serviciu);\n }\n }\n }\n \n return false;\n\n\t}", "public function getOedtcosttot()\n {\n return $this->oedtcosttot;\n }", "function getDirectorio() {\r\n\t\tglobal $tsCore, $tsUser;\r\n\t\t// Obtenemos variables via GET\r\n\t\t$pais = $tsCore->setSecure($_GET['pais']);\r\n\t\t$c_seo = $tsCore->setSecure($_GET['c_seo']);\r\n\t\t$s_seo = $tsCore->setSecure($_GET['s_seo']);\r\n\t\t// Filtramos pais\r\n\t\tif(!empty($pais) && $pais != 'Internacional') {\r\n\t\t\t$where = 'AND c.c_pais = \\''.$pais.'\\'';\r\n\t\t\tinclude('../ext/datos.php');\r\n\t\t\t$data['global_pais'] = $tsPaises[$pais];\r\n\t\t\t$data['global_url'] = $pais;\r\n\t\t} else {\r\n\t\t\t$where = '';\r\n\t\t\t$data['global_pais'] = 'Internacional';\r\n\t\t\t$data['global_url'] = 'Internacional';\r\n\t\t}\r\n\t\t// Filtramos categoria\r\n\t\tif(!empty($c_seo)) {\r\n\t\t\tif(!empty($s_seo)) {\t\t\t\t\r\n\t\t\t\t$query = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT sid, s_seo, s_nombre, c_nombre, c_seo FROM c_subcategorias LEFT JOIN c_categorias ON cid = s_type WHERE s_seo = \\''.$s_seo.'\\''));\r\n\t\t\t\t$sid = $query['sid'];\r\n\t\t\t\t$data['sub'] = $query;\r\n\t\t\t\t// Total\r\n\t\t\t\t$sql = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) AS total FROM c_comunidades AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_sub_categoria = \\''.(int)$sid.'\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'')));\r\n\t\t\t\t$data['total'] = $sql[0];\r\n\t\t\t\t// Maximo a mostrar\r\n\t\t\t\t$max = 20;\r\n\t\t\t\t$limit = $tsCore->setPageLimit($max,false,$data['total']);\r\n\t\t\t\t$data['pages'] = $tsCore->getPages($data['total'], $max);\r\n\t\t\t\t//\r\n\t\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT c.c_nombre, c.c_id, c.c_nombre_corto, c.c_descripcion, c.c_miembros, c.c_temas FROM c_comunidades AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_sub_categoria = \\''.(int)$sid.'\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' ORDER BY c.c_miembros LIMIT '.$limit);\r\n\t\t\t\t$data['data'] = result_array($query);\r\n\t\t\t} else {\r\n\t\t\t\t$query = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT cid, c_nombre FROM c_categorias WHERE c_seo = \\''.$c_seo.'\\''));\r\n\t\t\t\t$data['c_seo'] = $c_seo;\r\n\t\t\t\t$data['c_nombre'] = $query['c_nombre'];\r\n\t\t\t\t$seo = $query['cid'];\r\n\t\t\t\t//\r\n\t\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) as total, c.c_categoria, sub.s_nombre, sub.s_seo, cat.c_seo FROM c_subcategorias AS sub LEFT JOIN c_comunidades AS c ON c.c_sub_categoria = sub.sid LEFT JOIN c_categorias AS cat ON cat.cid = c.c_categoria LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_estado = \\'0\\' '.$where.' AND c.c_categoria = \\''.(int)$seo.'\\' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' GROUP BY sub.sid ORDER BY sub.s_nombre ASC');\t\t\t\r\n\t\t\t\t$data['data'] = result_array($query);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) as total, c.c_categoria, c.c_estado, cat.cid, cat.c_nombre, cat.c_seo FROM c_categorias AS cat LEFT JOIN c_comunidades AS c ON c.c_categoria = cat.cid LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_estado = \\'0\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' GROUP BY cat.cid ORDER BY cat.c_nombre ASC');\r\n\t\t\t$array = result_array($query);\r\n\t\t\t$i = 0;\r\n\t\t\tforeach($array as $dato) {\r\n\t\t\t\t$data['data'][$i] = $dato;\r\n\t\t\t\t$data['data'][$i]['sub_cat'] = result_array(db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) AS total, s.s_nombre, s.s_seo FROM c_subcategorias AS s LEFT JOIN c_comunidades AS c ON c.c_sub_categoria = s.sid WHERE c.c_estado = \\'0\\' AND s.s_type = \\''.$dato['cid'].'\\' '.$where.' GROUP BY s.sid ORDER BY total DESC LIMIT 3'));\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public function getDistributMoney()\n {\n return $this->distribut_money;\n }", "public function totalColecao(){\r\n\t\t$oSicasDespesaBD = new SicasDespesaBD();\r\n\t\treturn $oSicasDespesaBD->totalColecao();\r\n\t}", "public function getPodtlandcost()\n {\n return $this->podtlandcost;\n }", "public function getConfiguredCost() {\n $value = (int)Mage::getStoreConfig(self::CONFIG_PATH_COST);\n\n return $value;\n }", "public function getArbolCentroCostos() {\n\n $oLCronograma = new LCronograma();\n $oLCronograma->crearArbolCentroCostos();\n $oLCronograma1 = new LCronograma();\n $oLCronograma1->crearArbolCentroCostosCompleto();\n }", "public function getPsicofisico(){\n return $this->psicofisico;\n }", "public function getMetricCostsList(){\n return $this->_get(2);\n }", "public function getCostStamina()\n {\n $value = $this->get(self::COST_STAMINA);\n return $value === null ? (integer)$value : $value;\n }", "public function getCost()\n {\n return $this->car->getCost() + 4000;\n }", "public function getDataPrimoAccesso()\n {\n return $this->dataPrimoAccesso;\n }", "public function getCoxa()\n {\n return $this->coxa;\n }", "function getDeliveryPrice(): int\n{\n $result = '';\n $dbConnect = connectDB();\n\n $stmt = $dbConnect->query('SELECT delivery_cost FROM settings');\n\n $result = $stmt->fetchColumn();\n\n $dbConnect = null;\n\n return $result;\n}", "public function getOedtstancost()\n {\n return $this->oedtstancost;\n }", "static public function ctrTotDiasProd($valor){\n\n $respuesta = ModeloMovimientos::mdlTotDiasProd($valor);\n\n return $respuesta;\n\n }", "public function getPodtstanunitcost()\n {\n return $this->podtstanunitcost;\n }", "public function getCodigoTipoDirectivo( ){\n\t\treturn $this->codigoTipoDirectivo;\n\t}", "public function show(ProcesoCosto $procesoCosto)\n {\n //\n }", "public function getCodiSalo($value)\r\n {\r\n return $this->codi_salo;\r\n }", "public function getCostType()\n {\n return $this->costType;\n }", "public function getNombreDirectivo( ){\n\t\treturn $this->nombresDirectivo;\n\t}", "public function getValue(){\n $value = 0;\n \n foreach($cards as $card){\n if ($card->type == 'COM') $value += 1;\n if ($card->type == 'UNC') $value += 3;\n if ($card->type == 'RAR') $value += 7;\n if ($card->type == 'LEG') $value += 12;\n }\n \n return $value;\n }", "static public function ctrMostrarDestinoNota(){\n\n\n\t\t$respuesta = ModeloNotasSalidas::mdlMostrarDestinoNota();\n\n\t\treturn $respuesta;\n\t\t\n\t}", "public function getCost()\r\n {\r\n if ($this->cost < 0) {\r\n return $this->cost / 11 * 10; // add GST\r\n } else {\r\n return $this->cost;\r\n }\r\n }", "public function getCODCharge()\n {\n return $this->_fields['CODCharge']['FieldValue'];\n }", "public static function cost()\n {\n if (Session::get('cart'))\n {\n $items = Session::get('cart');\n\n $products = Product::findMany(array_keys(Session::get('cart')));\n\n $total = 0;\n \n foreach ($products as $product)\n {\n $amount = $items[$product->id];\n \n if ($product->price_discount)\n {\n (int)$total += $product->price_discount * (int)$amount;\n }\n else\n {\n (int)$total += $product->price * (int)$amount;\n }\n };\n\n return $total;\n };\n \n return null;\n }", "function get_car_price($occasion)\n {\n $price_total = $occasion->prijs->totaal;\n return number_format($price_total, 0, \",\", \".\");\n }", "public function getDispositivo( ) {\n\n return $this->dispositivo;\n\n }", "public function costoFormato()\n {\n return '$' . number_format($this->costo, 2);\n }", "function getShippingCost($method_id=\"\")\n {\n return 0;// it is used to output the modules in CZ. The unification. PRICE_N_A;\n }", "public function getShippingCosts()\n {\n $session = Shopware()->Session();\n $country = [ 'id' => $session['sCountry'] ];\n $payment = Shopware()->Container()->get('MoptPayoneMain')->getPaymentHelper()->getPaymentPaydirektExpress();\n if (empty($country) || empty($payment)) {\n return ['brutto' => 0, 'netto' => 0];\n }\n $shippingcosts = Shopware()->Modules()->Admin()->sGetPremiumShippingcosts($country);\n return empty($shippingcosts) ? ['brutto' => 0, 'netto' => 0] : $shippingcosts;\n }", "public function getCost($data)\n {\n /**\n * From doc:\n *\n * $data->to = string - Номер телефона получателя (либо несколько номеров, через\n * запятую — до 100 штук за один запрос) Если вы указываете несколько номеров и один из них указан неверно,\n * то возвращается код ошибки.\n *\n * $data->text = string - Текст сообщения в кодировке UTF-8. Если текст не введен, то возвращается\n * стоимость 1 сообщения. Если текст введен, то возвращается стоимость, рассчитанная по длине сообщения.\n *\n * $data->translit = int - Переводит все русские символы в латинские\n */\n $url = $this->protocol . '://' . $this->domain . '/sms/cost';\n $request = $this->sendRequest($url, $data);\n return $this->checkReplyError($request, 'getCost');\n }", "function calcularDistanciaCentral() {\n\n for ($i = 0; $i < count($this->tareas); $i++) {\n $this->tareas[$i]->setDistanciaCentral($this->tareas[$i]->distancia($this->central, \"K\"));\n }\n }", "protected function giveCost()\n\t{\n\t\t$solarSavings=2;\n\t\t$this->valueNow=210.54/$solarSavings;\n\t\treturn $this->valueNow;\n\t}", "public function getDisca()\r\n\t{\r\n\t\treturn($this->disca);\r\n\t}", "function valor_opcion($opcion_id) {\n $valor_opcion = $this->Pcrn->campo_id('sis_opcion', $opcion_id, 'valor');\n return $valor_opcion;\n }", "public function getCost()\n {\n return $this->car->getCost() + 1000;\n }", "public function getDist()\n {\n return $this->dist;\n }", "function getValueDominio($nmTabelaRelac,$nmDominio)\n\t\t{\n\t\t\n\t\t$arrDominios = p4a_db::singleton()->getAll(\"select cd_dominio, txt_valor from dominios where nm_tabela_relac = '{$nmTabelaRelac}' and nm_dominio = '{$nmDominio}'\");\n\n\t\t$arrRetorno = $arrDominios;\n\t\t\n\t\treturn $arrRetorno;\n\t\t}", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "function getTotalOrgaos(){\n return $this->orgaos;\n }", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function totalCosts()\n {\n return $this->createQueryBuilder('c')\n ->select('SUM(c.costShip) as shipping, SUM(c.costHardware) as hardware, SUM(c.costManufacturing) as manufacturing')\n ->getQuery()\n ->getSingleResult(); // Only one row\n }", "public function getAccesoOperacion() {\n\t\treturn $this->strOperacion_Acceso;\n\t}", "public function coseno($numero) {\n //con return devolvemos el valor\n return cos($numero);\n \n }", "public function getDispo()\r\n {\r\n return $this->dispo;\r\n }", "public function getTotal(){\n return $this->precio + $this->coordinacion;\n }", "public function getCODChargeTax()\n {\n return $this->_fields['CODChargeTax']['FieldValue'];\n }" ]
[ "0.663532", "0.6434315", "0.6160861", "0.6088532", "0.6044798", "0.6023532", "0.5953583", "0.5924748", "0.584449", "0.58340704", "0.5786064", "0.57763076", "0.5725359", "0.55761355", "0.5572158", "0.5548249", "0.55115604", "0.5462483", "0.53935677", "0.5391375", "0.53806233", "0.5371229", "0.5366571", "0.53549385", "0.53546655", "0.53514785", "0.53514785", "0.5347921", "0.5336936", "0.53353417", "0.5321488", "0.5297339", "0.5297218", "0.5283078", "0.5277485", "0.52742285", "0.52586603", "0.52566046", "0.52555907", "0.52513844", "0.5245388", "0.5236309", "0.52272785", "0.52257484", "0.5220337", "0.5219303", "0.5206859", "0.52016306", "0.5175826", "0.51572865", "0.514088", "0.5130859", "0.5125277", "0.5124006", "0.5114772", "0.5114572", "0.51073676", "0.51015514", "0.5083456", "0.50829995", "0.5082549", "0.50762004", "0.5073382", "0.50597566", "0.5058056", "0.5054598", "0.5052303", "0.50500464", "0.5050028", "0.50482", "0.5039824", "0.5035508", "0.5021616", "0.5019997", "0.50163436", "0.50140125", "0.5009448", "0.49984607", "0.4993239", "0.49763623", "0.49740285", "0.49733758", "0.49710023", "0.4968478", "0.4967219", "0.4965649", "0.49648607", "0.49648318", "0.49600142", "0.49564698", "0.4952021", "0.49503598", "0.4949253", "0.49470913", "0.4946655", "0.49440828", "0.4941996", "0.49272025", "0.49240887", "0.49239686" ]
0.7981647
0
Set the value of costos_directos
Задайте значение costos_directos
public function setCostos_directos($costos_directos) { $this->costos_directos = $costos_directos; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCostos_directos()\n {\n return $this->costos_directos;\n }", "public function setGastos_directos($gastos_directos)\n {\n $this->gastos_directos = $gastos_directos;\n return $this;\n }", "function set_prom_directa($parametros)\n\t{\n\t\t$sql = \"UPDATE ufce_materias_promo_directa \n\t\t\t\t\tSET promo_directa = 'S'\n\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \n\t\t\t\tAND materia = {$parametros['materia']} \";\n\t\treturn kernel::db()->ejecutar($sql);\n\t}", "public function setCargoDirectivo( $cargoDirectivo ){\n\t\t$this->cargoDirectivo = $cargoDirectivo;\n\t}", "public function setNumeroCreditos( $numeroCreditos ){\n\t\t$this->numeroCreditos = $numeroCreditos;\n\t}", "public function setProductos($productos)\n {\n $this->productos = $productos;\n }", "public function setOS($os)\n {\n $this->_os = $os;\n }", "Private function setDominioad($dominio){\n $this -> dominioad = $dominio;\n }", "public function setGoods_cost($value)\r\n {\r\n \t$this->_goods_cost = $value;\r\n }", "function setOds($ods) {\r\n\t\t$this->correo = $ods;\r\n\t}", "public function setCodigoTipoDirectivo( $codigoTipoDirectivo ){\n\t\t$this->codigoTipoDirectivo = $codigoTipoDirectivo;\n\t}", "public function setDomicilio($p_domicilio){\r\n\t$this->domicilio=$p_domicilio;\r\n}", "public function setCost($cost) {\n\t\t\t$this->cost = $cost;\n\t\t}", "public function updateCostosPersonal()\n {\n\n /*\n # code...\n $personalTareos = PersonalTareo::all();\n\n foreach ($personalTareos as $personalTareo) {\n \n $idPersona = $personalTareo->persona_id;\n\n $persona = Persona::find($idPersona);\n\n $personalTareo->costo_h = $persona->costo_h;\n $personalTareo->save();\n\n }*/\n\n \n\n }", "public function setDono($dono)\n {\n $this->dono = $dono;\n }", "public function setDispositivo( $dispositivo ) {\n\n $this->dispositivo=$dispositivo;\n $this->enviarDispositivo();\n //$this->activarPantalla();\n }", "Function setDiretorio($pDiretorio) \t\t{ $this->diretorio \t= $pDiretorio;}", "public function setCustoAttribute($value)\n {\n $this->attributes['custo'] = $this->verificaAtributo($value);\n }", "public function setOtradisc($otradisc)\r\n\t{\r\n\t\t$this->otradisc = $otradisc;\r\n\t}", "function set($clave, $valor, $force=true){\n\t\t$this->CreaSiNoExiste();\n\t\t\n\t\t$param = $_SESSION[\"parametros_globales\"];\n\t\t$param[$clave] = $valor;\n\t\t$_SESSION[\"parametros_globales\"] = $param;\n\n\t\t$valor_s = sql($valor);\n\t\t$clave_s = sql($clave);\n\t\t\n\t\t$sql = \"UPDATE npp_system_param SET system_param_value = '$valor_s' WHERE system_param_title='$clave_s' \";\n\t\tquery($sql);\n\t}", "public function setNombreDirectivo( $nombresDirectivo ){\n\t\t$this->nombresDirectivo = $nombresDirectivo;\n\t}", "public function setDiscountedCost($cost)\n {\n $this->discountedCost = $cost;\n }", "function set_Datos($pcDireccion,$pdFecha,$pcIp,$pcOperacion,$pcMotivo,$pcCampo,$pcTabla,$pcValorAnterior,$pcValorNuevo,$pcUsuario,$pcServicio)\n\t\t{\n\t\t\t$this->lcDireccion=$pcDireccion;\n\t\t\t$this->ldFecha=$pdFecha;\n\t\t\t$this->lcIp=$pcIp;\n\t\t\t$this->lcOperacion=$pcOperacion;\n\t\t\t$this->lcCampo=$pcCampo;\n\t\t\t$this->lcTabla=$pcTabla;\n\t\t\t$this->lcMotivo=$pcMotivo;\n\t\t\t$this->lcValorAnterior=$pcValorAnterior;\n\t\t\t$this->lcValorNuevo=$pcValorNuevo;\n\t\t\t$this->lcUsuario=$pcUsuario;\n\t\t\t$this->lcServicio=$pcServicio;\n\t\t}", "public function setShipping(float $cost);", "public function set_discount_tax($value)\n {\n }", "function setObjeto($idobjeto){\n $idobjeto['idcartas'] = $this->idcartas;\n OperaBD::inserta('datos.objetoscartas',$idobjeto);\n }", "public function setIdDirectivo( $idDirectivo ){\n\t\t$this->idDirectivo = $idDirectivo;\n\t}", "function setEsOtrosEgresos(){\n\t\t//$xO->es_estadistico(\"0\");//Si es estadistico, operacion base estadisticos.- Obsoleto pero usado.\n\t\t//Agregar clase efectivo\n\t\t//Cambiar el recibo que afecta\n\t\t$this->getObj()->recibo_que_afecta(RECIBOS_TIPO_OEGRESOS);\n\t\t$this->getObj()->query()->update()->save($this->getObj()->idoperaciones_tipos()->v());\n\t\t$this->setCleanCache();\n\t}", "public function createDirecto()\n {\n $account = get_option('woo_directo_account');\n $key = get_option('woo_directo_key');\n $this->directo = new Directo($account, $key);\n }", "public function setDirect($bool) {\r\n\t\t$this->direct = $bool;\r\n\t}", "function resetear_prom_directa($parametros)\n\t{\n\t\t$sql = \"UPDATE ufce_materias_promo_directa \n\t\t\t\t\tSET promo_directa = 'N'\n\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \";\n\t\treturn kernel::db()->ejecutar($sql);\n\t}", "public function setPosicion( $posicion, $foco ) {\n $this->posicion[$this->obtenerIdFoco($foco)]=$posicion;\n //activar y enviar\n }", "protected function setAccesoOperacion($strAcceso) {\n\t\t$this->strOperacion_Acceso = $strAcceso;\n\t}", "public function setShipToContact(?string $value): void {\n $this->getBackingStore()->set('shipToContact', $value);\n }", "public function setCobrodomicilio($p_cobrodomicilio){\r\n\t$this->cobrodomicilio=$p_cobrodomicilio;\r\n}", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public static function setOS(string $os)\n {\n self::$os = $os;\n }", "public function SetSaldoDisponivel($valor){\n\t\t $this->saldo_disponivel= $valor;\n\t }", "public function setFechaVencimientoDirectivo( $fechaVencimientoDirectivo ){\n\t\t$this->fechaVencimientoDirectivo = $fechaVencimientoDirectivo;\n\t}", "public function setDataOperacao($data_operacao) {\n $this->data_operacao = $data_operacao;\n }", "function setValores($proveedor,$fecha_pedido,$dir_entrega,$orden_produccion,$fecha_requerida,$estado,$n_pedido,$fecha_desde,$fecha_hasta,$fecha_entrega,$estado_op,$id_sede,$paginacion) {\n\t\t$this->proveedor = $proveedor;\n\t\t$this->fecha_pedido = $fecha_pedido;\n\t\t$this->dir_entrega = $dir_entrega;\n\t\t$this->orden_produccion = $orden_produccion;\n\t\t$this->fecha_requerida = $fecha_requerida;\n\t\t$this->estado = $estado;\n\t\t$this->n_pedido = $n_pedido;\n\t\t$this->fecha_desde = $fecha_desde;\n\t\t$this->fecha_hasta = $fecha_hasta;\n\t\t$this->fecha_entrega = $fecha_entrega;\n\t\t$this->estado_op = $estado_op;\n\t\t$this->id_sede = $id_sede;\n\t\t$this->paginacion = $paginacion;\n\t\t\t\t\n\t\t$this->prepararConsulta();\n\t}", "public function costoPesos()\n {\n $costodsmv = ($this->costodsmv) ? $this->costodsmv : 0;\n return salario::smv(Config::get('sicare.entidad.zona')) * $costodsmv;\n }", "function Setceldas($cc)\n{\n \n $this->celdas=$cc;\n}", "public function setProducto($value){\n\t\tif($this->validateId($value)){\n\t\t\t$this->producto = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function setShippingCost($shipping_cost)\n\t{\n\t\t$this->shipping_cost = $shipping_cost;\n\t}", "public function setContacto($contacto) {\n $this->_contacto = $contacto;\n }", "public function setDiscmo($discmo)\r\n\t{\r\n\t\t$this->discmo = $discmo;\r\n\t}", "public function setValueTipoCurso( $value ) {\n\t\t$element = $this->getElement('NU_SEQ_TIPO_CURSO_CAD');\n\t\t$element->setValue($value);\n\t}", "protected function setExtraDiscount($value){\n \n $this->extraDiscount = $value;\n }", "function set_shipping($cost = NULL) \n\t\t{\n\t\t\t$this->_session_start(); \n\t\t\n\t\t\tif ($cost != NULL)\n\t\t\t{\n\t\t\t\t$_SESSION['cartthrob']['shipping']['quoted_shipping_cost'] = $cost; \n\t\t\t\treturn $cost; \n\t\t\t\n\t\t\t}\n\t\t\telseif (isset($_SESSION['cartthrob']['shipping']['quoted_shipping_cost'] ))\n\t\t\t{\n\t\t\t\treturn $_SESSION['cartthrob']['shipping']['quoted_shipping_cost'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t}", "public function setPayToContact(?string $value): void {\n $this->getBackingStore()->set('payToContact', $value);\n }", "function setCost( $amount, $info=null )\r\n\t{\r\n\t\t$this->cost = array();\r\n\r\n\t\t$amount = AECToolbox::correctAmount( $amount );\r\n\r\n\t\t$cost = new mammonCost();\r\n\t\t$cost->set( 'type', 'cost' );\r\n\r\n\t\tif ( !empty( $info ) && is_array( $info ) ) {\r\n\t\t\t$content = array_merge( array( 'amount' => $amount ), $info );\r\n\r\n\t\t\t$cost->set( 'cost', $content );\r\n\t\t} else {\r\n\t\t\t$cost->set( 'cost', array( 'amount' => $amount ) );\r\n\t\t}\r\n\r\n\t\t$this->cost[] = $cost;\r\n\r\n\t\t// Compute value of total cost\r\n\t\t$total = 0;\r\n\t\tforeach ( $this->cost as $citem ) {\r\n\t\t\t$total += $citem->renderCost();\r\n\t\t}\r\n\r\n\t\t// Set total cost object\r\n\t\t$cost = new mammonCost();\r\n\t\t$cost->set( 'type', 'total' );\r\n\t\t$cost->set( 'cost', array( 'amount' => $total ) );\r\n\r\n\t\tif ( $cost->isFree() ) {\r\n\t\t\t$this->free = true;\r\n\t\t}\r\n\r\n\t\t$this->cost[] = $cost;\r\n\t}", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function set_cart_contents_tax($value)\n {\n }", "function setDireccion($elementoMenu,$direccionWeb){\r\n\t\t\t$elemento=$this->menu[$elementoMenu];\r\n\t\t\t$elemento[\"url\"]=$direccionWeb;\r\n\t\t}", "public function uppdateDireccion($index, $datos)\n\t{\n\t\tif (isset ($datos['tipo']) && $datos['tipo'] != 0 && ($datos['tipo']) != $this->direccion[$index]->getTipo ())\n\t\t{\n\t\t\t$this->direccion[$index]->setTipo ($datos['tipo']);\n\t\t}\n\t\tif (isset ($datos['pais']) && $datos['pais'] != \"\" && ($datos['pais']) != $this->direccion[$index]->getPais ())\n\t\t{\n\t\t\t$this->direccion[$index]->setPais ($datos['pais']);\n\t\t}\n\t\tif (isset ($datos['poldiv']) && $datos['poldiv'] != \"\" && ($datos['poldiv']) != $this->direccion[$index]->getPoldiv ())\n\t\t{\n\t\t\t$this->direccion[$index]->setPoldiv ($datos['poldiv']);\n\t\t}\n\t\tif (isset ($datos['city']) && $datos['city'] != \"\" && ($datos['city']) != $this->direccion[$index]->getCity ())\n\t\t{\n\t\t\t$this->direccion[$index]->setCity ($datos['city']);\n\t\t}\n\t\tif (isset ($datos['calle']) && $datos['calle'] != \"\" && ($datos['calle']) != $this->direccion[$index]->getCalle ())\n\t\t{\n\t\t\t$this->direccion[$index]->setCalle ($datos['calle']);\n\t\t}\n\t\tif (isset ($datos['numero']) && $datos['numero'] != 0 && ($datos['numero']) != $this->direccion[$index]->getNumero ())\n\t\t{\n\t\t\t$this->direccion[$index]->setNumero ($datos['numero']);\n\t\t}\n\t\tif (isset ($datos['codigoPostal']) && $datos['codigoPostal'] != \"\" && ($datos['codigoPostal']) != $this->direccion[$index]->getCodigoPostal ())\n\t\t{\n\t\t\t$this->direccion[$index]->setCodigoPostal ($datos['codigoPostal']);\n\t\t}\n\t\tif (isset ($datos['piso']) && $datos['piso'] != 0 && ($datos['piso']) != $this->direccion[$index]->getPiso ())\n\t\t{\n\t\t\t$this->direccion[$index]->setPiso ($datos['piso']);\n\t\t}\n\t\tif (isset ($datos['departamento']) && $datos['departamento'] != \"\" && ($datos['departamento']) != $this->direccion[$index]->getDepartamento ())\n\t\t{\n\t\t\t$this->direccion[$index]->setDepartamento ($datos['departamento']);\n\t\t}\n\t}", "public function setDireccion($direccion) {\n $this->_direccion = $direccion;\n }", "function setTipo($stipo = '')\n {\n $this->stipo = $stipo;\n }", "public function setValor( $value ){\n\t\n\t\tarray_push( $this->valores_cliente , $value );\n\t\n\t}", "function setProgreso($progreso) {\r\n\t\t$this->progreso = $progreso;\r\n\t}", "public function setPsicofisico($psicofisico){\n $this->psicofisico = $psicofisico;\n }", "public function setDireccion($direccion) {\n $this->direccion = $direccion;\n }", "public function setOsShort(array $osShorts);", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "public function setSaldo($valor) {\n\t\t$this->saldo = $valor;\n\t}", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "public function setDisca($disca)\r\n\t{\r\n\t\t$this->disca = $disca;\r\n\t}", "public function setShippingCost($shippingCost) {\n $this->shippingCost = $shippingCost;\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function updateCarrito(){\n foreach($this->carrito as $key=>$producto){\n $cantidadUpdate = $_POST[$producto->getRefPieza()];\n if( $cantidadUpdate == 0){ unset($this->carrito[$key]); }\n else { $producto->setCantidad($cantidadUpdate); }\n }\n }", "function SetCSIMTargets($aTargets, $aAlts = '', $aWinTargets = '')\n {\n $this->csimtargets = $aTargets;\n $this->csimwintargets = $aWinTargets;\n $this->csimalts = $aAlts;\n }", "public function setOrderus(object $orderus): void {\n $this->orderus = $orderus;\n }", "protected function set_total_tax($value)\n {\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function setValue( $valor )\n\t{\n\t\t$this->_value[] = $valor;\t\t\n\t}", "protected function setColValue($value) {\n $this->getOwner()->{$this->orderAttribute} = $value;\n }", "public function setShipping() {\n $methods = $this->estimateShipping();\n if(count($methods) > 0){\n foreach($methods as $method){\n if($method->name == $this->cart->shippingMethod){\n $this->cart->shippingHandling = $method->costBeforeDiscount;\n $this->cart->shippingHandlingDiscount = $method->discount;\n $this->cart->shippingHandlingWithDiscount = $method->cost;\n break;\n }\n }\n }\n }", "public function setOS ()\n {\n }", "protected function _setDeliveryAddressToPdf($oPdf)\n {\n }", "public function setPesanDirect($pesan)\n {\n $_SESSION['pesandirect'] = $pesan;\n }", "private function calcularCosto()\n {\n $this->costo = 0;\n if($this->odontogramaDientes->count() > 0) {\n // hay dientes\n foreach ($this->odontogramaDientes as $odontogramaDiente) {\n if ($odontogramaDiente->tieneTratamientos()) {\n foreach ($odontogramaDiente->getTratamientos() as $tratamiento) {\n $this->costo += $tratamiento->getDienteTratamiento()->getCosto();\n }\n }\n }\n }\n\n if ($this->tieneOtrosTratamientos()) {\n foreach ($this->otrosTratamientos as $otroTratamiento) {\n $this->costo += $otroTratamiento->getOtroTratamiento()->getCosto();\n }\n }\n }", "public function setRegularCost($cost)\n {\n $this->regularCost = $cost;\n }", "public function setCotToOv($doc,$usuario){\n try {\n $st=\"\";\n $ws= new Metodos();\n $credito = $ws->setSalesOrderCreditLimit($doc,$usuario);\n if ($credito === \"\") {\n $result = $this->getCredito($doc);\n $bloqueo = $result[0]['BLOCKED'];\n if($bloqueo === '0') {\n $st = 'OK';\n } else if ($bloqueo == '1') {\n $st = 'FAIL_BLOCK';\n }\n }else {\n $st=\"bloqueado\";\n }\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>$st,\"msj\"=>$credito);\n } catch (Exception $e) {\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e);\n }\n }", "public function getGastos_directos()\n {\n return $this->gastos_directos;\n }", "public function setDoor($changeDoorStatu = false){\n\t\t$this->doorStatus = $changeDoorStatu;\n\t}", "public function setServizio(Servizio $servizio) {\n $this->servizio = $servizio;\n \n }", "static public function ctrMostrarCentroCostos($valor){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCentroCostos($valor);\n\n\t\treturn $respuesta;\n\n }", "public function setTotalLicensesCount(?int $value): void {\n $this->getBackingStore()->set('totalLicensesCount', $value);\n }", "public function nuevaDireccionDatos($datos)\n\t{\n\t\t$tipo = 0;\n\t\t$pais = \"\";\n\t\t$poldiv = \"\";\n\t\t$city = \"\";\n\t\t$calle = \"\";\n\t\t$numero = 0;\n\t\t$codigoPostal = \"\";\n\t\t$piso = 0;\n\t\t$departamento = \"\";\n\n\t\tforeach ($datos as $clave => $valor)\n\t\t{\n\t\t\tif ($valor != \"\" && $valor != 0)\n\t\t\t{\n\t\t\t\t${$clave} = $valor;\n\t\t\t}\n\t\t}\n\n\t\t$this->direccion[] = new Direcciones ($tipo, $pais, $poldiv, $city, $calle, $numero, $codigoPostal, $piso, $departamento);\n\t}", "public function setActivo($activo)\r\n\t{\r\n\t\t$this->activo = $activo;\r\n\t}", "function set($datos, $inicio = 0) {\r\n $this->idcasa = $datos[0 + $inicio];\r\n $this->localidad = $datos[1 + $inicio];\r\n $this->precio = $datos[2 + $inicio];\r\n $this->superficie = $datos[3 + $inicio];\r\n $this->habitaciones = $datos[4 + $inicio];\r\n }", "public function setTipoOperacao($sTipoOperacao) {\n $this->sTipoOperacao = $sTipoOperacao;\n }", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function ActualizaDatosAcceso($nombre,$indicador,$perfil=false,$cuenta){\n\t\t\n\t\t$parametros= array($nombre,$indicador,$cuenta);\n\t\t$valor=\"\";\n\t\t\n\t\tif($perfil){\n\t\t\t$valor= ', \"Perfil\"=%?';\n\t\t\t$parametros= array($nombre,$indicador,$perfil,$cuenta);\n\t\t}\n\t\t\n\t\t$sql='\n\t\t\tUPDATE \"'.$this->vEsquema.'\".\"TR001_Cuenta_Acceso\" \n\t\t\tSET \"Nombre\"=%?,\"Indicador_PDVSA\"=%? '.$valor.' \n\t\t\tWHERE \"id_Cuenta_Acceso\"=%?\n\t\t';\n\t\t\n\t\treturn $this->vConexion->ExecuteQuery($sql, $parametros);\n\t}", "function setDatos ($arregloDatos,&$datos,&$plantilla){\n\n\n\n foreach ($datos as $key => $value) {\n\n\n\n $plantilla->setVariable($key , $value);\n\n }\n\n\n\n }", "public function setDados(array $dados): void{\n $this->sku = $dados['pk_id'] ?? 0;\n $this->nome = $dados['name'] ?? '';\n $this->codigo = $dados['codigo'] ?? '';\n $this->marca = $dados['marca'] ?? 0;\n $this->precovenda = $dados['preco-venda'] ?? 0;\n $this->precocusto = $dados['preco-custo'] ?? 0;\n $this->categoria = $dados['categoria'] ?? 0;\n $this->estoqueatual= $dados['estoque-atual'] ?? 0;\n $this->estoquemin = $dados['estoque-minimo'] ?? 0;\n $this->descricao = $dados['descricao'] ?? '';\n $this->usercriador = intval($_SESSION['usersessao']['idusuario']);\n $this->inativo = isset($dados['inativo']) ? 1 : 0;\n\n }", "public function setStreetViewControl($value);", "public function setOperatingSystem(?string $value): void {\n $this->getBackingStore()->set('operatingSystem', $value);\n }" ]
[ "0.6358629", "0.5682535", "0.55229515", "0.5507696", "0.5465557", "0.528152", "0.52647954", "0.5250661", "0.52271765", "0.5184947", "0.5157178", "0.51322603", "0.5127817", "0.5100758", "0.50832975", "0.50716794", "0.5060725", "0.5045746", "0.5033273", "0.5008549", "0.49954566", "0.49800363", "0.496525", "0.4958346", "0.49526647", "0.49345824", "0.49077898", "0.4906254", "0.48888847", "0.48637006", "0.4854727", "0.48113596", "0.47982287", "0.47959653", "0.47652063", "0.47650185", "0.4760734", "0.4746518", "0.4733868", "0.4728815", "0.47244796", "0.47215137", "0.47144777", "0.47097045", "0.47076413", "0.46979043", "0.4697516", "0.4683916", "0.46781492", "0.4665342", "0.4664191", "0.4655545", "0.46487775", "0.4642397", "0.46420962", "0.46369278", "0.46308255", "0.462498", "0.46196404", "0.46139058", "0.46090215", "0.4608182", "0.4604771", "0.45998913", "0.45956066", "0.45925316", "0.45860583", "0.45827654", "0.4564493", "0.4559579", "0.45582741", "0.4544414", "0.4543579", "0.45423073", "0.4540532", "0.453736", "0.45372835", "0.45372486", "0.45293802", "0.45236745", "0.4516055", "0.45119825", "0.451133", "0.45108318", "0.45090303", "0.45057252", "0.45057175", "0.45051467", "0.4499786", "0.44943982", "0.44941548", "0.44925013", "0.44917062", "0.44917062", "0.44917062", "0.44899905", "0.44883233", "0.44882518", "0.4487377", "0.44815007" ]
0.7254307
0
Get the value of gastos_directos
Получить значение gastos_directos
public function getGastos_directos() { return $this->gastos_directos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCostos_directos()\n {\n return $this->costos_directos;\n }", "public function setGastos_directos($gastos_directos)\n {\n $this->gastos_directos = $gastos_directos;\n return $this;\n }", "public function getDirect() {}", "public function getCargoDirectivo( ){\n\t\treturn $this->cargoDirectivo;\n\t}", "public function setCostos_directos($costos_directos)\n {\n $this->costos_directos = $costos_directos;\n return $this;\n }", "public function getNombreDirectivo( ){\n\t\treturn $this->nombresDirectivo;\n\t}", "public function getDirectMedia()\n {\n return $this->getBoolKey('Direct');\n }", "public function getIdDirectivo( ){\n\t\treturn $this->idDirectivo;\n\t}", "function get_sgd_dir_tipo(){\n return $this->sgd_dir_tipo;\n}", "private function getSinglularLocation() {\n $data = ($this->type == 'page') ? 'site.content_types.'.$this->type : 'site.content_types.'.$this->type.'.'.$this->key;\n return $data;\n }", "public function os($url) {\n\t\t$data = $this->_doAnalytics($url);\n\t\t$os = $data['os'];\n\t\treturn $os;\n\t}", "public function getDirect()\n\t{\n\t\tif (!empty($this->directLink) && $this->getUrl() !== false) {\n\t\t\t\t$this->_html->load($this->_response);\n\t\t\t\treturn $this->getAll();\n\t\t}\n\t\treturn false;\n\t}", "public static function getOrgLogo()\n {\n return self::where('setting', 'org_logo')->first()->value;\n }", "public function getApiQuerydirect()\n {\n if ($this->isTestMode()) {\n return $this->coreLibrary->api_querydirect_test;\n }\n\n return $this->coreLibrary->api_querydirect_prod;\n }", "public function getApiOrderdirect()\n {\n if ($this->isTestMode()) {\n return $this->coreLibrary->api_orderdirect_test;\n }\n\n return $this->coreLibrary->api_orderdirect_prod;\n }", "Private function getDominioad(){\n return $this -> dominioad;\n }", "public function getDispositivo( ) {\n\n return $this->dispositivo;\n\n }", "public function getDominio()\n {\n return $this->dominio;\n }", "public function DirectionsValue() {\n\treturn NULL;\t// not currently supported for buyer\n }", "public function getUseDistSystem()\n {\n return $this->getParameter('useDistSystem');\n }", "public function getCodigoTipoDirectivo( ){\n\t\treturn $this->codigoTipoDirectivo;\n\t}", "public function getOS()\n {\n return $this->_os;\n }", "private function getOwner() {\n $doc = new DOMDocument();\n $doc->loadXML($this->foxml);\n $xpath = new DOMXPath($doc);\n $result = $xpath->query(\"/*[local-name()='digitalObject']/*[local-name()='objectProperties']/*[local-name()='property'][@NAME='info:fedora/fedora-system:def/model#ownerId']/@VALUE\");\n if ($result && $result->length == 1) {\n return $result->item(0)->value;\n }\n return '';\n }", "public function getSiteToSiteDataTransfer()\n {\n return $this->site_to_site_data_transfer;\n }", "function getStoreLogo($domain){\n $sql = \"SELECT files.name, files.path \"\n . \"FROM stores, files \"\n . \"WHERE stores.logo_id = files.id AND stores.domain = ?\";\n $logo = query($sql, array($domain));\n if(isset($logo[0])){\n \t\n \tif($logo[0]['name'] == 'imageurl')\n \t{\n \t\treturn $logo[0][\"path\"];\n \t}else{\n \treturn \"../../files/\" . $logo[0][\"path\"];\n }\n }\n}", "function get_sgd_doc_padre() {\nreturn $this->sgd_doc_padre;\n}", "public function getTosUri()\n {\n return $this->tosUri;\n }", "public function getOs() {\n\n $params = array(\n 'dimensions'=> 'ga:operatingSystem',\n 'metrics'=>'ga:users,ga:sessions,ga:pageviews',\n 'filters' => 'ga:country!=Madagascar;ga:pagePath=~/galeries/souvenir/'\n );\n\n return $this->analytics->data_ga->get(\n 'ga:'.$this->profile,\n '2019-01-14',\n 'today',\n 'ga:sessions',\n $params)->getRows();\n }", "public function getDirectassumed()\n\t{\n\t\treturn $this->directassumed;\n\t}", "public function getDirectassumed()\n\t{\n\t\treturn $this->directassumed;\n\t}", "function getDirectorio() {\r\n\t\tglobal $tsCore, $tsUser;\r\n\t\t// Obtenemos variables via GET\r\n\t\t$pais = $tsCore->setSecure($_GET['pais']);\r\n\t\t$c_seo = $tsCore->setSecure($_GET['c_seo']);\r\n\t\t$s_seo = $tsCore->setSecure($_GET['s_seo']);\r\n\t\t// Filtramos pais\r\n\t\tif(!empty($pais) && $pais != 'Internacional') {\r\n\t\t\t$where = 'AND c.c_pais = \\''.$pais.'\\'';\r\n\t\t\tinclude('../ext/datos.php');\r\n\t\t\t$data['global_pais'] = $tsPaises[$pais];\r\n\t\t\t$data['global_url'] = $pais;\r\n\t\t} else {\r\n\t\t\t$where = '';\r\n\t\t\t$data['global_pais'] = 'Internacional';\r\n\t\t\t$data['global_url'] = 'Internacional';\r\n\t\t}\r\n\t\t// Filtramos categoria\r\n\t\tif(!empty($c_seo)) {\r\n\t\t\tif(!empty($s_seo)) {\t\t\t\t\r\n\t\t\t\t$query = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT sid, s_seo, s_nombre, c_nombre, c_seo FROM c_subcategorias LEFT JOIN c_categorias ON cid = s_type WHERE s_seo = \\''.$s_seo.'\\''));\r\n\t\t\t\t$sid = $query['sid'];\r\n\t\t\t\t$data['sub'] = $query;\r\n\t\t\t\t// Total\r\n\t\t\t\t$sql = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) AS total FROM c_comunidades AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_sub_categoria = \\''.(int)$sid.'\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'')));\r\n\t\t\t\t$data['total'] = $sql[0];\r\n\t\t\t\t// Maximo a mostrar\r\n\t\t\t\t$max = 20;\r\n\t\t\t\t$limit = $tsCore->setPageLimit($max,false,$data['total']);\r\n\t\t\t\t$data['pages'] = $tsCore->getPages($data['total'], $max);\r\n\t\t\t\t//\r\n\t\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT c.c_nombre, c.c_id, c.c_nombre_corto, c.c_descripcion, c.c_miembros, c.c_temas FROM c_comunidades AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_sub_categoria = \\''.(int)$sid.'\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' ORDER BY c.c_miembros LIMIT '.$limit);\r\n\t\t\t\t$data['data'] = result_array($query);\r\n\t\t\t} else {\r\n\t\t\t\t$query = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT cid, c_nombre FROM c_categorias WHERE c_seo = \\''.$c_seo.'\\''));\r\n\t\t\t\t$data['c_seo'] = $c_seo;\r\n\t\t\t\t$data['c_nombre'] = $query['c_nombre'];\r\n\t\t\t\t$seo = $query['cid'];\r\n\t\t\t\t//\r\n\t\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) as total, c.c_categoria, sub.s_nombre, sub.s_seo, cat.c_seo FROM c_subcategorias AS sub LEFT JOIN c_comunidades AS c ON c.c_sub_categoria = sub.sid LEFT JOIN c_categorias AS cat ON cat.cid = c.c_categoria LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_estado = \\'0\\' '.$where.' AND c.c_categoria = \\''.(int)$seo.'\\' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' GROUP BY sub.sid ORDER BY sub.s_nombre ASC');\t\t\t\r\n\t\t\t\t$data['data'] = result_array($query);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) as total, c.c_categoria, c.c_estado, cat.cid, cat.c_nombre, cat.c_seo FROM c_categorias AS cat LEFT JOIN c_comunidades AS c ON c.c_categoria = cat.cid LEFT JOIN u_miembros AS u ON u.user_id = c.c_autor WHERE c.c_estado = \\'0\\' '.$where.' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : '&& u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' && c.c_estado = \\'0\\'').' GROUP BY cat.cid ORDER BY cat.c_nombre ASC');\r\n\t\t\t$array = result_array($query);\r\n\t\t\t$i = 0;\r\n\t\t\tforeach($array as $dato) {\r\n\t\t\t\t$data['data'][$i] = $dato;\r\n\t\t\t\t$data['data'][$i]['sub_cat'] = result_array(db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(c.c_id) AS total, s.s_nombre, s.s_seo FROM c_subcategorias AS s LEFT JOIN c_comunidades AS c ON c.c_sub_categoria = s.sid WHERE c.c_estado = \\'0\\' AND s.s_type = \\''.$dato['cid'].'\\' '.$where.' GROUP BY s.sid ORDER BY total DESC LIMIT 3'));\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public function getApiMaintenancedirect()\n {\n if ($this->isTestMode()) {\n return $this->coreLibrary->api_maintenancedirect_test;\n }\n\n return $this->coreLibrary->api_maintenancedirect_prod;\n }", "function getLinkSosMed(){\n $getSM = $this->db->query(\"SELECT * FROM ss_parametervalue WHERE parametercode = 'SOSMED' \");\n $str = '<ul>';\n foreach ($getSM->result_array() as $key => $value) {\n $opt = explode(\"|\", $value['options']);\n $str .= '<li><a href=\"'.$opt[0].'\" target=\"_blank\" title=\"'.$value['parametervalue'].'\"><i class=\"'.$opt[1].'\"></i></a></li>';\n }\n $str .= '</ul>';\n\n return $str;\n }", "public function getDistributorDetails()\n {\n return \\Auth::user()->distributor()\n ->first();\n }", "public function getOS()\n {\n return $this->os;\n }", "public function getAnyo()\r\n {\r\n return $this->anyo;\r\n }", "function _drush_get_os($os = NULL) {\n // In most cases, $os will be NULL and PHP_OS will be returned. However, if an\n // OS is specified in $os, return that instead.\n return $os ?: PHP_OS;\n}", "public function getDomaine()\n {\n return $this->domaine;\n }", "public function getDispo()\r\n {\r\n return $this->dispo;\r\n }", "public function getDma(){\n\t\treturn $this->_data->itemAt('geoplugin_dmaCode');\n\t}", "public function getServlinkAttribute() {\n \n if($this->content_type == 'doc'){\n \n $serverurl=env('APP_URL');\n $data=$serverurl.$this->content;\n }else{\n $data=null;\n }\n return $data;\n }", "public function getPOSLogo() {\n $showGiftLabel = Mage::getStoreConfig('webpos/general/webpos_logo', $this->getStoreId());\n if ($showGiftLabel)\n return Mage::getStoreConfig('webpos/general/webpos_logo', $this->getStoreId());\n return null;\n }", "public function getDirectionNav()\n {\n return Mage::getStoreConfigFlag('homesliders/slider/direction');\n }", "public function getPlatformDomain()\n {\n return Mage::getStoreConfig(self::XML_PATH_PLATFORM_DOMAIN);\n }", "static public function ctrMostrarDestinoNota(){\n\n\n\t\t$respuesta = ModeloNotasSalidas::mdlMostrarDestinoNota();\n\n\t\treturn $respuesta;\n\t\t\n\t}", "public function getCopyTo()\n {\n return $this->scopeConfig->getValue('carriers/express/copy_to', ScopeInterface::SCOPE_STORE);\n }", "public function getOsShort()\n {\n return $this->osShortDefinitions;\n }", "public function getValue()\n {\n return $this->get('Directory');\n }", "public function getDist()\n {\n return $this->dist;\n }", "public function getDispensadorSimple(){\n\t\treturn $this->dispensador_simple;\n\t}", "Function getDiretorio() \t {return ( $this->diretorio); }", "public function getDireccion_servidor()\n {\n return $this->direccion_servidor;\n }", "function is_promo_directa($parametros)\n\t{\n\t\t$sql = \"SELECT COUNT(*) as existe\n FROM ufce_materias_promo_directa\n WHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\t\t\tAND periodo_lectivo = {$parametros['periodo']}\n\t\t\t\t\t\tAND materia = {$parametros['materia']} \n\t\t\t\t\t\tAND promo_directa = 'S' \";\n\t\t$existe = kernel::db()->consultar_fila($sql, db::FETCH_ASSOC);\n\t\tif ($existe['EXISTE'] > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function getUseTaxDocumentCapture() {\n $storeId = $this->_cart->getStoreId();\n $pathPattern = 'payment/belluno_config/bellunobankslip/tax_document';\n\n return $this->_scopeConfig->getValue(\n $pathPattern,\n ScopeInterface::SCOPE_STORE,\n $storeId\n );\n }", "public function getOsInfo()\n {\n return $this->os_info;\n }", "function getNavegadorOS()\n {\n\n $browser = array(\"IE\", \"OPERA\", \"MOZILLA\", \"NETSCAPE\", \"FIREFOX\", \"SAFARI\", \"CHROME\");\n $os = array(\"WIN\", \"MAC\", \"LINUX\");\n\n # definimos unos valores por defecto para el navegador y el sistema operativo\n $info['browser'] = \"OTHER\";\n $info['os'] = \"OTHER\";\n\n # buscamos el navegador con su sistema operativo\n foreach ($browser as $parent) {\n $s = strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $parent);\n $f = $s + strlen($parent);\n $version = substr($_SERVER['HTTP_USER_AGENT'], $f, 15);\n $version = preg_replace('/[^0-9,.]/', '', $version);\n if ($s) {\n $info['browser'] = $parent;\n $info['version'] = $version;\n }\n }\n\n # obtenemos el sistema operativo\n foreach ($os as $val) {\n if (strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $val) !== false)\n $info['os'] = $val;\n }\n\n # devolvemos el array de valores\n return $info['browser'] . \"//\" . $info['version'] . \"//\" . $info['os'];\n }", "public function getTosUris()\n {\n return $this->tosUris;\n }", "function tripal_get_remote_pub($dbxref) {\n\n if(preg_match('/^(.*?):(.*?)$/', $dbxref, $matches)) {\n $remote_db = $matches[1];\n $accession = $matches[2];\n\n // check that the database is supported\n $supported_dbs = variable_get('tripal_pub_supported_dbs', array());\n if(!in_array($remote_db, $supported_dbs)) {\n return FALSE;\n }\n\n $search = array(\n 'num_criteria' => 1,\n 'remote_db' => $remote_db,\n 'criteria' => array(\n '1' => array(\n 'search_terms' => \"$remote_db:$accession\",\n 'scope' => 'id',\n 'operation' => '',\n 'is_phrase' => 0,\n ),\n ),\n );\n $pubs = tripal_get_remote_pubs($remote_db, $search, 1, 0);\n\n return $pubs['pubs'][0];\n }\n return FALSE;\n}", "public function getSERVICIOAD()\n {\n return $this->SERVICIOAD;\n }", "public function DirectivosActuales (){\n $directivos =array();\n $sql = \"SELECT CONCAT(nombresdirectivo,' ',apellidosdirectivo) as nombre \".\n \" FROM directivo \".\n \" WHERE cargodirectivo IN ( 'SECRETARIA CONSEJO DIRECTIVO', 'PRESIDENTE CONSEJO DIRECTIVO' ) \".\n \" AND fechavencimientodirectivo >= now( ) ORDER BY cargodirectivo\";\n \n \t$this->persistencia->crearSentenciaSQL( $sql );\n $this->persistencia->ejecutarConsulta( );\n while( $this->persistencia->getNext( ) ){\n\t\t\t\t$directivo = new Directivo( $this->persistencia );\n\t\t\t\t$directivo->setNombreDirectivo( $this->persistencia->getParametro( \"nombre\" ) );\n\t\t\t\t\n\t\t\t\t$directivos[ count( $directivos ) ] = $directivo;\n\t\t\t}\n\t\t\t\treturn $directivos;\t\t\n }", "public static function fetchOs(){\n\n\t}", "public function getGatewayValue();", "private function getLogoOject(){\n global $db;\n global $user_identity;\n\n $user_id = $user_identity->getLoggedUserId();\n\n $query = \"SELECT logo \n FROM companies \n WHERE company_id = $user_id\";\n $result = $db->query($query);\n while($obj = $result->fetch_object()){\n $results[] = $obj;\n }\n\n return $results[0];\n }", "function domain() {\n\t\tglobal $config;\n\t\t$domain = ($config->app->is_live == 'N') ? '' : $config->app->domain;\n\t\treturn $domain;\n\t}", "public function getMargeDirecte() {\n return $this->margeDirecte;\n }", "public function getOdsLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"application/x-vnd.oasis.opendocument.spreadsheet\");\n\t}", "public function getSysPage()\n {\n return $this->sys_page;\n }", "public function getDiretorio(): string\n {\n return $this->diretorio;\n }", "public function getPisosDistintos() {\n $aDat = $this->getDistintos($this->getPisos());\n asort($aDat,SORT_STRING);\n return $aDat;\n }", "public function getSiteDomain() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('getSiteDomain', func_get_args()));\n }", "public function osAction()\n {\n \t// OS\n \t$os = $this->campaign->getFormatedOsStats();\n\t\t\n\t\t// CLIENTS\n \t$clients = $this->campaign->getFormatedClientsStats();\n \n \treturn new ViewModel(array(\n \t\t\t'campaign' => $this->campaign,\n \t\t\t'os' => $os,\n \t\t\t'clients' => $clients,\n \t\t\t'active' => 'os'\n \t));\n }", "public function getDireccion(){\n\t\treturn $this->direccion;\n\t}", "public function logo()\n {\n $store = $this->EE->store_model->get_store_by_id($this->site_id);\n $width = $this->EE->TMPL->fetch_param('width');\n return $this->_config[\"media_url\"].$store[0][\"logo\"];\n }", "function get_anex_nomb_archivo(){\n\treturn $this->anex_nomb_archivo;\n}", "public function getDistroInfo()\n {\n $info = array();\n if (file_exists('distro.php')) {\n include('distro.php');\n if (!empty($distro_name)) {\n $info['distro_name'] = $distro_name;\n }\n }\n return $info;\n }", "public function getSponsorlogo() {}", "public function getStatisticsPci(){\n\t\t\treturn json_decode(self::getClient()->getStatisticsPci($this->getDomain()));\n\t\t}", "public function getOdtLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"application/vnd.oasis.opendocument.text\");\n\t}", "public function getLogo() {\t\t\n\t$result = $this->db->query(\"select logo from admin where admin_id='1'\");\t\n\t$logo = $result->fetch_assoc();\t\n\treturn $logo['logo'];\t}", "public function getClientOS() {\n\t\treturn $this->_clientOS;\n\t}", "public function getDireccion()\n {\n return $this->direccion;\n }", "public function getDirector_usuario()\n {\n return $this->director_usuario;\n }", "public function get_deleted_from_plato(): bool {\n\t\treturn $this->get_prop( 'deleted_from_plato' );\n\t}", "function print_filter_values_os( array $p_filter ) {\n\tprint_multivalue_field( FILTER_PROPERTY_OS, $p_filter[FILTER_PROPERTY_OS] );\n}", "public static function get_os_list() {\n\t\t$oslist = array(\n\t\t\t'ubuntu1804lts' => __( 'Ubuntu 18.04 LTS', 'wpcd' ),\n\t\t\t'ubuntu2004lts' => __( 'Ubuntu 20.04 LTS', 'wpcd' ),\n\t\t);\n\t\treturn apply_filters( 'wpcd_os_list', $oslist );\n\t}", "public function getSegmentadoladosAttribute($value)\n {\n if (! $this->segmentadoLados) {\n if (Schema::hasTable('e'.$this->codigo.'.arc')) {\n $radios = DB::table('e'.$this->codigo.'.arc')\n ->select(DB::raw(\"distinct substr(mzai,1,12) link\"))\n ->whereNotNull('segi')\n ->orwhereNotNull('segd');\n if ($radios->count()>0){\n return $this->segmentadoLados = true;\n }else{\n return $this->segmentadoLados = false;\n }\n }else{\n return $this->segmentadoLados = false;\n }\n }\n return $this->segmentadoLados;\n }", "function GetSosialMedia() {\n\t\treturn $this->db->query(\"select * from tbl_sosial_media\");\n\t}", "function sgd_doc_secuencia() {\n\tif ($this->sgd_doc_secuencia)\n\t\treturn $this->sgd_doc_secuencia;\n\telse\n\t\treturn (\"XXXXXXXXX\");\n}", "function listarOtrosgastos(){\n\t\t$this->procedimiento='snx.ft_unidadconstructivaedif_sel';\n\t\t$this->transaccion='SNX_OTG_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_item','int4');\n\t\t$this->captura('id_otrauc','int4');\n\t\t$this->captura('otrosgastos','varchar');\n\t\t$this->captura('cantidadog','numeric');\n\t\t$this->captura('valorunitario','numeric');\n\t\t$this->captura('valorog','numeric');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function get_content()\n {\n if(!$this->private_info['source']) {\n global $nsisweb;\n $record = $nsisweb->query_one_only('select source from nsisweb_pages where pageid = '.$this->get_pageid(),__FILE__,__LINE__);\n if($record) $this->private_info['source'] = $record['source'];\n }\n return $this->private_info['source'];\n }", "public function getDirectorNombre()\n { \n if (!is_null($this->docentes)) \n {\n $docente = $this->docentes->first();\n\n return optional($docente)->nomb_doce .' '. optional($docente)->pape_doce .' '. optional($docente)->sape_doce;\n }else{\n return '··· Sin director ···'; \n }\n\n }", "public function getDestination()\n {\n return $this->_fields['Destination']['FieldValue'];\n }", "public function get_domain_logo()\r\n\t{\r\n\t\t//check if b2b user\r\n\t\t$domain_auth_id = get_domain_auth_id();\r\n\t\t$domain_key = get_domain_key();\r\n\t\tif(intval($domain_auth_id) >0 && empty($domain_key) == false) {\r\n\t\t\t//B2B Can Override Logo\r\n\t\t\tif (isset($this->CI->entity_user_type) == true && $this->CI->entity_user_type == B2B_USER) {\r\n\t\t\t\t$logo_details = $GLOBALS['CI']->custom_db->single_table_records('b2b_user_details', 'logo as domain_logo', array('user_oid' => intval($this->CI->entity_user_id)));\r\n\t\t\t}\r\n\t\t\tif (@$logo_details['data'][0]['domain_logo'] == '') {\r\n\t\t\t\t$logo_details = $this->CI->custom_db->single_table_records('domain_list', 'domain_logo', array('origin' => intval(get_domain_auth_id())));\r\n\t\t\t}\r\n\t\t\t$domain_logo = $logo_details['data'][0]['domain_logo'];\r\n\t\t\tif (empty($domain_logo) == false) {\r\n\t\t\t\treturn $domain_logo;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static function get_os_description( $os ) {\n\n\t\t$return = $os;\n\n\t\tswitch ( $os ) {\n\t\t\tcase 'ubuntu1804lts':\n\t\t\t\t$return = __( 'Ubuntu 18.04 LTS', 'wpcd' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ubuntu2004lts':\n\t\t\t\t$return = __( 'Ubuntu 20.04 LTS', 'wpcd' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $return;\n\n\t}", "public function domain() {\n return $this->get('domain');\n }", "public function getOsShort();", "function getSingleValue()\n {\n return $this->_props['SingleValue'];\n }", "public function getLogo(){\n\t\t\treturn DataObject::get_one(\"Logo\");\n\t\t}", "public function getPublicarNet()\n {\n return $this->publicar_net;\n }", "public function getOs()\n {\n return $this->os;\n }" ]
[ "0.6740339", "0.6242315", "0.5668753", "0.53777856", "0.5290741", "0.52600724", "0.5216703", "0.5111957", "0.50900483", "0.5074124", "0.50595886", "0.5055695", "0.50302297", "0.50220525", "0.50113046", "0.4913424", "0.4899894", "0.4864762", "0.48143294", "0.4808551", "0.4794884", "0.4787073", "0.4771235", "0.475445", "0.47489265", "0.47481576", "0.4742299", "0.47215033", "0.46938255", "0.46938255", "0.4690226", "0.4674907", "0.4670014", "0.46659", "0.46637255", "0.46409872", "0.46377295", "0.46311486", "0.4626044", "0.46250334", "0.46235284", "0.4618721", "0.46183223", "0.46136022", "0.4613129", "0.4605859", "0.46027404", "0.46014592", "0.460113", "0.45997736", "0.4584491", "0.45834506", "0.4572571", "0.45414674", "0.45226306", "0.45165825", "0.45153096", "0.45133469", "0.4507663", "0.4504649", "0.45000434", "0.44945136", "0.44939247", "0.44906637", "0.4486742", "0.44836053", "0.44827226", "0.4479749", "0.44705546", "0.44653496", "0.44643086", "0.44629002", "0.4452962", "0.44484895", "0.44480133", "0.44431308", "0.44427085", "0.44283316", "0.44217172", "0.4411927", "0.4409731", "0.4409096", "0.44083002", "0.44080305", "0.44048303", "0.4397639", "0.43905628", "0.43900263", "0.43886703", "0.43821394", "0.43798438", "0.43790203", "0.43731943", "0.43723157", "0.43723086", "0.4371548", "0.43714792", "0.43660846", "0.43640676", "0.4362933" ]
0.79380673
0
Set the value of gastos_directos
Установите значение gastos_directos
public function setGastos_directos($gastos_directos) { $this->gastos_directos = $gastos_directos; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGastos_directos()\n {\n return $this->gastos_directos;\n }", "public function setCostos_directos($costos_directos)\n {\n $this->costos_directos = $costos_directos;\n return $this;\n }", "public function setOS($os)\n {\n $this->_os = $os;\n }", "public function setDirect($bool) {\r\n\t\t$this->direct = $bool;\r\n\t}", "public static function setOS(string $os)\n {\n self::$os = $os;\n }", "function set_prom_directa($parametros)\n\t{\n\t\t$sql = \"UPDATE ufce_materias_promo_directa \n\t\t\t\t\tSET promo_directa = 'S'\n\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \n\t\t\t\tAND materia = {$parametros['materia']} \";\n\t\treturn kernel::db()->ejecutar($sql);\n\t}", "Private function setDominioad($dominio){\n $this -> dominioad = $dominio;\n }", "public function setPages(ObjectStorage $pages):void\n {\n $this->pages = $pages;\n }", "public function setPesanDirect($pesan)\n {\n $_SESSION['pesandirect'] = $pesan;\n }", "public function setOS ()\n {\n }", "public function createDirecto()\n {\n $account = get_option('woo_directo_account');\n $key = get_option('woo_directo_key');\n $this->directo = new Directo($account, $key);\n }", "public function setIdDirectivo( $idDirectivo ){\n\t\t$this->idDirectivo = $idDirectivo;\n\t}", "public function setDest($value)\n {\n $this->set('dest', (string)$value);\n }", "Function setDiretorio($pDiretorio) \t\t{ $this->diretorio \t= $pDiretorio;}", "public function getCostos_directos()\n {\n return $this->costos_directos;\n }", "public function setOriginSystem(?string $value): void {\n $this->getBackingStore()->set('originSystem', $value);\n }", "public function setDirectoryProvisioning(?array $value): void {\n $this->getBackingStore()->set('directoryProvisioning', $value);\n }", "public function setDomains(?array $value): void {\n $this->getBackingStore()->set('domains', $value);\n }", "public function setProductos($productos)\n {\n $this->productos = $productos;\n }", "public function directors($value)\n {\n $this->setProperty('directors', $value);\n return $this;\n }", "public function setOsPlatform(?string $value): void {\n $this->getBackingStore()->set('osPlatform', $value);\n }", "protected function setRobot($value = true)\n {\n $this->_is_robot = $value;\n }", "public function setOperatingSystem(?string $value): void {\n $this->getBackingStore()->set('operatingSystem', $value);\n }", "public function setNombreDirectivo( $nombresDirectivo ){\n\t\t$this->nombresDirectivo = $nombresDirectivo;\n\t}", "public function setDireccion($direccion) {\n $this->_direccion = $direccion;\n }", "public function setInstance( DobleOS $system ){\t\t\t\r\n\t\t\tparent::setInstance($system);\r\n\t\t\t$this->oLogger = Logger::getRootLogger();\r\n\t\t\t$this->oLogger->debug( \"setIntance \".get_class($this) );\r\n\t\t\t$this->isPesistance = true;\r\n\t\t\t$this->persistenceName = $this->oSystem->getOrderActionClass()->getClassSession();\r\n\t\t}", "public function setInstance( DobleOS $system ){\t\t\t\r\n\t\t\tparent::setInstance($system);\r\n\t\t\t$this->oLogger = Logger::getRootLogger();\r\n\t\t\t$this->oLogger->debug( \"setIntance \".get_class($this) );\r\n\t\t\t$this->isPesistance = true;\r\n\t\t\t$this->persistenceName = $this->oSystem->getOrderActionClass()->getClassSession();\r\n\t\t}", "public function setInstance( DobleOS $system ){\t\t\t\r\n\t\t\tparent::setInstance($system);\r\n\t\t\t$this->oLogger = Logger::getRootLogger();\r\n\t\t\t$this->oLogger->debug( \"setIntance \".get_class($this) );\r\n\t\t\t$this->isPesistance = true;\r\n\t\t\t$this->persistenceName = $this->oSystem->getOrderActionClass()->getClassSession();\r\n\t\t}", "public function setOsShort(array $osShorts);", "public function setDispositivo( $dispositivo ) {\n\n $this->dispositivo=$dispositivo;\n $this->enviarDispositivo();\n //$this->activarPantalla();\n }", "public function setFotosAttribute($value)\n\t{\n\t\t$attribute_name = \"fotos\";\n\t\t$disk = \"public\";\n\t\t$destination_path = \"multimedia/fotos\";\n\t\t$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n\t}", "public function setUseDistSystem($value)\n {\n return $this->setParameter('useDistSystem', $value);\n }", "public function setSourceSystems(?array $value): void {\n $this->getBackingStore()->set('sourceSystems', $value);\n }", "public function setShipToContact(?string $value): void {\n $this->getBackingStore()->set('shipToContact', $value);\n }", "public function setOsName(?string $value): void {\n $this->getBackingStore()->set('osName', $value);\n }", "protected function setCanonical($content)\n {\n $this->helper->meta()->getMiscEntity()->setUrl($content);\n }", "public function setDireccion($direccion) {\n $this->direccion = $direccion;\n }", "public function setCargoDirectivo( $cargoDirectivo ){\n\t\t$this->cargoDirectivo = $cargoDirectivo;\n\t}", "public function setSingleSignOnSettings(?IosSingleSignOnSettings $value): void {\n $this->getBackingStore()->set('singleSignOnSettings', $value);\n }", "protected function setServer ($value) {\n $this->_server = $value;\n }", "public function setShareAttribute($value){\n foreach ($value as $social => $share) {\n if (!$share) { continue; }\n $numbers[] = static::$social_shares[$social];\n }\n $this->attributes['share'] = !empty($numbers) ? join('', $numbers) : 1;\n }", "public function setCodigoTipoDirectivo( $codigoTipoDirectivo ){\n\t\t$this->codigoTipoDirectivo = $codigoTipoDirectivo;\n\t}", "public function set_system($value)\n {\n // Intentionally blanks\n }", "public function setDevice(?Identity $value): void {\n $this->getBackingStore()->set('device', $value);\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "private function setOperatingSystem(): void\n {\n $this->operatingSystem = php_uname(\"s\");\n }", "public function setDomicilio($p_domicilio){\r\n\t$this->domicilio=$p_domicilio;\r\n}", "public function setProxy($value)\n {\n $this->proxy = $value;\n }", "function setLinks($links) \n {\n $this->linkValues = $links;\n }", "function setLinks($links) \n {\n $this->linkValues = $links;\n }", "public function set_public( $args ) {\n\t\t$this->update_site_status( $args, 'public', 1 );\n\t}", "public function setIsAdminManaged($value)\n {\n $this->setProperty(\"IsAdminManaged\", $value, true);\n }", "public function updateDirectoSettings($post)\n {\n foreach ($this->fields as $field) {\n update_option($field, $post[$field]);\n }\n }", "protected function setFacebook($value = true)\n {\n $this->_is_facebook = $value;\n }", "public function SetDevice($asDevice) {\n $this->device = $asDevice;\n $this->loadDeviceData();\n $this->stateManager->SetDevice($this->device);\n }", "function setDMS($dms) { /* {{{ */\n\t\t$this->_dms = $dms;\n\t}", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function setManagedDeviceId(?string $value): void {\n $this->getBackingStore()->set('managedDeviceId', $value);\n }", "public function direct($key, $value)\n\t{\n\t\t$this->__set($key, $value);\n\t}", "public function setDirector(Syringe_DirectorInterface $director);", "public function setDrainsTo($value)\n {\n $this->drainsTo = $value;\n }", "function resetear_prom_directa($parametros)\n\t{\n\t\t$sql = \"UPDATE ufce_materias_promo_directa \n\t\t\t\t\tSET promo_directa = 'N'\n\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \";\n\t\treturn kernel::db()->ejecutar($sql);\n\t}", "public function setIsRoot($value)\n {\n $this->setProperty(\"IsRoot\", $value, true);\n }", "public function setOwner(?string $value): void {\n $this->getBackingStore()->set('owner', $value);\n }", "public function setPlatform(string $value): void\n {\n $this->query['platform'] = $value;\n }", "function setRedirect($redirect = \"false\") {\r\n $this->_redirect = $this->_values[$redirect];\r\n }", "public function setDirectoryOperationAllowed($value)\n {\n $this->setPermission(self::DIRECTORY_OPPERATIONS, $value);\n }", "public function setHasOneDriveLicense(?bool $value): void {\n $this->getBackingStore()->set('hasOneDriveLicense', $value);\n }", "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "private function setFlexLINKSystem($test=null) {\n if($test)\n $this->flexLINKSystem = \"test\";\n else\n $this->flexLINKSystem = \"www\";\n }", "function setDireccion($elementoMenu,$direccionWeb){\r\n\t\t\t$elemento=$this->menu[$elementoMenu];\r\n\t\t\t$elemento[\"url\"]=$direccionWeb;\r\n\t\t}", "public function setPublicAccess($value)\n\t{\n\t\t$this->publicAccess = $value;\n\t}", "public function setIsSingleStoreModeAllowed($value);", "public function setIsDefault($value)\n {\n $this->setProperty(\"IsDefault\", $value, true);\n }", "public function setLocalSite();", "public function setDeviceManagement(?RbacApplicationMultiple $value): void {\n $this->getBackingStore()->set('deviceManagement', $value);\n }", "private function setLink($node1, $node2, $value=1){\n\t\t$data['source'] = $this->getNodeArrayPosition($node1);\n\t\t$data['target']\t= $this->getNodeArrayPosition($node2);\n\t\t$data['value'] = $value;\n\t\tarray_push($this->links,$data);\n\t}", "public function setSources(?array $value): void {\n $this->getBackingStore()->set('sources', $value);\n }", "public function setExternalStorage($value)\n {\n $this->_useExternalStorage = $value;\n }", "public function action_set_public()\n\t{\n\t\t$this->g->repo('justinhernandez', 'github-v1');\n\t\t$this->g->set_public();\n\t}", "function C_set($node, $value) {\n M::C_set($this->server, $this->name.\".\".$node, $value);\n }", "public function setPosition($value)\n {\n $link = $this->getLink($value['category']);\n $link->setProduct($this);\n $link->setOrderby($value['position']);\n\n \\XLite\\Core\\Database::getEM()->persist($link);\n \\XLite\\Core\\Database::getEM()->flush($link);\n }", "public function __set($property, $value) {\n \tswitch($property) {\n\t\t case 'site':\n\t\t \t$this->site = $value;\n\t\t \tbreak;\n\n\t\t default:\n\t\t\t parent::__set($property, $value);\n\t\t\t break;\n\t }\n\n }", "public function setStaticsUrl ($value)\n {\n $this->staticsUrl = $value;\n }", "public function setAppPublisher(?string $value): void {\n $this->getBackingStore()->set('appPublisher', $value);\n }", "function set_published($published)\r\n {\r\n $this->set_default_property(self :: PROPERTY_PUBLISHED, $published);\r\n }", "function set_published($published)\r\n {\r\n $this->set_default_property(self :: PROPERTY_PUBLISHED, $published);\r\n }", "function set_published($published)\r\n {\r\n $this->set_default_property(self :: PROPERTY_PUBLISHED, $published);\r\n }", "function set_published($published)\r\n {\r\n $this->set_default_property(self :: PROPERTY_PUBLISHED, $published);\r\n }", "function set_dir_work($value)\n{\n\t$this->_dir_work = $value;\n}", "public function setStoreLogoPath($store, $logo_path = null, $small_logo_path = null, $alt_text = null)\n\t{\t\t\n\t\t//create a groups array that has the value we want at the right location\n\t\t$groups_value = array();\n\t\tif (!empty($logo_path))\n\t\t{\n\t\t\t$groups_value['header']['fields']['logo_src']['value'] = $logo_path;\n\t\t}\n\t\tif (!empty($small_logo_path))\n\t\t{\n\t\t\t$groups_value['header']['fields']['logo_src_small']['value'] = $small_logo_path;\n\t\t}\n\t\tif (!empty($alt_text))\n\t\t{\n\t\t\t$groups_value['header']['fields']['logo_alt']['value'] = $alt_text;\n\t\t}\n\t\t\n\t\t$this->saveConfig('design', $groups_value, null, $store);\n\t\t\n\t\tMage::log('Logo set to: '.$logo_path, Zend_Log::NOTICE, 'gareth.log');\n\t}", "public function set($value);", "public function set($value);", "public function set_value($value)\n\t{\n\t\t// Check and make sure the value received as in the specified domain.\n\t\tif ( iterable($value) ) {\n\t\t\tforeach ( $value as $val ) {\n\t\t\t\tif ( !$this->has_option($val) ) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( gettype($value) == 'string' ) {\n\t\t\tif ( !$this->has_option($value) ) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t}\n\t\t\n\t\tparent::set_value($value);\n\t}", "public function setDirectoryCopyAllowed($value)\n {\n $this->setPermission(self::DIRECTORY_COPY, $value);\n }", "public function setPostOfficeBox(?string $value): void {\n $this->getBackingStore()->set('postOfficeBox', $value);\n }", "public function setLinkRetornos()\n {\n /*n*/\n }" ]
[ "0.6436655", "0.5979242", "0.5666775", "0.5555449", "0.523539", "0.5235183", "0.5202133", "0.51292706", "0.5043861", "0.5034746", "0.5030353", "0.499339", "0.4991412", "0.4964329", "0.4952632", "0.49099076", "0.48934737", "0.48460773", "0.4840609", "0.48344553", "0.4817924", "0.4812482", "0.4789108", "0.47715202", "0.47636935", "0.47388893", "0.47388893", "0.47388893", "0.47274676", "0.4705652", "0.46959543", "0.4676835", "0.46677065", "0.4664752", "0.46407282", "0.46105", "0.46063113", "0.4597416", "0.4590405", "0.4576472", "0.456682", "0.45648438", "0.45590296", "0.45580843", "0.45574316", "0.45559284", "0.45489278", "0.45466498", "0.45328906", "0.45328906", "0.45185477", "0.45154822", "0.45110738", "0.45092183", "0.4505712", "0.45006067", "0.44930074", "0.44930074", "0.44930074", "0.44909754", "0.4484583", "0.44830805", "0.4470555", "0.4465719", "0.44548348", "0.44512945", "0.44442767", "0.44351012", "0.4432579", "0.44258794", "0.44258794", "0.44258794", "0.4423062", "0.44199154", "0.44176576", "0.44163436", "0.4406304", "0.4391634", "0.43899474", "0.43890053", "0.43816185", "0.43803588", "0.43731898", "0.4371931", "0.43688074", "0.43684343", "0.43663847", "0.43644592", "0.43639264", "0.43639264", "0.43639264", "0.43639264", "0.43634677", "0.43606645", "0.43481863", "0.43481863", "0.43474686", "0.43470404", "0.4346615", "0.43458214" ]
0.7180049
0
Get the value of precio_compra_total
Получить значение precio_compra_total
public function getPrecio_compra_total() { return $this->precio_compra_total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function getValorTotal() \n {\n $total = 0;\n foreach ($this->contratoParcelas as $parcela) {\n // seta o valor total\n $totalTemp = $parcela->valor;\n \n // busca a faixa e calcula os encargos\n if ($faixaCalculo = CarteiraCalculo::findFaixa($this->carteira->id_campanha, $parcela->getAtraso())) { \n // soma o total da parcela\n $totalTemp += floor(($parcela->valor * ($faixaCalculo->multa / 100)) * 100) / 100;\n $totalTemp += floor(($parcela->valor * (($faixaCalculo->juros / 30 * $parcela->getAtraso()) / 100)) * 100) / 100;\n $totalTemp += floor(($totalTemp * ($faixaCalculo->honorario / 100)) * 100) / 100;\n \n // soma o total do contrato\n $total += $totalTemp;\n }\n }\n \n return $total;\n }", "static public function ctrSumaTotalCompras(){\n\n\t\t$tabla = \"tbl_producto\";\n\n\t\t$respuesta = ModeloProductos::mdlSumaTotalCompras($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "public function getPreco_total()\n {\n return $this->preco_total;\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "static function getTotalCompras(){\n\t\t$connection = Database::getConnection();\n\t\t$query = \"SELECT SUM(coste_total) FROM compras\";\n\t\t$result_obj = $connection->query($query);\n\t\t$result = $result_obj->fetch_array(MYSQLI_NUM);\n\t\treturn $result[0];\n\t}", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getTotal(){\n return $this->precio + $this->coordinacion;\n }", "public function totalColecao(){\r\n\t\t$oSicasProcedimentoBD = new SicasProcedimentoBD();\r\n\t\treturn $oSicasProcedimentoBD->totalColecao();\r\n\t}", "private function total_compra(){\n $total = 0;\n if(Session::get('itens')){\n foreach (Session::get('itens') as $item) {\n $total += $item['preco'];\n }\n return $total;\n }else\n return 0;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function total()\n {\n $soma = 0.0;\n foreach($this->produto as $produto)\n {\n $soma += ($produto->preco * $produto->quantidade());\n }\n return $soma;\n }", "function getPesoVolumetricoTotal(){\n $res = 0;\n foreach($this->paquetes as $pk){\n $res += $pk->getPesoVolumetrico();\n }\n return $res;\n }", "public function getCostoTotal()\n {\n return $this->costoTotal;\n }", "public function getTotalPrice(){\n $precioTotal=0;\n foreach ($this->productos as $producto){\n #calculo subtotal multiplicando precio por cantidad de productos\n $subtotal = $producto->precio * $producto->pivot->cantidad;\n #sumo subtotal a total\n $precioTotal+= $subtotal;\n };\n #convierte precioTotal en flotante de dos decimales con separador de \",\" para decimales y \".\" para miles.\n return number_format((float)$precioTotal, 2, \",\", \".\");\n }", "static public function ctrVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "public function setPrecio_compra_total($precio_compra_total)\n {\n $this->precio_compra_total = $precio_compra_total;\n return $this;\n }", "public function get_cotizacion_detalle_precio() : float {\n return $this->cotizacion_detalle_precio;\n }", "public function getCoste_total(){\n\t\treturn $this->coste_total;\n\t}", "public function calcularTotal() {\r\n foreach ($this->productos as $prods) {\r\n $total += $prods[0] * $prods[1];\r\n }\r\n return $total;\r\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "public function getValorTotal():float\n {\n return $this->valorUnitario*$this->quantidade;\n }", "public function getPodtcosttot()\n {\n return $this->podtcosttot;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "public function calcularTotal() {\n $total = 0;\n foreach ($this->lineadeDocumento as $linea) {\n $total += $linea->getPrecioT();\n }\n $this->total = $total;\n }", "static public function ctrPosibleVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalPosibleVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "function calc(){\t\t\n\t\t\n\t\treturn $this->parse_total( \n\t\t\tarray(\t\t\t\t\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => (int)$this->cargs['pa_quantity']\n\t\t\t)\n\t\t);\n\t}", "public function getTotal()\n {\n return number_format($this->getTotalLigneVente() + $this->timbre - $this->remise, 3, '.', '');\n }", "public function total(){\n return $this->carrello['totale'];\n }", "public function getValorTotal()\n {\n return $this->valor_total;\n }", "public function getPrice() {\n $prezzo= $this->prezzo;\n if ($this->sconto==true) {\n $sconto = ($prezzo * $this->percSconto) / 100;\n $prezzo = round($prezzo - $sconto, 2);\n }\n return $prezzo;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function getValorTotal(){\n\t\t\treturn $this->valorTotal;\n\t\t}", "public function get_total_price(){\n\t\treturn (float) $this->v_total_price;\n\t}", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function calcular()\n {\n // e consigo fazer isso pois um objeto pessoa foi armazenado na propriedade,\n // que nesse caso, tem o mesmo nome\n return $this->pessoa->getPeso() / ($this->pessoa->getAltura() ** 2);\n }", "public static function obtieneTotalCompraPorItem($model){\n $provider=DetalleCompra::find()->where(['id_de_compra'=>$model->id_compra])->all();\n $sumatoria=0;\n foreach($provider as $key => $val){\n //$val sería un detalle de compra\n $sumatoria=$sumatoria+($val->cantidad*$val->producto->precio);\n }\n return $sumatoria;\n \n }", "function get_car_price($occasion)\n {\n $price_total = $occasion->prijs->totaal;\n return number_format($price_total, 0, \",\", \".\");\n }", "public static function totalComprasVtasDiarias(){\n $compras=Compra::find()->where(['fecha'=>date('Y-m-d')])->all();\n $sumatoria=0;\n foreach($compras as $compra){\n foreach($compra->detallecompras as $detalle){\n $sumatoria=$sumatoria+($detalle->cantidad * $detalle->producto->precio); \n }\n }\n return $sumatoria;\n }", "public function getPodtcost()\n {\n return $this->podtcost;\n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function get_cotizacion_detalle_total() : float {\n return $this->cotizacion_detalle_total;\n }", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function getValorTotal () {\n return $this->iValorTotal;\n }", "public function getValorTotal(){\n return $this->nValorTotal;\n }", "public function getValorTotal(){\n return $this->nValorTotal;\n }", "public function getPendingTotal(): float;", "public function getValorBrutoTotal()\n {\n return $this->valorBrutoTotal;\n }", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function totalColecao(){\r\n\t\t$oSicasDespesaBD = new SicasDespesaBD();\r\n\t\treturn $oSicasDespesaBD->totalColecao();\r\n\t}", "public function totalColecao(){\r\n $oSicasLotacaoBD = new SicasLotacaoBD();\r\n return $oSicasLotacaoBD->totalColecao();\r\n }", "function precio_total() {\n\tglobal $db;\n\t$ip_add = getRealUserIp();\n\t$total = 0;\n\t$select_carrito = \"select * from carrito where ip_add='$ip_add'\";\n\t$run_carrito = mysqli_query($db, $select_carrito);\n\twhile ($record = mysqli_fetch_array($run_carrito)) {\n\t\t$pro_id = $record['p_id'];\n\t\t$pro_qty = $record['cantidad'];\n\t\t$get_price = \"select * from producto where producto_id='$pro_id'\";\n\t\t$run_price = mysqli_query($db, $get_price);\n\t\twhile ($row_price = mysqli_fetch_array($run_price)) {\n\t\t\t$sub_total = $row_price['producto_precio']*$pro_qty;\n\t\t\t$total += $sub_total;\n\t\t}\n\t}\n\n\techo \"$\".$total;\n\n}", "public function total()\n {\n return decimalFormat($this->products->sum(function ($product) {\n return $product->pivot->price_with_tax * $product->pivot->quantity;\n }, 0) + $this->carrier->price);\n }", "public function getPartiteTotalAttribute()\n {\n $subtotal = 0;\n \n $subtotal = $this->car_p1_limit_amount + $this->car_p2_limit_amount + $this->car_p3_limit_amount;\n return '€ ' . number_format((double)$subtotal, 2, ',', '.');\n }", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "public function total(): float\n {\n $total = 0;\n /* Boucle chaque element du panier, recupere le prix grace a la liaison product/Stock * quantité */\n foreach ($this->getFullCart() as $item) {\n $total += $item['stock']->getUnitPrice() * $item['quantity'];\n }\n return $total;\n }", "public function getValorTotal() {\n return $this->nValorTotal;\n }", "public function getValorTotal() {\n return $this->nValorTotal;\n }", "public function getMontoFacturado() {\n\t\t$sql = \"Select SUM(monto) as total from factura where clientes_id=\" . $this -> id;\n\t\t$sqlFactura = Yii::app() -> db -> createCommand($sql) -> queryRow();\n\t\tif ($sqlFactura['total'] == 0)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $sqlFactura['total'];\n\t}", "public function getTotalDec()\n {\n $value = $this->get(self::TOTALDEC);\n return $value === null ? (string)$value : $value;\n }", "public function total(): float;", "public function getDepositTotal(): float;", "static public function ctrTotalMesProd(){\n\n $respuesta = ModeloMovimientos::mdlTotalMesProd();\n\n return $respuesta;\n }", "public function totalCaja()\n {\n $retornar = 0;\n foreach ($this->cajas as $caja)\n {\n $retornar = $retornar + $caja->getIngreso();\n $retornar = $retornar - $caja->getEgreso();\n }\n return $retornar;\n }", "public function totalColecao(){\r\n $oSicasDespesaGolBD = new SicasDespesaGolBD();\r\n return $oSicasDespesaGolBD->totalColecao();\r\n }", "public function prixTTCPanier()\n {\n return $this->prix_ht * 1.2;\n }", "public function getMontoCancelado() {\n\t\t$sql = \"Select sum(monto) as total from abono where factura_id in (Select id from factura where clientes_id=\" . $this -> id . \" )\";\n\t\t$sqlFactura = Yii::app() -> db -> createCommand($sql) -> queryRow();\n\t\treturn $sqlFactura['total'];\n\t}", "function cart_total()\n {\n $output = $this->EE->TMPL->fetch_param('output','formatted');\n \n // return based on output parameter\n if ($output == 'formatted') {\n return $this->_format_money($this->_get_cart_total());\n } elseif ($output == 'basic') {\n return $this->_get_cart_total();\n }\n }", "public function getTotal() {\n $sum=0;\n foreach ($this->counter as $key=>$value) {\n $sum+=$this->counter[$key]['darab']*$this->counter[$key]['price'];\n }\n return $sum;\n // Ez a metódus adja vissza a kosár összegét: SUM(termék darabszáma × termék ára)\n }", "public function getPercentualDepreciado();", "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "public function prixTTC(){\n $prix_ttc = $this->prix_ht * self::$facteur_tva;\n return number_format($prix_ttc, 2);\n }", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getRealPaidTotal(): float;", "public function total()\n {\n return $this->priceTax()->multiply($this->qty);\n }", "public static function totalCompras($dataProvider2){\n $sumatoria=0;\n foreach($dataProvider2->getModels() as $key => $val){\n $sumatoria+=($val->cantidad*$val->producto->precio);\n }\n return $sumatoria;\n }", "private function discountPercetageFactura()\n {\n if($this->discount_percentage > 0)\n return round($this->discount_percentage, 2);\n else if ($this->discount_amount > 0)\n return round(\n ($this->new_net_subtotal * 100) /\n ($this->net_subtotal)\n , 2); // 2 => decimal precition\n else //pos sale without discount\n return 0;\n }", "public function getTotalProducto()\r\n {\r\n return $this->totalProducto;\r\n }", "public function total()\n {\n $sum = '0.00';\n foreach ($this->items as $item) {\n $price = bcmul($item['item']->getPrice(), (string)$item['qty'], 2);\n $sum = bcadd($sum, $price, 2);\n }\n return $sum;\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getTotal() {\n $retornar = 0;\n foreach ($this->productos as $producto)\n {\n if ($producto->getConfirmado()){\n $retornar = $retornar + ($producto->getPagado());\n }\n }\n foreach ($this->gastos as $gasto)\n {\n $retornar = $retornar - $gasto->getCantidad();\n }\n return $retornar;\n }", "public function costoPesos()\n {\n $costodsmv = ($this->costodsmv) ? $this->costodsmv : 0;\n return salario::smv(Config::get('sicare.entidad.zona')) * $costodsmv;\n }", "public function getTotal()\n {\n $value = $this->get(self::TOTAL);\n return $value === null ? (string)$value : $value;\n }", "public function getTotalCash()\n {\n $value = $this->get(self::total_cash);\n return $value === null ? (string)$value : $value;\n }", "public function getTotal(): float;", "public function getTempoTotal()\n {\n return $this->tempo_total;\n }", "function getQuantidadeConsumida() {\n return $this->quantidadeConsumida;\n }", "function totaliza()\n {\n $this->total->resumo(\"res\", $this->array_total_participante, $this->array_total_pista);\n ksort($this->array_total_participante);\n ksort($this->array_total_pista);\n }", "public function getPeso(): float;", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function getCreditMemosTotal()\n {\n $total = 0;\n $creditMemos = $this->order->getCreditmemosCollection();\n if (!empty($creditMemos)) {\n foreach ($creditMemos as $creditMemo) {\n $total += $creditMemo->getGrandTotal();\n }\n }\n\n return $total;\n }", "function cart_total()\n\t{\n\t\treturn $this->view_formatted_number($this->_calculate_total());\n\t}", "public function GetImporteLiquidado() // poner nombre GetImporteLiquidadoOrdenDeCompra\n\t{\n\t\t$total = 0.0;\n\t\t$ordenes = $this->GetLiquidacion();\n\t\tif(count($ordenes) > 0)\n\t\t{\n\t\t\tforeach ($ordenes as $o)\n\t\t\t{\n\t\t\t\t$total = $total + $o->ImporteLiquidado;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// se liquida en session\n\t\t\t$s = new Classes_Session();\n\t\t\treturn $s->GetImporteLiquidadoFacturaCompra();\n\t\t}\n\t\t\n\t\treturn $total;\n\t}", "public static function total() {\n /* Calcolo Totale considerando: IVA, Spedizione, Coupon e sconti vari */\n if( WPXSmartShop::settings()->product_price_includes_vat() ) {\n self::$vatValue = 0;\n } else {\n self::$vatValue = floatval( self::$subtotal * self::$vatPercentage / 100 );\n }\n\n /**\n * @filters\n *\n * @param float $shipping Valore della spedizione\n */\n self::$totalShipping = floatval( apply_filters( 'wpss_summary_order_shipping', self::$shipping ) );\n\n /**\n * @filters\n *\n * @param float $discount Sconto sull'ordine. Default 0\n */\n self::$discount = floatval( apply_filters( 'wpss_summary_order_discount', 0 ) );\n self::$coupon = self::applyOrderCoupon( self::$subtotal );\n self::$total = self::$subtotal + self::$vatValue + self::$shipping - self::$discount - self::$coupon;\n\n WPXSmartShopSession::orderAmount( self::$total );\n WPXSmartShopSession::orderShipping( self::$totalShipping );\n }" ]
[ "0.7862606", "0.729418", "0.7139195", "0.7057421", "0.6968409", "0.6961219", "0.69229144", "0.69229144", "0.69229144", "0.69229144", "0.6842448", "0.67989564", "0.6790085", "0.6783927", "0.677748", "0.6769371", "0.6739749", "0.67189485", "0.66412336", "0.66254294", "0.6617706", "0.66167253", "0.6603137", "0.658343", "0.6576011", "0.6566435", "0.6523066", "0.6514603", "0.6506408", "0.64918756", "0.64910454", "0.64841294", "0.64781195", "0.6463976", "0.6444616", "0.6441254", "0.6440073", "0.64035136", "0.64010537", "0.6385478", "0.63782007", "0.6371664", "0.6342152", "0.63375497", "0.6335349", "0.6327322", "0.6322671", "0.63150555", "0.63057923", "0.6302719", "0.62890464", "0.62890464", "0.6286714", "0.6280033", "0.62709016", "0.6262323", "0.62618047", "0.6261699", "0.62549824", "0.62518257", "0.6250305", "0.6243409", "0.6240811", "0.6240811", "0.6228865", "0.6216913", "0.6211986", "0.62017417", "0.62011987", "0.6198702", "0.61970747", "0.6176321", "0.6173883", "0.61500925", "0.6129928", "0.61175376", "0.61153173", "0.6114197", "0.6113194", "0.61130095", "0.61080587", "0.6081609", "0.60722166", "0.60541", "0.60523295", "0.60511667", "0.60452974", "0.6034334", "0.60265255", "0.6026169", "0.6025795", "0.6023271", "0.6022026", "0.6018082", "0.60176355", "0.6015106", "0.6014418", "0.6010964", "0.6010698", "0.6009192" ]
0.88285553
0
Set the value of precio_compra_total
Установите значение precio_compra_total
public function setPrecio_compra_total($precio_compra_total) { $this->precio_compra_total = $precio_compra_total; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function set_compra($total,$alumno)\r\n\t\t{\r\n\t\t\t$sql=\"INSERT INTO compras (precio_total,fechas,alumnos) VALUES(\".$total.\",'NOW()',\".$alumno.\")\";\r\n\t\t\t$this->query($sql);\r\n\t\t\t$res=$this->execute();\r\n\t\t}", "public function setPrecio_compra($precio_compra)\n {\n $this->precio_compra = $precio_compra;\n return $this;\n }", "public function calcularTotal() {\n $total = 0;\n foreach ($this->lineadeDocumento as $linea) {\n $total += $linea->getPrecioT();\n }\n $this->total = $total;\n }", "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function setValorTotal($valor){\n\t\t\t$this->valorTotal = $valor;\n\t\t}", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function set_total($value)\n {\n }", "public function testSetTotalPlaf() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTotalPlaf(10.092018);\n $this->assertEquals(10.092018, $obj->getTotalPlaf());\n }", "static public function ctrSumaTotalCompras(){\n\n\t\t$tabla = \"tbl_producto\";\n\n\t\t$respuesta = ModeloProductos::mdlSumaTotalCompras($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "public function testSetTotAcompteCp() {\n\n $obj = new Bulletins();\n\n $obj->setTotAcompteCp(10.092018);\n $this->assertEquals(10.092018, $obj->getTotAcompteCp());\n }", "public function getValorTotal() \n {\n $total = 0;\n foreach ($this->contratoParcelas as $parcela) {\n // seta o valor total\n $totalTemp = $parcela->valor;\n \n // busca a faixa e calcula os encargos\n if ($faixaCalculo = CarteiraCalculo::findFaixa($this->carteira->id_campanha, $parcela->getAtraso())) { \n // soma o total da parcela\n $totalTemp += floor(($parcela->valor * ($faixaCalculo->multa / 100)) * 100) / 100;\n $totalTemp += floor(($parcela->valor * (($faixaCalculo->juros / 30 * $parcela->getAtraso()) / 100)) * 100) / 100;\n $totalTemp += floor(($totalTemp * ($faixaCalculo->honorario / 100)) * 100) / 100;\n \n // soma o total do contrato\n $total += $totalTemp;\n }\n }\n \n return $total;\n }", "function totaliza()\n {\n $this->total->resumo(\"res\", $this->array_total_participante, $this->array_total_pista);\n ksort($this->array_total_participante);\n ksort($this->array_total_pista);\n }", "public function calculaCalorias()\n {\n $calorias = $this->alimento->calorias;\n $this->calorias_total = $this->quantidade * $calorias;\n }", "public function setPriceCoefficientTotalAttribute($value) {\n //Example Value: 5.08 => 508 in BDD\n $this->attributes['price_coefficient_total'] = (int)round(($value*100),0);\n }", "public function getPreco_total()\n {\n return $this->preco_total;\n }", "public function testSetAutresOpeTotal() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpeTotal(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpeTotal());\n }", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function actualizar_cuadroC($cuadro, $total, $habitos, $puntualidad, $evaluacion)\n\t{\n\t\t$this->db->query('UPDATE CUADROS_CARRERAS SET total_bloque ='.$total.', habitos_orden = \"'.$habitos.'\", punt_asist = \"'.$puntualidad.'\", evaluacion_bloque = '.$evaluacion.' where id_cuadros_carreras = '.$cuadro);\n\t}", "function calcular_total(){\r\n\t\t//$this->total = round($this->total, 2);\r\n\t}", "function set_total($camp,$pos,$tam=0,$alinea=\"\",$borde=0,$fillColor=0,$tfuen,$estilo=\"\",$valor=0){\n\n\t\t$this->totales[]=array('campo'=>$camp,'pos'=>$pos,\n\t\t\t\t\t\t\t\t\"ancho\"=>$tam,'alinea'=>$alinea,'tfuente'=>$tfuen,\n\t\t\t\t\t\t\t\t'estilo'=>$estilo,'borde'=>$borde,'relleno'=>$fillColor,\n\t\t\t\t\t\t\t\t'valor'=>$valor);\n\t}", "function crear_compra()\r\n {\r\n $total=filter_input(INPUT_POST, 'total');\r\n\r\n $alumno=$this->model->get_alumno($_SESSION['iduser']);\r\n $this->model->set_compra($total,$alumno[0]['id_alumnos']);\r\n }", "public function set_subtotal($value)\n {\n }", "public function total($value)\n {\n $this->total = $value;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "private function total_compra(){\n $total = 0;\n if(Session::get('itens')){\n foreach (Session::get('itens') as $item) {\n $total += $item['preco'];\n }\n return $total;\n }else\n return 0;\n }", "public function setPrixTotal(): self\n\n {\n $this->prixTotal = 0;\n $billets = $this->getBillets()->toArray();\n foreach ($billets as $billet) {\n $this->prixTotal += $billet->getPrix();\n }\n if ($this->demiJournee === true) {\n $this->prixTotal = $this->prixTotal / 2;\n }\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = floatval($precio);\n\n return $this;\n }", "public function SetNumerodaConta($valor){\n\t\t $this->numerodaConta= $valor;\n\t }", "public static function total() {\n /* Calcolo Totale considerando: IVA, Spedizione, Coupon e sconti vari */\n if( WPXSmartShop::settings()->product_price_includes_vat() ) {\n self::$vatValue = 0;\n } else {\n self::$vatValue = floatval( self::$subtotal * self::$vatPercentage / 100 );\n }\n\n /**\n * @filters\n *\n * @param float $shipping Valore della spedizione\n */\n self::$totalShipping = floatval( apply_filters( 'wpss_summary_order_shipping', self::$shipping ) );\n\n /**\n * @filters\n *\n * @param float $discount Sconto sull'ordine. Default 0\n */\n self::$discount = floatval( apply_filters( 'wpss_summary_order_discount', 0 ) );\n self::$coupon = self::applyOrderCoupon( self::$subtotal );\n self::$total = self::$subtotal + self::$vatValue + self::$shipping - self::$discount - self::$coupon;\n\n WPXSmartShopSession::orderAmount( self::$total );\n WPXSmartShopSession::orderShipping( self::$totalShipping );\n }", "public function testSetValoriseCp() {\n\n $obj = new Bulletins();\n\n $obj->setValoriseCp(10.092018);\n $this->assertEquals(10.092018, $obj->getValoriseCp());\n }", "function setTotalPrice($totalPrice);", "public function setAtiTotal($atiTotal);", "public function getPartiteTotalAttribute()\n {\n $subtotal = 0;\n \n $subtotal = $this->car_p1_limit_amount + $this->car_p2_limit_amount + $this->car_p3_limit_amount;\n return '€ ' . number_format((double)$subtotal, 2, ',', '.');\n }", "public function setComputerTotal(int $sum, $app)\n {\n $this->computer->setTotal($sum);\n $this->start(2, $app);\n\n // echo \" computer 2 \" . $this->turn;\n }", "public function actualizarTotalCompra(int $idCompra, int $totalActualizar){\n\n \n $this->db->where('id', $idCompra);\n\n $data = array( \n\n 'total'=> $totalActualizar\n \n \n );\n \n $this->db->update('compras',$data);\n\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "public function set_total_price($p_total_price){\n\t\t$this->v_total_price = (float) $p_total_price;\n\t}", "public function totaliza_pedido()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $this->mgt_pedido_valor_desconto->Text = '0.00';\r\n $this->mgt_pedido_valor_pedido->Text = '0.00';\r\n $this->mgt_pedido_valor_ipi->Text = '0.00';\r\n $this->mgt_pedido_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_pedidos_produtos where mgt_pedido_produto_numero_pedido = \" . trim($this->mgt_pedido_numero->Text) . \" order by mgt_pedido_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->Fields['mgt_pedido_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->Fields['mgt_pedido_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Pedidos_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_pedido_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_pedido->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "public function actualizar_cuadro($cuadro, $total, $habitos, $puntualidad, $evaluacion)\n\t{\n\t\t$this->db->query('UPDATE CUADROS SET total_bloque = '.$total.', habitos_orden = \"'.$habitos.'\", punt_asist = \"'.$puntualidad.'\", evaluacion_bloque = '.$evaluacion.' where id_cuadros = '.$cuadro);\n\t}", "function total_monto(){\n\t\tif(isset($_SESSION['carro']) && $_SESSION['carro']!=\"\"){\n\t\t\t$carro_size=count($_SESSION['carro']);\n\t\t\tif($carro_size<=0){\n\t\t\t\t$this->numero=0;\n\t\t\t\t$this->total=0;\n\t\t\t\t$this->descuento=0;\n\t\t\t}else{\n\t\t\t\t$this->numero=0;\n\t\t\t\t$this->total=0;\n\t\t\t\t$this->descuento=0;\n\t\t\t\t$total_detal=0;\n\t\t\t\t$total_mayor=0;\n\t\t\t\tforeach($_SESSION['carro'] as $valor => $indice){\n\t\t\t\t\t$this->numero = $this->numero+$_SESSION['carro'][$valor]['cantidad'];\n\t\t\t\t\t$total_detal = $total_detal+($_SESSION['carro'][$valor]['precio_det']*$_SESSION['carro'][$valor]['cantidad']);\n\t\t\t\t\t$total_mayor = $total_mayor+($_SESSION['carro'][$valor]['precio_may']*$_SESSION['carro'][$valor]['cantidad']);\n\t\t\t\t}\n\t\t\t\tif($this->numero>=100){\n\t\t\t\t\t$this->total=$total_mayor;\n\t\t\t\t\t$this->descuento=0;\n\t\t\t\t\t$this->ahorro=$total_detal-$total_mayor;\n\t\t\t\t}else if($this->numero>=100 && $this->numero<=101){\n\t\t\t\t\t$this->total=$total_detal;\n\t\t\t\t\t$this->descuento=$total_detal*0.10;\n\t\t\t\t}else{\n\t\t\t\t\t$this->total=$total_detal;\n\t\t\t\t\t$this->descuento=0;\n\t\t\t\t}\n\t\t\t\t/* for($i=0;$i<=$carro_size-1;$i++){\n\t\t\t\t\t$this->numero = $this->numero+$_SESSION['carro'][$i]['cantidad'];\n\t\t\t\t\t$this->total = $this->total+($_SESSION['carro'][$i]['precio']*$_SESSION['carro'][$i]['cantidad']);\n\t\t\t\t} */\n\t\t\t}\n\t\t}else{\n\t\t\t$this->numero=0;\n\t\t\t$this->total=0;\n\t\t\t$this->descuento=0;\n\t\t}\n\t}", "public function otroPrecio($posicion,$precio){\n $coleccion=$this->getFunciones();\n $coleccion[$posicion]->setPrecio($precio);\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setPreco_total($preco_total)\n {\n $this->preco_total = $preco_total;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "function precio_total() {\n\tglobal $db;\n\t$ip_add = getRealUserIp();\n\t$total = 0;\n\t$select_carrito = \"select * from carrito where ip_add='$ip_add'\";\n\t$run_carrito = mysqli_query($db, $select_carrito);\n\twhile ($record = mysqli_fetch_array($run_carrito)) {\n\t\t$pro_id = $record['p_id'];\n\t\t$pro_qty = $record['cantidad'];\n\t\t$get_price = \"select * from producto where producto_id='$pro_id'\";\n\t\t$run_price = mysqli_query($db, $get_price);\n\t\twhile ($row_price = mysqli_fetch_array($run_price)) {\n\t\t\t$sub_total = $row_price['producto_precio']*$pro_qty;\n\t\t\t$total += $sub_total;\n\t\t}\n\t}\n\n\techo \"$\".$total;\n\n}", "public function getCostoTotal()\n {\n return $this->costoTotal;\n }", "function set_totalizar($camp,$pos,$tam=0,$alinea=\"\",$borde=0,$fillColor=0,$tfuen,$estilo=\"\",$valor=0){\n\n\t\t$this->totalizar[]=array('campo'=>$camp,'pos'=>$pos,\n\t\t\t\t\t\t\t\t\"ancho\"=>$tam,'alinea'=>$alinea,'tfuente'=>$tfuen,\n\t\t\t\t\t\t\t\t'estilo'=>$estilo,'borde'=>$borde,'relleno'=>$fillColor,\n\t\t\t\t\t\t\t\t'valor'=>$valor);\n\t}", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function testSetIntracomTotal() {\n\n $obj = new DecTva3519();\n\n $obj->setIntracomTotal(10.092018);\n $this->assertEquals(10.092018, $obj->getIntracomTotal());\n }", "public function setBase($total);", "public function ajustarPreco($percentual = 0)\n {\n if (is_numeric($percentual) && $percentual > 0) {\n $this->preco *= (1 + ($percentual / 100));\n }\n }", "public function testSetCumMtCpPris() {\n\n $obj = new Bulletins();\n\n $obj->setCumMtCpPris(10.092018);\n $this->assertEquals(10.092018, $obj->getCumMtCpPris());\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "static public function ctrVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "public function getTotal(){\n return $this->precio + $this->coordinacion;\n }", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "public function getValorTotal():float\n {\n return $this->valorUnitario*$this->quantidade;\n }", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public function testSetNbJourCpAcquis() {\n\n $obj = new Etablissements();\n\n $obj->setNbJourCpAcquis(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpAcquis());\n }", "function setTotalValue( $value )\r\n {\r\n $this->TotalValue = $value;\r\n setType( $this->TotalValue, \"integer\" );\r\n }", "public function calcularTotal() {\r\n foreach ($this->productos as $prods) {\r\n $total += $prods[0] * $prods[1];\r\n }\r\n return $total;\r\n }", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "public function testSetTauxRetTrCps() {\n\n $obj = new Etablissements();\n\n $obj->setTauxRetTrCps(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxRetTrCps());\n }", "public function getTotalPrice(){\n $precioTotal=0;\n foreach ($this->productos as $producto){\n #calculo subtotal multiplicando precio por cantidad de productos\n $subtotal = $producto->precio * $producto->pivot->cantidad;\n #sumo subtotal a total\n $precioTotal+= $subtotal;\n };\n #convierte precioTotal en flotante de dos decimales con separador de \",\" para decimales y \".\" para miles.\n return number_format((float)$precioTotal, 2, \",\", \".\");\n }", "static public function ctrPosibleVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalPosibleVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "function update_total()\n {\n $this->db->begin();\n\n // Clean parameters\n if (empty($this->total_localtax1)) $this->total_localtax1=0;\n if (empty($this->total_localtax2)) $this->total_localtax2=0;\n\n // Mise a jour ligne en base\n $sql = \"UPDATE \".MAIN_DB_PREFIX.\"repairdet SET\";\n $sql.= \" total_ht='\".price2num($this->total_ht).\"'\";\n $sql.= \",total_tva='\".price2num($this->total_tva).\"'\";\n $sql.= \",total_localtax1='\".price2num($this->total_localtax1).\"'\";\n $sql.= \",total_localtax2='\".price2num($this->total_localtax2).\"'\";\n $sql.= \",total_ttc='\".price2num($this->total_ttc).\"'\";\n $sql.= \" WHERE rowid = \".$this->rowid;\n\n dol_syslog(\"RepairLine::update_total sql=$sql\");\n\n $resql=$this->db->query($sql);\n if ($resql)\n {\n $this->db->commit();\n return 1;\n }\n else\n {\n $this->error=$this->db->error();\n dol_syslog(\"RepairLine::update_total Error \".$this->error, LOG_ERR);\n $this->db->rollback();\n return -2;\n }\n }", "public function updateTempoTotal(ConnectionInterface $con)\n {\n $this->setTempoTotal($this->computeTempoTotal($con));\n $this->save($con);\n }", "function monta_corpo()\n {\n if (isset($this->array_total_participante))\n {\n foreach ($this->array_total_participante as $campo_participante => $dados_participante)\n {\n $val_grafico_participante = $dados_participante[5];\n $this->resumo_campos = $dados_participante;\n $this->monta_linha($dados_participante[5], 0, \"normal\", \"&participante=\" . urlencode($val_grafico_participante) . \"\");\n if (isset($this->array_total_pista[$campo_participante]))\n {\n foreach ($this->array_total_pista[$campo_participante] as $campo_pista => $dados_pista)\n {\n $val_grafico_pista = $dados_pista[5];\n $this->resumo_campos = $dados_pista;\n $this->monta_linha($dados_pista[5], 1, \"normal\", \"\");\n } // foreach pista\n } // isset pista\n } // foreach participante\n } // isset participante\n }", "private function setTotalPrice(): void\n {\n $totalPrice = array_reduce(session('cart.items'), [$this, 'sum']);\n\n session(['cart.totalPrice' => $totalPrice]);\n }", "function getPrecio() {\n return $this->precio;\n }", "public function setGross($baseTotal);", "public function Agregar_Presupuesto($precio_total,$fecha_entrega,$precio_parcial,$fecha_pago_parcial,$cod_pedido){\r\n\t\t\t$sql=\"CALL SP_A_TABLA_PRESUPUESTO('\".$precio_total.\"','\".$fecha_entrega.\"','\".$precio_parcial.\"','\".$fecha_pago_parcial.\"','\".$cod_pedido.\"')\";\r\n\t\t\t$this->db->query($sql);\r\n\t\t}", "public function testSetTotAcompte() {\n\n $obj = new Bulletins();\n\n $obj->setTotAcompte(10.092018);\n $this->assertEquals(10.092018, $obj->getTotAcompte());\n }", "public function testSetCumMtCpPris1() {\n\n $obj = new Bulletins();\n\n $obj->setCumMtCpPris1(10.092018);\n $this->assertEquals(10.092018, $obj->getCumMtCpPris1());\n }", "function setTotal($arg0) {\n\t\t\t$this->total=$arg0;\n\t\t\treturn $this;\n\t\t}", "public function testSetProvCp() {\n\n $obj = new Bulletins();\n\n $obj->setProvCp(10.092018);\n $this->assertEquals(10.092018, $obj->getProvCp());\n }", "public function get_cotizacion_detalle_precio() : float {\n return $this->cotizacion_detalle_precio;\n }", "public function setTotal(int $value) { return $this->set('total', $value); }", "public static function totalCompras($dataProvider2){\n $sumatoria=0;\n foreach($dataProvider2->getModels() as $key => $val){\n $sumatoria+=($val->cantidad*$val->producto->precio);\n }\n return $sumatoria;\n }", "public function precioreal(){ //Aqui recogemos la cantidad de productos que tenemos en la cesta con la funcion count y \n //ademas calculamos el total\n $precioreal = array(\n 'contador' => 0, //Aqui definimos nuestro array precioreal\n 'total' => 0);\n\n if(isset($_SESSION['cesta'])){ // Como requisito debemos haber inicializado la cesta\n $precioreal['contador'] = count($_SESSION['cesta']); // Si todo fluye como la vida misma empezamos contando los productos almacenados\n // en la cesta 1 por cada fila\n foreach($_SESSION['cesta'] as $elemento){ // Ahora recorremos el array y nos fijaremos solos en la cantidad y precio de toda la cesta\n\n if($elemento['descuento'] == 0){ //Recuperamos si ese articulo tieno o no descuento aplicable\n $precioUnitario = $elemento['precio'];\n }else{ //Si no tiene descuento aplicable\n $precioUnitario = ($elemento['precio']) - (($elemento['precio'] * $elemento['descuento']/100));\n }\n //Añadimos el precio con o si descuento y lo multiplicamos por la cantidad, y solo sacamos el producto con 2 decimales\n $precioreal['total'] += round($precioUnitario * $elemento['cantidad'],2);\n }\n \n }\n return $precioreal; //retornamos el resultado\n }", "protected function set_total($key, $total)\n {\n }", "public function actionEditPrecioUnitario()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetallePedido');\r\n// /$_cantidad= $es->value;\r\n $es->onBeforeUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n $_precioUnitario= yii::app()->request->getParam('value');\r\n $_subtotal=$model->cantidad*$_precioUnitario;//calculando el subtotal\r\n $_impuesto=$_subtotal*((int)Yii::app()->params['impuesto']*0.01); //calculando impuesto\r\n $_total=$_subtotal+$_impuesto; //calculando total\r\n \r\n $event->sender->setAttribute('subtotal', $_subtotal);//Actualizando Cantidad\r\n $event->sender->setAttribute('impuesto', $_impuesto);//Actualizando impuesto\r\n $event->sender->setAttribute('total', $_total); //actualizando total\r\n \r\n };\r\n \r\n $es->update();\r\n }", "protected function _setTotal($total = 0)\n {\n $this->_total = $total;\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function testSetIntitSousTotalApec() {\n\n $obj = new OrgaGeneriques();\n\n $obj->setIntitSousTotalApec(\"intitSousTotalApec\");\n $this->assertEquals(\"intitSousTotalApec\", $obj->getIntitSousTotalApec());\n }", "public static function obtieneTotalCompraPorItem($model){\n $provider=DetalleCompra::find()->where(['id_de_compra'=>$model->id_compra])->all();\n $sumatoria=0;\n foreach($provider as $key => $val){\n //$val sería un detalle de compra\n $sumatoria=$sumatoria+($val->cantidad*$val->producto->precio);\n }\n return $sumatoria;\n \n }", "public function getValorBrutoTotal()\n {\n return $this->valorBrutoTotal;\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function setNetTotal($netTotal);", "public function mudarPercentual() {\n $cd_tarefa = $_POST['cd_tarefa'];\n $dados['pcompleto'] = $_POST['porcento'];\n if ($this->tarefa->atualizarTarefa($dados, $cd_tarefa)) {\n header(\"location: ../views/tarefa.php?tarefa=\" . $cd_tarefa);\n } else {\n header(\"location: ../views/tarefas.php\");\n }\n }", "function porcentaje($value1, $valueTotal){\n return ($valueTotal>0)? number_format($value1 * 100 / $valueTotal, 2) : 0;\n}", "public function set_cotizacion_detalle_precio(float $cotizacion_detalle_precio) : void {\n $this->cotizacion_detalle_precio = $cotizacion_detalle_precio;\n }" ]
[ "0.7338648", "0.6716436", "0.6498841", "0.6330458", "0.6321808", "0.6311706", "0.62297994", "0.6228807", "0.6211809", "0.60709405", "0.5925587", "0.5855895", "0.5847167", "0.58322966", "0.5779344", "0.5775832", "0.57210666", "0.5694934", "0.56891036", "0.5682193", "0.56734806", "0.56626284", "0.56599915", "0.5636168", "0.5595703", "0.55699295", "0.55574155", "0.5555578", "0.5547532", "0.55474037", "0.55230343", "0.5506883", "0.5502811", "0.550114", "0.5495418", "0.5466918", "0.5459536", "0.54565465", "0.5455096", "0.5447932", "0.5415059", "0.5400837", "0.53976554", "0.53947616", "0.53891844", "0.5386747", "0.5348446", "0.53310263", "0.53310263", "0.53244805", "0.5312199", "0.53064674", "0.5301556", "0.52946645", "0.52927667", "0.52618", "0.5261214", "0.52506155", "0.52506155", "0.52506155", "0.52506155", "0.5248878", "0.5248111", "0.5236115", "0.5230102", "0.52299917", "0.5229433", "0.52257943", "0.52248347", "0.5216638", "0.52151215", "0.52134746", "0.52122533", "0.5202223", "0.51926196", "0.51731384", "0.51582724", "0.51485234", "0.51457715", "0.5136711", "0.51344615", "0.5127426", "0.5124175", "0.51228976", "0.5121455", "0.51208", "0.5118375", "0.5114665", "0.5103086", "0.50984585", "0.50938296", "0.50843763", "0.50836366", "0.50818986", "0.5081589", "0.5079079", "0.5076845", "0.50766283", "0.5072709", "0.5071203" ]
0.7443995
0
Get the value of contribucion_marginal_valor
Получить значение contribucion_marginal_valor
public function getContribucion_marginal_valor() { return $this->contribucion_marginal_valor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContribucion_marginal_valor($contribucion_marginal_valor)\n {\n $this->contribucion_marginal_valor = $contribucion_marginal_valor;\n return $this;\n }", "public function getContribucion_marginal_porcentual()\n {\n return $this->contribucion_marginal_porcentual;\n }", "public function getValorAttribute($valor)\n {\n return $valor / 100;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getPercentualDepreciado();", "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "function getDenominazione() {\r\n return $this->denominazione;\r\n }", "public function getValor() {\n return $this->valor;\n }", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function getValorDepreciado();", "public function getValor() {\n return $this->nValor;\n }", "public function getValor() {\n return $this->nValor;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function getCuotaTotalMensualMaxima()\n {\n return $this->cuota_total_mensual_maxima;\n }", "function calculateValorNeto($valor, $total_imp_inc){\n $valorNeto = ($valor - ($valor*($total_imp_inc/100)));\n return $valorNeto;\n }", "public function valorAtual(){\n if($this->tipo_periodo == $DIA){\n $timestampDeposito = strtorime($this->data_deposito);\n if(date(\"Y-m\", $timestampDeposito) == date(\"Y-m\") && Util::get_dias_mes($this->data_deposito) == $this->periodo){\n return $this->valor + rendimentoDias($this->periodo);\n }else{\n return $this->valor;\n }\n\n }else if($this->tipo_periodo == $MES){\n\n }else if($this->tipo_periodo == $ANO){\n\n }\n }", "public function getAmountValue();", "public function getValorMetaSecundaria( ){\n return $this->valorMetaSecundaria;\n }", "public function getValor()\n {\n return $this->nValor;\n }", "public function getMontoFacturado() {\n\t\t$sql = \"Select SUM(monto) as total from factura where clientes_id=\" . $this -> id;\n\t\t$sqlFactura = Yii::app() -> db -> createCommand($sql) -> queryRow();\n\t\tif ($sqlFactura['total'] == 0)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $sqlFactura['total'];\n\t}", "function valor_opcion($opcion_id) {\n $valor_opcion = $this->Pcrn->campo_id('sis_opcion', $opcion_id, 'valor');\n return $valor_opcion;\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "public function getVatAmount();", "public function getVotiTotaleCandidato()\n {\n return $this->voti_totale_candidato;\n }", "public function getInfCTeNormInfCargaVCarga()\n {\n return $this->infCTeNorm_infCarga_vCarga;\n }", "function getBase_maxima(){\r\n return $this->base_maxima;\r\n }", "static public function ctrVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "public function get_cotizacion_detalle_precio() : float {\n return $this->cotizacion_detalle_precio;\n }", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function getDenominationValueAttribute(): float\n {\n return $this->denomination->value;\n }", "public function getIva_gravado()\n {\n return $this->iva_gravado;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getValorAtual() {\n return $this->nValorAtual;\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "public function getVatPercent(): int;", "function getDiscountPercent() ;", "public function getAvisCommission()\n\t{\n\t\treturn $this->_avis_commission;\n\t}", "public function getCdf() {\n return $this->cdf;\n }", "public function getInfCTeNormSegVCarga()\n {\n return $this->infCTeNorm_seg_vCarga;\n }", "public function effectiveVat() {\n \treturn $this->effectivePrice() * env('VAT_PERCENTAGE');\n }", "public function nValue() {\n\t\treturn $this->column('n_value');\n\t}", "public function total(){\n return $this->carrello['totale'];\n }", "function get_donation_amount (){\n return $this->donation_amount ;\n }", "public function getDimensionValue();", "function DameIdProximoCargCivl()\r\n {\r\n return $this->modelcargocvil->buscaridproximo();\r\n\r\n }", "public function getCommissionValue(): float\n {\n $basePriceValue = $this->getBasePriceValue();\n $commissionValue = ((100 + $this->commissionRate) / 100 - 1) * $basePriceValue;\n\n return $this->roundValue($commissionValue);\n }", "public function getMontantTva() {\n return $this->montantTva;\n }", "public function getVatPercentage(): ?int;", "public function getPrecio(){\n\n return $this->precio ;\n }", "function oaGetDiscountValue( $cartContent, $log )\r\n{\r\n\t$price = oaGetClearPrice( $cartContent );\r\n\t$res = dscCalculateDiscount( $price, $log );\r\n\treturn $res['discount_standart_unit'];\r\n}", "public function getValorTotal()\n {\n return $this->valor_total;\n }", "function DameIdProximoCatCvil()\r\n {\r\n return $this->modelcatcvil->buscaridproximo();\r\n\r\n }", "public function getProbability()\n {\n return $this->getEntityValue('probability', '');\n }", "public function value()\n {\n return Common::decimal($this->getAttribute('value'));\n }", "public function getValeur()\n {\n return $this->valeur;\n }", "public function getMontoPrefactura() {\n return $this->montoPrefactura;\n }", "public function getValorTotal(){\n return $this->nValorTotal;\n }", "public function getValorTotal(){\n return $this->nValorTotal;\n }", "protected function getTotalDiscountParameter()\n {\n $this->reconcile();\n\n return $this->total_discount;\n }", "public function setContribucion_marginal_porcentual($contribucion_marginal_porcentual)\n {\n $this->contribucion_marginal_porcentual = $contribucion_marginal_porcentual;\n return $this;\n }", "public function getValorTotal(){\n\t\t\treturn $this->valorTotal;\n\t\t}", "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getVisuelObtenu()\n\t{\n\t\treturn $this->_visuel_obtenu;\n\t}", "public function getNumeracionLibre(){\n return Numeracion::getNumeracionSOF()->numeroLibreActual;\n }", "function getUtilisation(){\n\n\t \t $total = $this-> getTotalWeight() ;\n\t \t\t\n\t \t\t return round(($total / $this->capacity) * 100, 2);\n\n\t }", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "static public function ctrPosibleVotanteTotal(){\n\n\t\t$tabla = \"puntero\";\n\n\t\t$respuesta = ModeloPuntero::mdlSumaTotalPosibleVotante($tabla);\n\n\t\treturn $respuesta;\n\t}", "public function getInfCTeNormInfCargaProPred()\n {\n return $this->infCTeNorm_infCarga_proPred;\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function GetCantidad(){\n\t\treturn $this->Cantidad;\n\t}", "public function getDocdecisionbudget()\n {\n return $this->docdecisionbudget;\n }", "static public function ctrTotDiasProd($valor){\n\n $respuesta = ModeloMovimientos::mdlTotDiasProd($valor);\n\n return $respuesta;\n\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function getDiscount();", "public function getDiscount();", "public function getDiscount();", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getDiscountedAmount();", "private function getMinimo()\n {\n return $this->getImpuestos()->minimo;\n }", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function getCalifMatrizPantalla(){\n\t\treturn $this->calif_matriz_pantalla;\n\t}", "function get_probability(){\n $this->probability = array();\n foreach($this->fitness as $key => $val) {\n $x = $val['nilai'] / $this->total_fitness;\n $this->probability[] = $x;\n //$this->console.=\"P[$key] : $x \\r\\n\";\n }\n //$this->console.=\"Total P: \" . array_sum($this->probability) . \"\\r\\n\";\n //reset($this->fitness);\n return $this->probability;\n }", "public function getDiscountValue()\n {\n return $this->discount . ' %';\n }", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "private function getDecisionValue($contr){\n if($contr['decision'] >= 1){\n return \"ANO\";\n }else{\n return \"NE\";\n }\n }", "public function getCostoMantenimiento()\n {\n return $this->costoMantenimiento;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "function regla_tres($valor){\n $res = ($valor * PORCENTAJE) / SINTOMAS;\n return $res;\n }", "public function getValue(): float\n {\n return $this->value;\n }" ]
[ "0.7450692", "0.7151404", "0.615303", "0.609222", "0.59885466", "0.5986863", "0.59554964", "0.59554964", "0.59554964", "0.59554964", "0.59554964", "0.5922829", "0.58825654", "0.5726437", "0.570927", "0.5672429", "0.5672429", "0.565635", "0.5636362", "0.56202585", "0.56153417", "0.55782527", "0.5576013", "0.5572571", "0.5570606", "0.5550014", "0.55412316", "0.5527629", "0.5519476", "0.55147594", "0.55020297", "0.54996866", "0.5470078", "0.5466285", "0.54579854", "0.5453897", "0.54453045", "0.5437349", "0.5437349", "0.54065686", "0.5404252", "0.53929985", "0.53929985", "0.5389755", "0.53793305", "0.5362705", "0.5355978", "0.5347645", "0.5342576", "0.53420585", "0.534074", "0.5338103", "0.53375643", "0.5329936", "0.53254145", "0.53205", "0.5315723", "0.5310026", "0.53090465", "0.5308527", "0.53036577", "0.5294052", "0.5288777", "0.5285656", "0.52770305", "0.5273246", "0.5273246", "0.5257639", "0.52469015", "0.52346736", "0.52342135", "0.52338535", "0.5232004", "0.5229767", "0.5229759", "0.522887", "0.5228682", "0.52205056", "0.5217498", "0.521255", "0.5212235", "0.5206768", "0.52033925", "0.5202948", "0.5202677", "0.5202677", "0.5202677", "0.52001494", "0.51932", "0.51929206", "0.51919144", "0.518975", "0.51856583", "0.5179606", "0.5177978", "0.51734924", "0.5170191", "0.51600647", "0.5153076", "0.515246" ]
0.89588314
0
Set the value of contribucion_marginal_valor
Задайте значение contribucion_marginal_valor
public function setContribucion_marginal_valor($contribucion_marginal_valor) { $this->contribucion_marginal_valor = $contribucion_marginal_valor; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "public function getContribucion_marginal_porcentual()\n {\n return $this->contribucion_marginal_porcentual;\n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function setDataFim($valor){\n\t\t\t$this->dataFim = $valor;\n\t\t}", "public function setContribucion_marginal_porcentual($contribucion_marginal_porcentual)\n {\n $this->contribucion_marginal_porcentual = $contribucion_marginal_porcentual;\n return $this;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function getValorAttribute($valor)\n {\n return $valor / 100;\n }", "public function setModificacao($valor) {\n\t\t$this->modificacao = $valor;\n\t}", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "abstract public function setValorTransacao($valor);", "public function setValorCampo($valor){\r\n $this->valor_campo = $valor;\r\n }", "private function setValor($valor) {\n $this->valor = (float) str_replace(',', '.', $valor);\n }", "function setSumaDeRecibo($monto = 0){ \t$this->mSumaDeRecibo = $monto;\t}", "public function set_valor($id, $valor);", "public function setValorTotal($valor){\n\t\t\t$this->valorTotal = $valor;\n\t\t}", "public function mutate() {\r\n $this->value = $this->value * PCommon::linear_randomf(0.5, 2.0);\r\n if ($this->value < FloatGene::$zeroLimit && $this->value > 0.0) {\r\n $this->value = FloatGene::$zeroLimit;\r\n }\r\n if ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0) {\r\n $this->value = - FloatGene::$zeroLimit;\r\n }\r\n // this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n assert($this->value != 0.0);\r\n }", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "public function mutate()\r\n\t\t{\r\n\t\t\t$this->value = $this->value * lcg_randf(0.5,2.0);\r\n\t\t\tif ($this->value < FloatGene::$zeroLimit && $this->value > 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = FloatGene::$zeroLimit;\r\n\t\t\t} \r\n\t\t\tif ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = - FloatGene::$zeroLimit;\r\n\t\t\t}\r\n\t\t\t// this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n\t\t\tassert($this->value != 0.0);\r\n\t\t}", "public function setVat($value);", "public function setConta($valor) {\n\t\t$this->conta = $valor;\n\t}", "function setDenominazione($denominazione) {\r\n $this->denominazione = $denominazione;\r\n }", "public function setNetMarginAttribute($value) {\n $parts = explode('%', $value);\n if (is_numeric($parts[0]) && $parts[1] === '') {\n $this->attributes['net_margin'] = ($this->fromFloat($parts[0]) / 100);\n }\n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "public function setValue( $valor )\n\t{\n\t\t$this->_value[] = $valor;\t\t\n\t}", "public function SetNumerodaConta($valor){\n\t\t $this->numerodaConta= $valor;\n\t }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "public function setVisina($v){\n if($v<0){\n $this->visina=0;\n }elseif($v>250){\n $this->visina=250;\n }else{\n $this->visina=$v;\n }\n }", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "protected function setExtraDiscount($value){\n \n $this->extraDiscount = $value;\n }", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function ActualizarValoresDistribucion()\n {\n $horario = DB::statement((\" \n UPDATE practica_distribucion, convenio_os_pmo, obra_social SET practica_distribucion.total = ((practica_distribucion.porcentaje * convenio_os_pmo.valor) / 100) ,practica_distribucion.valor = convenio_os_pmo.valor WHERE practica_distribucion.practica_distribucion_id = convenio_os_pmo.id AND convenio_os_pmo.obra_social_id = obra_social.id\n \"));\n\n return response()->json($horario, 201); \n return $this->showAll($res);\n \n }", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "public function testSetMontantCoupon() {\n\n $obj = new VmpMouvements();\n\n $obj->setMontantCoupon(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantCoupon());\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "protected function setAmount($value){\r\n }", "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualNivA');\n if($paginaActual==null)\n Session::put('paginaActualNivA',1);\n }", "public function setPriceCoefficientTotalAttribute($value) {\n //Example Value: 5.08 => 508 in BDD\n $this->attributes['price_coefficient_total'] = (int)round(($value*100),0);\n }", "public abstract function setVariable($nombre, $valor);", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function set_imagenG($valor){\n $this->ImagenG = \"01\".trim($valor);\n }", "public function setValor($nValor) {\n $this->nValor = $nValor;\n }", "public function setValor($nValor) {\n $this->nValor = $nValor;\n }", "public function set_imagenC($valor){\n $this->ImagenC = \"02\".trim($valor);\n }", "public function __set($atributo, $valor) {\n $this->$atributo = $valor;\n }", "public function SetSaldoDisponivel($valor){\n\t\t $this->saldo_disponivel= $valor;\n\t }", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "function calculateValorNeto($valor, $total_imp_inc){\n $valorNeto = ($valor - ($valor*($total_imp_inc/100)));\n return $valorNeto;\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualR');\n if($paginaActual==null)\n Session::put('paginaActualR',1);\n }", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualEstI');\n if($paginaActual==null)\n Session::put('paginaActualEstI',1);\n }", "public function setValor( $value ){\n\t\n\t\tarray_push( $this->valores_cliente , $value );\n\t\n\t}", "public function testSetValoriseCp() {\n\n $obj = new Bulletins();\n\n $obj->setValoriseCp(10.092018);\n $this->assertEquals(10.092018, $obj->getValoriseCp());\n }", "public function SetCantidad($param){\n\t\t$this->Cantidad = $param;\n\t}", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "function setNodeContentModifier(callable $a_val)\n\t{\n\t\t$this->nc_modifier = $a_val;\n\t}", "public function setValorAtual($nValorAtual = 0);", "public function setBanco($valor) {\n\t\t$this->banco = $valor;\n\t}", "public function setValor($valor)\n {\n $this->valor = $valor;\n\n return $this;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n\n return $this;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n\n return $this;\n }", "public function testSetMontantComm() {\n\n $obj = new VmpMouvements();\n\n $obj->setMontantComm(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantComm());\n }", "public function setDiscountOnTotalAttribute($value) {\n //Example Value: 5.08 => 508 in BDD\n $this->attributes['discount_on_total'] = (int)round(($value*100),0);\n }", "public function setCuotaTotalMensualMaxima($v)\n {\n if ($v !== null) {\n $v = (double) $v;\n }\n\n if ($this->cuota_total_mensual_maxima !== $v) {\n $this->cuota_total_mensual_maxima = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CUOTA_TOTAL_MENSUAL_MAXIMA;\n }\n\n\n return $this;\n }", "public function valorAtual(){\n if($this->tipo_periodo == $DIA){\n $timestampDeposito = strtorime($this->data_deposito);\n if(date(\"Y-m\", $timestampDeposito) == date(\"Y-m\") && Util::get_dias_mes($this->data_deposito) == $this->periodo){\n return $this->valor + rendimentoDias($this->periodo);\n }else{\n return $this->valor;\n }\n\n }else if($this->tipo_periodo == $MES){\n\n }else if($this->tipo_periodo == $ANO){\n\n }\n }", "public function setAmountAttribute($value)\n {\n $this->attributes['amount'] = $value * 100;\n }", "public function atualizaValorDocumento($id_documento){\n\n $consulta =\n \" UPDATE\n documento\n SET vl_total =\n (\n SELECT\n SUM(p.vl_preco)\n FROM documento_item di\n INNER JOIN produto p ON (di.id_produto = p.id_produto)\n WHERE\n di.id_documento = $id_documento\n )\n WHERE\n id_documento = $id_documento \";\n\n $resultado = Conexao::getInstance()->executaQuery($consulta);\n\n return $resultado;\n }", "function set_commissioner_price()\n {\n $commissioner_price = $this->input->post(\"commissioner_price\");\n $this->sale_lib->set_commissioner_price($commissioner_price);\n $this->_reload();\n }", "public function setVlrPerc($value,$options=array('required'=>true)){ \n $this->_data['vlr_perc'] = new ZendT_Type_Number($value,array('numDecimal'=>4));\n if ($options['db'])\n $this->_data['vlr_perc']->setValueFromDb($value);\n \n if (!$options['db']){\n \n }\n return $this;\n }", "public function testSetMontantBPlaf4() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setMontantBPlaf4(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantBPlaf4());\n }", "public function setValorAprovacao($mValorAprovacao) {\n $this->mValorAprovacao = $mValorAprovacao;\n }", "public function setValor($nValor)\n {\n $this->nValor = $nValor;\n }", "public function setConfidence($val) {\n $this->_confidence = $val;\n }", "public function setValorMetaSecundaria( $valorMetaSecundaria ){\n $this->valorMetaSecundaria = $valorMetaSecundaria;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function set_amount($value)\n {\n }", "public function depositar ($valor) {\n //$this pega a própria classe\n $this->saldo += $valor; \n }", "public function __SET($atributo,$valor)\r\n {\r\n return $this->$atributo = $valor;\r\n }", "public function setAtributo($PU09DESCREG, $valor)\n\t{\n\t\t$this->$PU09DESCREG = ucfirst(strtolower($valor));//Cualquier data al introducir en Mayuscula sera convertido en minuscula\n\t}", "public function testSetMontantRbt() {\n\n $obj = new DecTva3519();\n\n $obj->setMontantRbt(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantRbt());\n }", "public function testSetMontantBPlaf5() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setMontantBPlaf5(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantBPlaf5());\n }", "public function testSetIntitSousTotalAgffAgirc() {\n\n $obj = new OrgaGeneriques();\n\n $obj->setIntitSousTotalAgffAgirc(\"intitSousTotalAgffAgirc\");\n $this->assertEquals(\"intitSousTotalAgffAgirc\", $obj->getIntitSousTotalAgffAgirc());\n }", "public function getPercentualDepreciado();", "public function testSetMontantBPlaf() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setMontantBPlaf(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantBPlaf());\n }", "public function SetClasse($valor){\n\t\t$this->classe=$valor;\n\t}", "public function testSetMontantBPlaf2() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setMontantBPlaf2(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantBPlaf2());\n }", "function setAvgIncome($value)\n {\n $this->avg_income = $value;\n }", "public function __set($nom, $valeur){\n\t\techo 'Hey oh, jeune Padawan, que fais-tu? La propriété <u><b>'. $nom. '</b></u> n\\'existe pas. Valeur: ' .$valeur;\n\t// se declenche lorsqu'on tente d'affecter une valeur à une propriété qui n'existe pas\n\t//set est utile si on travaille avec des proprietes public. mais dans le cas ou mes proprietes sont private et que j'utilise donc un getter et un setter par propriete, __set n'est pas necessaire car l'user mal intentionné ne peut pas créer des getter et des setter pour acceder à une propriete private\n\t}", "public function testSetActionsGratuitesValeurU() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setActionsGratuitesValeurU(10.092018);\n $this->assertEquals(10.092018, $obj->getActionsGratuitesValeurU());\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function setPotentialScoreImpact(?float $value): void {\n $this->getBackingStore()->set('potentialScoreImpact', $value);\n }", "public function setEffectivePropertyValueForNode(\n\t\tContextInterface $ctx,\n\t\tSetEffectivePropertyValueForNodeRequest $request\n\t): void;", "public function setValeur($valeur)\n {\n $this->valeur = $this->recupValeur($valeur);\n }", "public function testSetMontant2() {\n\n $obj = new DecTva3519();\n\n $obj->setMontant2(10.092018);\n $this->assertEquals(10.092018, $obj->getMontant2());\n }", "public function setMontoFinanciarMaximo($v)\n {\n if ($v !== null) {\n $v = (double) $v;\n }\n\n if ($this->monto_financiar_maximo !== $v) {\n $this->monto_financiar_maximo = $v;\n $this->modifiedColumns[] = RequerimientoPeer::MONTO_FINANCIAR_MAXIMO;\n }\n\n\n return $this;\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setNome($valor){\r\n $this->nome=$valor;\r\n }" ]
[ "0.76833326", "0.61073935", "0.587649", "0.5829812", "0.5752807", "0.5751371", "0.5707299", "0.5556157", "0.5491462", "0.54294026", "0.53912014", "0.5383616", "0.53782374", "0.5324719", "0.5306341", "0.5302553", "0.53013355", "0.52882856", "0.52854925", "0.52344877", "0.5216478", "0.5140394", "0.5106876", "0.5074724", "0.5072301", "0.50548875", "0.50257844", "0.49976698", "0.49826938", "0.49822077", "0.49749762", "0.49711847", "0.4969207", "0.49665684", "0.49539328", "0.4948837", "0.4948837", "0.49450338", "0.4936425", "0.49174032", "0.49078593", "0.49071667", "0.49071395", "0.48997363", "0.48968723", "0.48968723", "0.48659644", "0.48647872", "0.4861014", "0.48548213", "0.48537645", "0.48436123", "0.48384857", "0.4831629", "0.48192897", "0.48191917", "0.47982535", "0.47940612", "0.47903675", "0.47885278", "0.47794482", "0.4763281", "0.4763281", "0.4763281", "0.47573343", "0.47396126", "0.47391695", "0.47289643", "0.472516", "0.4717114", "0.46980816", "0.46569157", "0.46527925", "0.4651694", "0.46435392", "0.46353588", "0.461874", "0.4617759", "0.46145794", "0.4610899", "0.46098107", "0.4607323", "0.45981982", "0.45943338", "0.45923272", "0.45831797", "0.45799974", "0.45615327", "0.45596758", "0.45576316", "0.45556235", "0.45541978", "0.45490688", "0.45474637", "0.45428604", "0.4537076", "0.4527125", "0.4525647", "0.45245722", "0.45226097" ]
0.79560757
0
Get the value of contribucion_marginal_porcentual
Получить значение contribucion_marginal_porcentual
public function getContribucion_marginal_porcentual() { return $this->contribucion_marginal_porcentual; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "public function setContribucion_marginal_porcentual($contribucion_marginal_porcentual)\n {\n $this->contribucion_marginal_porcentual = $contribucion_marginal_porcentual;\n return $this;\n }", "public function getPercentualDepreciado();", "public function setContribucion_marginal_valor($contribucion_marginal_valor)\n {\n $this->contribucion_marginal_valor = $contribucion_marginal_valor;\n return $this;\n }", "public function getProbability()\n {\n return $this->getEntityValue('probability', '');\n }", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function getPresentationPoints()\n {\n $points = 0;\n foreach ($this->getSubject()->getPresentationValuationPoints() as $pvp) {\n $pvpPoints = 0;\n $max = 0;\n foreach ($this->getUserPresentationValuation() as $upv) {\n if ($upv->getPresentationValuationPoint() == $pvp) {\n $pvpPoints += $upv->getPoints();\n $max += self::MAX_PRESENTATION_POINTS;\n }\n }\n\n if ($max == 0) {\n return 0;\n }\n \n $temp = (100/$max)*$pvpPoints;\n $points += ($pvp->getHeight()/100)*$temp;\n }\n\n $result = $points*($this->getSubject()->getValPresentation()/100);\n\n return $result;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function getProbability()\n {\n return $this->probability;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "function getDiscountPercent() ;", "public function getPolicycommpercentage()\n\t{\n\t\treturn $this->policycommpercentage;\n\t}", "public function getPolicycommpercentage()\n\t{\n\t\treturn $this->policycommpercentage;\n\t}", "public function getVatPercent(): int;", "public function getVatPercentage(): ?int;", "function get_probability(){\r\n $this->probability = array();\r\n \r\n $arr = array();\r\n foreach($this->fitness as $key => $val){\r\n $arr[$key] = $val==0 ? 0 : 1 / $val;\r\n }\r\n \r\n foreach($arr as $key => $val) {\r\n $x = (array_sum($arr)==0) ? 0 : $val / array_sum($arr);\r\n $this->probability[] = $x;\r\n //$this->console.=\"P[$key] : $x \\r\\n\";\r\n }\r\n $this->console.=\"Total P: \" . array_sum($this->probability) . \"\\r\\n\"; \r\n return $this->probability;\r\n }", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function getProbability() : float\n {\n return $this->probability;\n }", "public function getPValue() {\n $z = $this->getZScore();\n $r = new RAdapter();\n $p = $r->execute(\"pnorm($z)\")[0][0]; // Two tailed\n return (1 - $p) * 2;\n }", "public function get_cotizacion_detalle_precio() : float {\n return $this->cotizacion_detalle_precio;\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function getUserPresentationValuation()\n {\n return $this->userPresentationValuation;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getPercentualUso() {\n return $this->nPercentualUso;\n }", "public function getCantidadPatio()\n {\n return $this->cantidad_patio;\n }", "function get_probability(){\n $this->probability = array();\n foreach($this->fitness as $key => $val) {\n $x = $val['nilai'] / $this->total_fitness;\n $this->probability[] = $x;\n //$this->console.=\"P[$key] : $x \\r\\n\";\n }\n //$this->console.=\"Total P: \" . array_sum($this->probability) . \"\\r\\n\";\n //reset($this->fitness);\n return $this->probability;\n }", "public function getPermanence()\n {\n return $this->permanence;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function petroleoportonelada()\n\t{\n\t\t \n\t\t \n\t\t if($this->descargada>0) {\n\t\t $this->consumoportonelada=round($this->d2/$this->descargada,1);\n\t\t \t} else {\n\t\t\t $this->consumoportonelada=0;\n\t\t\t}\n\t\t\treturn $this->consumoportonelada;\n\t\t \n\t}", "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function getPrenom();", "public function getPodtrevision()\n {\n return $this->podtrevision;\n }", "public function getPercentage(): int|null;", "public function getPresentationValuationPoints()\n {\n return $this->presentationValuationPoints;\n }", "public function getInfCTeNormInfCargaProPred()\n {\n return $this->infCTeNorm_infCarga_proPred;\n }", "public function getCuotaTotalMensualMaxima()\n {\n return $this->cuota_total_mensual_maxima;\n }", "public function getPma()\n {\n return $this->pma;\n }", "public function getProportion()\n {\n return $this->proportion;\n }", "public function getPodtcost()\n {\n return $this->podtcost;\n }", "function porcentajes_unidad($unidad,$nivel){\n\t\tswitch($unidad){\n\t\t\tcase 1: $porcentaje = 0.30; break;\n\t\t\tcase 2: $porcentaje = 0.30; break;\n\t\t\tcase 3: $porcentaje = 0.40; break;\n\t\t}\n\t\treturn $porcentaje;\n\t}", "public function getPr()\n {\n return $this->get(self::PR);\n }", "public function getProfitMarginPercentage()\n {\n return FormatUtils::formatPercentage($this->getProfitMargin());\n }", "public function getImgPerfil(){\n\t\t\treturn $this->imgPerfil;\n\t\t}", "public function getPodtlandcost()\n {\n return $this->podtlandcost;\n }", "public function imc(){\n return $this->peso / ($this->altura * $this->altura);\n }", "public function getPresion()\n {\n return $this->presion;\n }", "public function getPv()\n {\n return $this->pv;\n }", "public function getPercentAttribute()\n {\n // Address / Company models need fixing to retrieve country ISO code\n // $country = Context::getContext()->company->address()->country_ISO;\n \n $country_id = Configuration::get('DEF_COUNTRY');\n // $country_id = Context::getContext()->company->address()->country_id;\n\n// $value = $this->taxrules()->where('country_id', '=', '0')->orWhere('country_id', '=', $country_id)->orderBy('position', 'asc')->first()->percent;\n $value = optional($this->taxrules()->where(function ($query) use ($country_id) {\n $query->where('country_id', '=', '0')\n ->orWhere('country_id', '=', $country_id);\n })\n ->where('rule_type', '=', 'sales')\n ->orderBy('position', 'asc')->first())->percent ?? 0.0;\n\n return $value;\n }", "public function getAvisCommission()\n\t{\n\t\treturn $this->_avis_commission;\n\t}", "public function percentageWomen(): Float\n {\n return $this->countWomen / $this->countStudent * 100;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getPercentage()\n {\n return $this->percentage;\n }", "public function getPercentage()\n {\n return $this->percentage;\n }", "public function getPercentage()\n {\n return $this->percentage;\n }", "public function getPercentage()\n {\n return $this->percentage;\n }", "public function getPlu()\n {\n return $this->plu;\n }", "public function GetMarginPercent()\n {\n \tif ($this->getPrice() > 0)\n\t\t return ($this->getPrice() - $this->getData(mage::helper('purchase/MagentoVersionCompatibility')->getSalesOrderItemCostColumnName())) / $this->getPrice() * 100;\n\t\telse \n\t\t\treturn 0;\n }", "public function get_category_permastruct()\n {\n }", "function getMuertesPromedio(){\n\t\t\treturn $this->db->select(\"sum(insidencias)/730 AS mPromedio\", FALSE)\n\t\t\t\t\t\t->from('mortalidad')\n\t\t\t\t\t\t->get();\n\t}", "private function getCpt(){\n $entityManager = $this->getDoctrine()->getManager();\n $user = $entityManager->getRepository(User::class)->findOneBy(['email' => $this->username]);\n if($user){\n // get user preferences.\n $preferences = $entityManager->getRepository(UserPreferences::class)->findOneBy( ['user_id' => $user]);\n return $preferences->getMaxDisplay();\n }\n return 10;\n }", "protected function getTotalDiscountParameter()\n {\n $this->reconcile();\n\n return $this->total_discount;\n }", "public function getMontoPrefactura() {\n return $this->montoPrefactura;\n }", "public function getcpm()\n {\n\n return $this->getCookieProyectoM(); \n }", "function getComplinePsalm(){\n return 4;\n}", "public function getPodtcosttot()\n {\n return $this->podtcosttot;\n }", "public function privacyPolicyAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n $privacy = $em->getRepository('CMSBundle:DynamicPage')->find(5);\r\n\r\n return array(\r\n 'privacy' => $privacy,\r\n );\r\n }", "public function getPermanenceMatinA()\n {\n return $this->permanence_matin_a;\n }", "public function getProfitMargin()\n {\n return $this->netIncome / $this->revenue;\n }", "public function getPercentage(): float\n {\n if ($this->numApprovedTranslations === 0 || $this->numTranslatable === 0) {\n return 0.0;\n }\n if ($this->numApprovedTranslations === $this->numTranslatable) {\n return 100.0;\n }\n\n return $this->numApprovedTranslations * 100.0 / $this->numTranslatable;\n }", "public function getProfPrincipal()\n { return $this->genre.' '.$this->nomEnseignant.', '.($this->genre=='Mme' ? 'professeure principale' : 'professeur principal'); }", "public function getPercentage()\n {\n return 10;\n }", "public function getPuissance()\n {\n return $this->puissance;\n }", "public function getPercentageoflayer()\n\t{\n\t\treturn $this->percentageoflayer;\n\t}", "public function getPercentageoflayer()\n\t{\n\t\treturn $this->percentageoflayer;\n\t}", "function getPuissance(){\n return $this->_puissance;\n }", "public function getPorc() : int\n {\n return $this->porc;\n }", "public function getIncentives();", "public function getPercentualFrequencia() {\n return $this->nPercentualFrequencia;\n }", "public function getRequestedPrivacyMetric()\n {\n return $this->requested_privacy_metric;\n }", "public function getCalifMatrizPantalla(){\n\t\treturn $this->calif_matriz_pantalla;\n\t}", "public function paragraphDensity()\n\t\t{\n\t\t\t$pwd = $this->result->data->analysis->pwd;\n\n\t\t\t// states: passed (green) - warning (yellow) - error (red)\n\t\t\t$ms = 100 - $pwd->measured->percentageParagraphsIdealWordCountMetadata;\n\t\t\t//$pwdMin = $pwd->recommended->paragraphWordDensityMin;\n\t\t\t$pwdMax = $pwd->recommended->paragraphWordDensityMax;\n\t\t\t// $state = arnanlyzer_rsl_state($ms, $rs);\n\t\t\t$state = strtolower($pwd->state);\n\n\t\t\t$out = '<div class=\"' . $this->DOMsort($state) . '\">' . PHP_EOL;\n\t\t\t$out .= '<input id=\"pwd\" name=\"pwd\" type=\"checkbox\" />' . PHP_EOL;\n\t\t\t$out .= '<label for=\"pwd\" id=\"ar-' . $state . '\">Paragraph Density</label>' . PHP_EOL;\n\t\t\t$out .= '<article class=\"ac-small\">' . PHP_EOL;\n\t\t\t$out .= '<p class=\"ar-analysis-' . $state . '\">';\n\t\t\tif ($state == 'green') {\n\t\t\t\t$out .= '<div>Your paragraphs are an ideal length for your target audience.</div>';\n\t\t\t} else {\n\t\t\t\t$out .= '<div>' . $ms . '% of your paragraphs are too long for your target audience. Write paragraphs with no greater than ' . $pwdMax . ' words.</div>';\n\t\t\t}\n\t\t\t$out .= '</p>' . PHP_EOL;\n\t\t\t$out .= '</article>' . PHP_EOL;\n\t\t\t$out .= '</div>' . PHP_EOL;\n\n\t\t\treturn $out;\n\t\t}", "public function getPercent()\n {\n return $this->percent;\n }", "public function getcpm(){\n\n return $this->getCookieProyectoM();\n }", "public function getcpm(){\n\n return $this->getCookieProyectoM();\n }", "public function getLectura_pronunciacion(){\n return $this->lectura_pronunciacion;\n }", "public function percentageMen(): Float\n {\n return $this->countMen / $this->countStudent * 100;\n }", "function cart_discount_percent_of_total()\n\t{\n\t\treturn $this->view_formatted_number( $this->_cart_discount_percentage(\"total\"));\n\t}", "public function getMarcaPiquete()\n\t{\n\t\treturn $this->marca_piquete;\n\t}", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function getPrivilegePrice()\n {\n return $this->privilege_price;\n }", "public function getDiscountValue()\n {\n return $this->discount . ' %';\n }", "public function getPercent() : float\n\t{\n\t\treturn $this->percent;\n\t}", "public function getPPSValue() {\n // Fetch RPC difficulty\n if ($this->bitcoin->can_connect() === true) {\n $dDifficulty = $this->bitcoin->getdifficulty();\n } else {\n $dDifficulty = 1;\n }\n\n if ($this->config['pps']['reward']['type'] == 'blockavg' && $this->block->getBlockCount() > 0) {\n $pps_reward = round($this->block->getAvgBlockReward($this->config['pps']['blockavg']['blockcount']));\n } else {\n if ($this->config['pps']['reward']['type'] == 'block') {\n if ($aLastBlock = $this->block->getLast()) {\n $pps_reward = $aLastBlock['amount'];\n } else {\n $pps_reward = $this->config['pps']['reward']['default'];\n }\n } else {\n $pps_reward = $this->config['pps']['reward']['default'];\n }\n }\n return round($this->coin->calcPPSValue($pps_reward, $dDifficulty), 12);\n }", "public function getCdf() {\n return $this->cdf;\n }", "function getProposition() {\n return $this->proposition;\n }", "public function getPercentage() : float\n {\n return $this->percentage;\n }" ]
[ "0.77808994", "0.6951899", "0.61885", "0.61074597", "0.5829886", "0.5808411", "0.56889653", "0.5688253", "0.56474066", "0.5624315", "0.5624315", "0.55873877", "0.55752975", "0.55752975", "0.5550924", "0.5526955", "0.55081904", "0.5456393", "0.54485923", "0.54185396", "0.541489", "0.54129165", "0.54123557", "0.54045415", "0.5395103", "0.53899753", "0.53887886", "0.5381054", "0.53635126", "0.53635126", "0.53635126", "0.53635126", "0.5361601", "0.53309137", "0.5327826", "0.5317025", "0.5273645", "0.5268847", "0.5264684", "0.52578986", "0.5242831", "0.5241725", "0.5217637", "0.52100563", "0.52091277", "0.51995194", "0.51938695", "0.5182203", "0.5170191", "0.5169045", "0.51397854", "0.51393074", "0.5131471", "0.5127559", "0.51263183", "0.5100221", "0.5100221", "0.5100221", "0.5100221", "0.50882125", "0.5087656", "0.5079674", "0.5070621", "0.50704306", "0.5069872", "0.5063385", "0.505992", "0.5059156", "0.50484115", "0.5043179", "0.50430226", "0.50373", "0.5031369", "0.5030746", "0.50253755", "0.50220454", "0.50141746", "0.50141746", "0.5010741", "0.5010567", "0.500674", "0.49986392", "0.49953878", "0.49941733", "0.49896318", "0.49781778", "0.49757966", "0.49701157", "0.49630606", "0.49575564", "0.49547178", "0.4954533", "0.49511957", "0.49506125", "0.49472877", "0.4942375", "0.49399754", "0.49328038", "0.49324027", "0.49288806" ]
0.8625907
0
Set the value of contribucion_marginal_porcentual
Задайте значение contribucion_marginal_porcentual
public function setContribucion_marginal_porcentual($contribucion_marginal_porcentual) { $this->contribucion_marginal_porcentual = $contribucion_marginal_porcentual; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContribucion_marginal_porcentual()\n {\n return $this->contribucion_marginal_porcentual;\n }", "public function setContribucion_marginal_valor($contribucion_marginal_valor)\n {\n $this->contribucion_marginal_valor = $contribucion_marginal_valor;\n return $this;\n }", "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "public function set_privacy( ) {\n }", "function updateProbabilities() {\n\t\t// first update the word count of each category\n\t\t$rs = sql_query(\"SELECT catcode, SUM(wordcount) AS total FROM \".$this->table_wf.\" WHERE 1 GROUP BY catcode\");\n\t\t$total_words = 0;\n\t\twhile ($obj = mysql_fetch_object($rs)) {\n\t\t\t$total_words += $obj->total;\n\t\t}\n\n\t\tif ($total_words == 0) {\n\t\t\tsql_query(\"UPDATE \".$this->table_cat.\" SET wordcount = 0, probability = 0 WHERE 1\");\n\t\t} else {\n\t\t\t$rs = sql_query(\"SELECT catcode, SUM(wordcount) AS total FROM \".$this->table_wf.\" WHERE 1 GROUP BY catcode\");\n\t\t\twhile ($obj = mysql_fetch_object($rs)) {\n\t\t\t\t$proba = $obj->total / $total_words;\n\t\t\t\tsql_query(\"UPDATE \".$this->table_cat.\" SET wordcount=\".(int)$obj->total.\", probability=\".$proba.\" WHERE catcode = '\".$obj->catcode.\"'\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function atualizarPercentualProjeto($params)\n {\n $this->_mapper->atualizarPercentualProjeto($params);\n }", "public function mudarPercentual() {\n $cd_tarefa = $_POST['cd_tarefa'];\n $dados['pcompleto'] = $_POST['porcento'];\n if ($this->tarefa->atualizarTarefa($dados, $cd_tarefa)) {\n header(\"location: ../views/tarefa.php?tarefa=\" . $cd_tarefa);\n } else {\n header(\"location: ../views/tarefas.php\");\n }\n }", "public function ajustarPreco($percentual = 0)\n {\n if (is_numeric($percentual) && $percentual > 0) {\n $this->preco *= (1 + ($percentual / 100));\n }\n }", "public function setPercentual($nPercentual)\n {\n $this->nPercentual = $nPercentual;\n }", "public function getPercentualDepreciado();", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "private static function update_probabilities($generation){\n\t\t\n\t}", "function updateProbabilities() {\n\t\t// this function is really only database manipulation\n\t\t// that is why all is done in the NaiveBayesianStorage\n\t\treturn $this->nbs->updateProbabilities();\n\t}", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualNivA');\n if($paginaActual==null)\n Session::put('paginaActualNivA',1);\n }", "function SetPercentage($percentage)\n\t\t\t\t{ \n\t\t\t\t\tswitch (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase $percentage == true:\n\t\t\t\t\t\tcase $percentage == false:\n\t\t\t\t\t\tcase $percentage == 1:\n\t\t\t\t\t\tcase $percentage == 0:\n\t\t\t\t\t\t\t$this->percentage = $percentage;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$this->percentage = true;\n\t\t\t\t\t} \n }", "public function setNetMarginAttribute($value) {\n $parts = explode('%', $value);\n if (is_numeric($parts[0]) && $parts[1] === '') {\n $this->attributes['net_margin'] = ($this->fromFloat($parts[0]) / 100);\n }\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualR');\n if($paginaActual==null)\n Session::put('paginaActualR',1);\n }", "public function addPercentage();", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "public function getPercentualDepreciado() {\n return $this->nPercentualDepreciado;\n }", "public function privacyPolicyAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n $privacy = $em->getRepository('CMSBundle:DynamicPage')->find(5);\r\n\r\n return array(\r\n 'privacy' => $privacy,\r\n );\r\n }", "public function setPercentualDepreciado($nPercentualDepreciado = 0) {\n $this->nPercentualDepreciado = $nPercentualDepreciado;\n }", "public function setPolicycommpercentage($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->policycommpercentage !== $v) {\n\t\t\t$this->policycommpercentage = $v;\n\t\t\t$this->modifiedColumns[] = QcSearchPeer::POLICYCOMMPERCENTAGE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPolicycommpercentage($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->policycommpercentage !== $v) {\n\t\t\t$this->policycommpercentage = $v;\n\t\t\t$this->modifiedColumns[] = AmendmentsubmissionqcSearchPeer::POLICYCOMMPERCENTAGE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPuntualidad($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->puntualidad !== $v) {\n $this->puntualidad = $v;\n $this->modifiedColumns[] = comlabPeer::PUNTUALIDAD;\n }\n\n\n return $this;\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function testSetIndicePeriode() {\n\n $obj = new Bulletins();\n\n $obj->setIndicePeriode(10);\n $this->assertEquals(10, $obj->getIndicePeriode());\n }", "public function set_discount_per_unit($p_discount_per_unit){\n\t\t$this->v_discount_per_unit = (float) $p_discount_per_unit;\n\t}", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualEstI');\n if($paginaActual==null)\n Session::put('paginaActualEstI',1);\n }", "public function setCantidadPatio($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->cantidad_patio !== $v) {\n $this->cantidad_patio = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CANTIDAD_PATIO;\n }\n\n\n return $this;\n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "public function resetPartialProfilScoreUtilisateurProduits($v = true)\n {\n $this->collProfilScoreUtilisateurProduitsPartial = $v;\n }", "public function getVatPercent(): int;", "public function mutate() {\r\n $this->value = $this->value * PCommon::linear_randomf(0.5, 2.0);\r\n if ($this->value < FloatGene::$zeroLimit && $this->value > 0.0) {\r\n $this->value = FloatGene::$zeroLimit;\r\n }\r\n if ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0) {\r\n $this->value = - FloatGene::$zeroLimit;\r\n }\r\n // this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n assert($this->value != 0.0);\r\n }", "protected function porcentagemAcimaDoLimite()\n {\n return 0.8;\n }", "function getDiscountPercent() ;", "public function profil(){\n\n // ambil data member dari Admin_model\n // ambil data spesifik member\n $result = $this->admin_model->ambildatamember($this->id_member);\n\n $data['member'] = $result;\n\n $this->load->view('member/header');\n $this->load->view('member/sidebar', $this->datasidebar());\n $this->load->view('member/topbar');\n $this->load->view('member/profil', $data);\n $this->load->view('member/footer');\n\n }", "function manage_privacy()\n\t{\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_institute()) {\n\t\t\t$this->prepare_flashmessage(get_languageword('You dont have permission to access this page'), 1);\n\t\t\tredirect('auth/login', 'refresh');\n\t\t}\n\t\t\n\t\t$this->data['message'] = $this->session->flashdata('message');\n\t\t$this->data['profile'] = getUserRec();\t\t\n\t\tif(isset($_POST['submitbutt']))\n\t\t{\n\t\t\t$inputdata['free_demo'] = $this->input->post('free_demo');\n\t\t\t$inputdata['visibility_in_search'] = $this->input->post('visibility_in_search');\n\t\t\t$inputdata['show_contact'] = $this->input->post('show_contact');\n\t\t\t$inputdata['availability_status'] = $this->input->post('availability_status');\n\t\t\t$this->base_model->update_operation($inputdata, 'users', array('id' => $this->ion_auth->get_user_id()));\n\t\t\t$this->prepare_flashmessage(get_languageword('privacy updated successfully'), 0);\t\t\t\t\t\t\t\t\n\t\t\tredirect(URL_INSTITUTE_MANAGE_PRIVACY);\t\t\t\n\t\t}\n\t\t\n\t\t$this->data['pagetitle'] = get_languageword('Manage Privacy');\n\t\t$this->data['activemenu'] \t= \"manage\";\n\t\t$this->data['activesubmenu'] = \"manage_privacy\";\t\n\t\t$this->data['content'] \t\t= 'manage_privacy';\n\t\t$this->_render_page('template/site/tutor-template', $this->data);\n\t}", "public function testSetPourcentageImp() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentageImp(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentageImp());\n }", "function SetCnPar($p,$v){\n $this->Cn[$p] = $v;\n }", "public function setPriceCoefficientTotalAttribute($value) {\n //Example Value: 5.08 => 508 in BDD\n $this->attributes['price_coefficient_total'] = (int)round(($value*100),0);\n }", "public function testSetNbMAjoutPer() {\n\n $obj = new Etablissements();\n\n $obj->setNbMAjoutPer(\"nbMAjoutPer\");\n $this->assertEquals(\"nbMAjoutPer\", $obj->getNbMAjoutPer());\n }", "public function getProfitMarginPercentage()\n {\n return FormatUtils::formatPercentage($this->getProfitMargin());\n }", "public function privacyPolicy() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'privacy_policy';\n\t\t$data['moduleName'] = 'Privacy Policy';\n\t\t$data['page_data'] = $this->page_model->getPageData(PRIVACY_POLICY_ID);\n\n\t\t$template['body_content'] = $this->load->view('frontend/pages/privacy-policy', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\t\t\n\t}", "public function setColeccionMarcaPorcentaje($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->coleccion_marca_porcentaje !== $v) {\n\t\t\t$this->coleccion_marca_porcentaje = $v;\n\t\t\t$this->modifiedColumns[] = AlpzaMiembroAnexoPeer::COLECCION_MARCA_PORCENTAJE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPercentage(int $percentage): void\n {\n $this->percentage = $percentage;\n }", "public function calculateProbability() {\n\t\t$p = 1;\n\n\t\tforeach($this->effects as $e) {\n\t\t\t$p = $p * (1 - $e);\n\t\t}\n\n\t\t$this->probability = 1 - $p;\n\n\t}", "public function setDiscount($total);", "public function setPercentualUso($nPercentualUso) {\n $this->nPercentualUso = $nPercentualUso;\n }", "public function setDiscountOnTotalAttribute($value) {\n //Example Value: 5.08 => 508 in BDD\n $this->attributes['discount_on_total'] = (int)round(($value*100),0);\n }", "public function getPercentualUso() {\n return $this->nPercentualUso;\n }", "public function setPrivacypolicy($var)\n {\n GPBUtil::checkUint32($var);\n $this->privacypolicy = $var;\n }", "public function setPr($value)\n {\n return $this->set(self::PR, $value);\n }", "public function permissaoPerfil(&$params)\n {\n //Relacao de perfis que podem ver Riscos ainda nao aprovados pelo GP\n $perfisPermissao = array(\n Default_Model_Perfil::ADMINISTRADOR_GEPNET,\n Default_Model_Perfil::GERENTE_DE_PROJETOS,\n );\n\n if (in_array($this->auth->perfilAtivo->idperfil, $perfisPermissao)) {\n $params['ver_nao_aprovados'] = true;\n }\n }", "function porcentajes_unidad($unidad,$nivel){\n\t\tswitch($unidad){\n\t\t\tcase 1: $porcentaje = 0.30; break;\n\t\t\tcase 2: $porcentaje = 0.30; break;\n\t\t\tcase 3: $porcentaje = 0.40; break;\n\t\t}\n\t\treturn $porcentaje;\n\t}", "public function testSetMontantCoupon() {\n\n $obj = new VmpMouvements();\n\n $obj->setMontantCoupon(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantCoupon());\n }", "public function set_cotizacion_detalle_precio(float $cotizacion_detalle_precio) : void {\n $this->cotizacion_detalle_precio = $cotizacion_detalle_precio;\n }", "function changeMargin($baseFactorAmount = 0, $factor_type, $factor_mop, $targetTotalAmount = '')\n {\n if ($baseFactorAmount !== 0 && !empty($baseFactorAmount) && $baseFactorAmount !== null && $baseFactorAmount !== '') {\n if ($factor_type == '#') {\n return intval($factor_mop . $baseFactorAmount);\n } elseif ($factor_type == '%') {\n $calculated_value = ($factor_mop . (($baseFactorAmount / 100) * $targetTotalAmount));\n return $calculated_value;\n }\n } else {\n return;\n }\n }", "public function writePermeance($text='1.000', $unit='PermSI') {\n$this->startElement('Permeance');\n$this->writeAttribute('unit', $unit);\n$this->text($text);\n$this->endElement();\n}", "public function testSetProvCp() {\n\n $obj = new Bulletins();\n\n $obj->setProvCp(10.092018);\n $this->assertEquals(10.092018, $obj->getProvCp());\n }", "function set_proyecto($proyecto_id)\n\t{\n\t\t$this->proyecto_id = $proyecto_id;\n\t}", "public function caracteristicas($proyecto_id)\n\t{\n\t\t$user=$this->session->userdata('logged_in');\n\t\t$variables['user'] = $user;\t\n\t\t$this->load->model(\"permiso\",\"permiso\",true);\n\t\t$perm = $this->permiso->check($user['perfil_id'], 11);\n\t\tif ($perm['Modificacion'])\n\t\t{\n\t\t\tif ($proyecto_id > 0)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->load->model(\"proyecto\",\"proyecto\",true);\n\t\t\t\t$variables['proyecto_caracteristicas'] = $this->proyecto->dameCaracteristicas($proyecto_id);\n\t\t\t\t$variables['caracteristicas'] = $this->proyecto->dameCaracteristicaAsociar($proyecto_id);\n\t\t\t\t$variables['proyecto_id'] = $proyecto_id;\n\t\t\t\t$this->load->view(\"admin/proyectos/proyectos_caracteristicas\",$variables);\n\t\t\t}\n\t\t\telse\t\n\t\t\t\tprint \"Error. M&eacute;todo no soportado.\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint \"Error. Usted no tiene permiso para usar el m&oacute;dulo seleccionado\";\n\t\t}\n\t}", "public function setPrecio_final_iva($precio_final_iva)\n {\n $this->precio_final_iva = $precio_final_iva;\n return $this;\n }", "public function setPrivacy($var)\n {\n GPBUtil::checkInt64($var);\n $this->privacy = $var;\n }", "public function testSetPourcent() {\n\n $obj = new HistoPaieAnal();\n\n $obj->setPourcent(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcent());\n }", "public function mutate()\r\n\t\t{\r\n\t\t\t$this->value = $this->value * lcg_randf(0.5,2.0);\r\n\t\t\tif ($this->value < FloatGene::$zeroLimit && $this->value > 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = FloatGene::$zeroLimit;\r\n\t\t\t} \r\n\t\t\tif ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = - FloatGene::$zeroLimit;\r\n\t\t\t}\r\n\t\t\t// this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n\t\t\tassert($this->value != 0.0);\r\n\t\t}", "function template_manual_modify_profile_pm()\n{\n\t// TODO : Write this.\n}", "public function percentageMen(): Float\n {\n return $this->countMen / $this->countStudent * 100;\n }", "public function setTotalPaid($totalPaid);", "function setResidencyOccupancyPercentageInitial($temporaryPercentageValue){\n $this->residentOccupancyPercentage=$temporaryPercentageValue;\n }", "public function percentageWomen(): Float\n {\n return $this->countWomen / $this->countStudent * 100;\n }", "public function setAtributos($marca_p,$modelo_p,$cor_p){\n $this->_marca = $marca_p;\n //Atributo que 'seta' o modelo com o parametro recebido $modelo_p\n $this->_modelo=$modelo_p;\n //Atributo que 'seta' a cor com o parametro recebido $cor_p\n $this->_cor=$cor_p;\n }", "public function permisos()\n {\n $this->_acl->acceso('admin_access');\n $this->_view->assign('titulo', 'Administracion de permisos');\n $this->_view->assign('permisos', $this->_aclm->getPermisos());\n $this->_view->renderizar('permisos', 'acl');\n }", "private function _setPortraitTemplate()\n {\n $this->_width = static::$_width_po;\n $this->_height = static::$_height_po;\n $this->_page_columnWidth = ($this->_width - ($this->_margin_horizontal * 2)) / number_format($this->_ls_maxColumnOffset + 1, 2);\n $this->_page_columnOffset = $this->_ls_startColumnOffset;\n $this->_page_lineOffset = $this->_ls_startLineOffset;\n $this->_page_maxLineOffset = ($this->_height / $this->_lineHeight) - ($this->_margin_vertical / $this->_lineHeight) - 3;\n\n $this->_format = $this->_width.':'.$this->_height.':';\n }", "function setVerticalMargin($value) {\n $this->fields['margin_top'] = $this->fields['margin_bottom'] = $value;\n }", "function setPerPage($perPage){\n\t\t$this->perPage = $perPage;\n\t}", "function setProposition($proposition) {\n $this->proposition = $proposition;\n }", "public function setVlrPerc($value,$options=array('required'=>true)){ \n $this->_data['vlr_perc'] = new ZendT_Type_Number($value,array('numDecimal'=>4));\n if ($options['db'])\n $this->_data['vlr_perc']->setValueFromDb($value);\n \n if (!$options['db']){\n \n }\n return $this;\n }", "public function setCuotaTotalMensualMaxima($v)\n {\n if ($v !== null) {\n $v = (double) $v;\n }\n\n if ($this->cuota_total_mensual_maxima !== $v) {\n $this->cuota_total_mensual_maxima = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CUOTA_TOTAL_MENSUAL_MAXIMA;\n }\n\n\n return $this;\n }", "public function setCompletionPercentage(?int $value): void {\n $this->getBackingStore()->set('completionPercentage', $value);\n }", "private function updatePheromone() {\n for ($k=0; $k < $this->antPopulationSize; $k++) {\n foreach ($this->pheromone as $i => $value) { //zaktualizuj poziom feromonow\n foreach ($value as $j => $weight) {\n $this->pheromone[$i][$j] = (1 - $this->evapoRate)*$this->pheromone[$i][$j] + (isset($this->bufPheromone[$i][$j][$k]) ? $this->bufPheromone[$i][$j][$k] : 0);\n }\n }\n }\n }", "public function setPma($comp)\n {\n $this->pma = (boolean)$comp;\n return $this;\n }", "public function setValorAtual($nValorAtual = 0);", "public function GetMarginPercent()\n {\n \tif ($this->getPrice() > 0)\n\t\t return ($this->getPrice() - $this->getData(mage::helper('purchase/MagentoVersionCompatibility')->getSalesOrderItemCostColumnName())) / $this->getPrice() * 100;\n\t\telse \n\t\t\treturn 0;\n }", "public function setFeePercentAttribute($input)\n {\n $this->attributes['fee_percent'] = $input ? $input : null;\n }", "public function setConfidence($val) {\n $this->_confidence = $val;\n }", "public function getPercentage()\n {\n return 10;\n }", "protected function setProductivity()\n {\n $this->productivity = random_int(0, 1);\n }", "public function getProbability()\n {\n return $this->getEntityValue('probability', '');\n }", "public function getCuotaTotalMensualMaxima()\n {\n return $this->cuota_total_mensual_maxima;\n }", "public function getVatPercentage(): ?int;", "public function SetCantidad($param){\n\t\t$this->Cantidad = $param;\n\t}", "public function assignElCentroEffective($el_centro_effective) { $this->el_centro_effectives[] = $el_centro_effective; }", "public function getProbability()\n {\n return $this->probability;\n }", "function continutFacturaModel() {\n\t\t$y=100;\n\t\t$this -> pdf -> Rect( 1, $y, 14, $this -> inaltime_pagina); //nrcrt\n\t\t$this -> pdf -> Rect( 15, $y, 100, $this -> inaltime_pagina); //denumire\n\t\t$this -> pdf -> Rect(115, $y, 15, $this -> inaltime_pagina); //um\n\t\t$this -> pdf -> Rect(130, $y, 20, $this -> inaltime_pagina); //cantitate\n\t\t$this -> pdf -> Rect(150, $y, 20, $this -> inaltime_pagina); //pret\n\t\t$this -> pdf -> Rect(170, $y, 20, $this -> inaltime_pagina); //valoare\n\t\t$this -> pdf -> Rect(190, $y, 19, $this -> inaltime_pagina); //valoare tva\n\t}", "public function setVat($value);", "public function paragraphDensity()\n\t\t{\n\t\t\t$pwd = $this->result->data->analysis->pwd;\n\n\t\t\t// states: passed (green) - warning (yellow) - error (red)\n\t\t\t$ms = 100 - $pwd->measured->percentageParagraphsIdealWordCountMetadata;\n\t\t\t//$pwdMin = $pwd->recommended->paragraphWordDensityMin;\n\t\t\t$pwdMax = $pwd->recommended->paragraphWordDensityMax;\n\t\t\t// $state = arnanlyzer_rsl_state($ms, $rs);\n\t\t\t$state = strtolower($pwd->state);\n\n\t\t\t$out = '<div class=\"' . $this->DOMsort($state) . '\">' . PHP_EOL;\n\t\t\t$out .= '<input id=\"pwd\" name=\"pwd\" type=\"checkbox\" />' . PHP_EOL;\n\t\t\t$out .= '<label for=\"pwd\" id=\"ar-' . $state . '\">Paragraph Density</label>' . PHP_EOL;\n\t\t\t$out .= '<article class=\"ac-small\">' . PHP_EOL;\n\t\t\t$out .= '<p class=\"ar-analysis-' . $state . '\">';\n\t\t\tif ($state == 'green') {\n\t\t\t\t$out .= '<div>Your paragraphs are an ideal length for your target audience.</div>';\n\t\t\t} else {\n\t\t\t\t$out .= '<div>' . $ms . '% of your paragraphs are too long for your target audience. Write paragraphs with no greater than ' . $pwdMax . ' words.</div>';\n\t\t\t}\n\t\t\t$out .= '</p>' . PHP_EOL;\n\t\t\t$out .= '</article>' . PHP_EOL;\n\t\t\t$out .= '</div>' . PHP_EOL;\n\n\t\t\treturn $out;\n\t\t}", "public function getPolicycommpercentage()\n\t{\n\t\treturn $this->policycommpercentage;\n\t}" ]
[ "0.7564937", "0.64223516", "0.63397056", "0.49938643", "0.49908242", "0.4955069", "0.49097764", "0.48944402", "0.48253825", "0.47560734", "0.47448274", "0.47038928", "0.4648718", "0.46275312", "0.45742896", "0.45560095", "0.44921228", "0.44786152", "0.44580913", "0.44462836", "0.44428706", "0.44428706", "0.4440181", "0.44325972", "0.44097963", "0.43987003", "0.43977314", "0.4384793", "0.43734226", "0.43696392", "0.43635514", "0.43577072", "0.43506092", "0.4342902", "0.43291456", "0.43007693", "0.43003026", "0.42999798", "0.42867744", "0.4280666", "0.4275555", "0.4270609", "0.42699912", "0.42682558", "0.42680693", "0.42591447", "0.4250931", "0.4245831", "0.42450958", "0.42337328", "0.42237777", "0.42112967", "0.42088318", "0.42040086", "0.41994712", "0.41994178", "0.41973376", "0.41945577", "0.41935298", "0.41908053", "0.41902077", "0.4187782", "0.41660434", "0.41647613", "0.41632512", "0.4162596", "0.41419846", "0.4139595", "0.412572", "0.4123348", "0.4120318", "0.41145912", "0.41113052", "0.41068727", "0.4103517", "0.40995693", "0.40979874", "0.4096611", "0.4095224", "0.40940753", "0.40940538", "0.4089133", "0.4078497", "0.40765887", "0.40762666", "0.40738282", "0.40737516", "0.40698355", "0.4065914", "0.40654948", "0.40650502", "0.4060097", "0.4060054", "0.40599442", "0.40571913", "0.4052521", "0.40514222", "0.404932", "0.40463507", "0.40443143" ]
0.7617688
0
Get the value of precio_venta
Получить значение precio_venta
public function getPrecio_venta() { return $this->precio_venta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_venta_dto()\n {\n return $this->precio_venta_dto;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function getVenta() {\n return self::$venta;\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function setPrecio_venta($precio_venta)\n {\n $this->precio_venta = $precio_venta;\n return $this;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function getPonta(){\n return $this->ponta;\n }", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function getPVP($idproductos){\n\t\t$sql = \"SELECT precio \".\n\t\t\t\"FROM `productos` \".\n\t\t\t\"WHERE idproductos = \".$idproductos;\n\t\t$q = $this->c->prepare($sql);\n\t\t$q->execute();\n\t\treturn $q->fetch()['precio'];\n\t}", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function getPeso(): float;", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function EventiPrimopiano() {\n $session = USingleton::getInstance(\"USession\");\n $fuser = new FUtente();\n $user = $fuser->load($session->leggi_valore(\"email\"));\n $fevent = new FEvento();\n $query = \"SELECT * FROM `evento` WHERE `citta`='\" . $user->citta . \"'ORDER BY `numVisite` DESC\";\n if (is_bool($fevent->ricerca($query)))\n $query = \"SELECT * FROM `evento` ORDER BY `numVisite` DESC\";\n $event = $fevent->ricerca($query);\n return $event;\n }", "public function getData_venda()\n {\n return $this->data_venda;\n }", "public function getPrecioAhora()\r\n {\r\n return $this->precioAhora;\r\n }", "public function gettotalvente()\n {\n $db=$this->dbConnect();\n $sql = $db->prepare(\"SELECT ROUND(SUM(prix_vente),2) AS prix_vente,ROUND(SUM(nbre_vente),2) AS nbre_vente FROM vente\");\n $sql->execute();\n $totalvente=$sql->fetch();\n return $totalvente;\n }", "public function getPeso() {\n\t\t$sql = sprintf(\"Select\n sum(a.`peso`) as peso\n from\n `taxaitens` a\n inner join `taxa_item` b on(a.`idItem` = b.`id`)\n inner join `taxa` c on(a.`idTaxa` = c.`id`)\n where\n c.`data` BETWEEN '%s' and '%s' and\n b.`sexo` = 1\", $this->datai, $this->dataf);\n\t\t$rs = $this->conn->executeSql($sql)->fetch_object();\n\n\t\treturn $rs->peso;\n\t}", "function vojska_value($tip) {\n\tglobal $pozicije;\n\t\n\treturn $poz = $pozicije [$tip];\n}", "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "function prixtotalvente()\n{\n $test=new testgraph;\n $totalvente=$test->gettotalvente();\n echo $totalvente['prix_vente']*$totalvente['nbre_vente'];\n}", "function getEventBasePrice() \n {\n return $this->getValueByFieldName( 'event_basePrice' );\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function getPeso()\n {\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function ultima_venta($piso_venta)//DEL LADO DE LA WEB\n {\n \t$venta = Venta::select('id_extra')->where('piso_venta_id', $piso_venta)->orderBy('id', 'desc')->first();\n\n \treturn response()->json($venta);\n }", "public function getPriceValue()\n {\n return $this->price_value;\n }", "public function getPv()\n {\n return $this->pv;\n }", "public function setPrecio_venta_dto($precio_venta_dto)\n {\n $this->precio_venta_dto = $precio_venta_dto;\n return $this;\n }", "public static function getValueProduct($id, $tipo = null, $user = null)\r\n {\r\n $value = 0;\r\n $read = new Read();\r\n $read->ExeRead('products', 'where id=:id', 'id=' . $id);\r\n foreach ($read->getResult() as $dados) {\r\n extract($dados);\r\n if ($user != null) {\r\n if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else if ($tipo == 3) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 18), 2, \",\", \"\");\r\n } else if ($tipo == 4) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 9), 2, \",\", \"\");\r\n } else if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n }", "public function getCptTva() {\n return $this->cptTva;\n }", "public function getPeso()\n {\n return $this->peso;\n }", "public function getPeso()\n {\n return $this->peso;\n }", "public function getPotencia()\n {\n return $this->potencia;\n }", "function nbretotalvente()\n{\n $test=new testgraph;\n $totalvente=$test->gettotalvente();\n echo $totalvente['nbre_vente'];\n}", "public function getTpEvento()\n {\n return $this->tpEvento;\n }", "public function get_peso(){\r return $this->peso;\r }", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function get_precio_producto($producto)\r\n\t\t{\r\n\t\t\t$sql=\"SELECT precio FROM productos WHERE id_productos =\".$producto;\r\n\t\t\t$this->query($sql);\r\n\t\t\t$res=$this->execute();\r\n\t\t\tif($res){\r\n\t\t\t\t$result=$this->resultset();\r\n\r\n\t\t\t}else {$result=null;}\r\n\t\t\treturn $result;\r\n\t\t}", "function tempo()\n {\n return $this->km(pow($this->vdot, 1.73) - $this->vdot * 36 + 1340);\n }", "public function get_current_price(){\n\t\treturn (float) $this->v_current_price;\n\t}", "public function getTotal_venda()\n {\n return $this->total_venda;\n }", "public function horasperfo(){\n if($this->isNewRecord){\n $tienecontrol= Inventario::model()->findByPk($this->hidequipo)->tienecarter;\n }else{\n $tienecontrol= $this->inventario->tienecarter;\n }\n //var_dump(round(is_null($this->hpf)?0:$this->hpf-is_null($this->hpi)?0:$this->hpi,2));die();\n //var_dump($this->hpf); var_dump($this->hpi);\n if($tienecontrol=='1') {\n $x1=is_null($this->hpi)?0:(double)$this->hpi;\n $x2=is_null($this->hpf)?0:(double)$this->hpf;\n /* $x1=(double)$this->hpi;\n $x2=(double)$this->hpf;\n var_dump($x2);var_dump($x1);\n var_dump(round($x2-$x1,2));*/\n return round($x2-$x1,2);\n \n }\n \n return 0;\n \n }", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "public function getPrice() {\n $prezzo= $this->prezzo;\n if ($this->sconto==true) {\n $sconto = ($prezzo * $this->percSconto) / 100;\n $prezzo = round($prezzo - $sconto, 2);\n }\n return $prezzo;\n }", "function getPrecioServicioByID($idiservicio) {\n include './conexion.php';\n $sql = \"SELECT precio FROM servicios WHERE idiservicio = $idiservicio\";\n $result = $conn->query($sql);\n $rows = null;\n if ($result->num_rows > 0) {\n// output data of each row\n while ($row = $result->fetch_assoc()) {\n $rows = $row[\"precio\"];\n }\n return $rows;\n }\n $conn->close();\n }", "function total_pagado_venta($ven_id) {\n// sum(vpag_capital_desc) as descuento, sum(vpag_capital_inc) as incremento ,\n// sum(vpag_costo) as costo\n// from venta_pago where vpag_ven_id='$ven_id' and vpag_estado='Activo'\n// \";\n// $pagado = FUNCIONES::objeto_bd_sql($sql_pag);\n $pagado = FUNCIONES::total_pagado($ven_id);\n return $pagado;\n }", "public function geta() {\n return 5.20256; // (AU)\n }", "public function getPiso()\r\n\t{\r\n\t\treturn($this->piso);\r\n\t}", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "function fun_prec($prec){\r\n\t\t\tif($prec=='vlow')\r\n\t\t\t\t$prec = 4.05 ;\r\n\t\t\telse if($prec==\"low\")\r\n\t\t\t\t$pre = 3.24 ;\r\n\t\t\telse if($prec==\"nom\")\r\n\t\t\t\t$prec = 2.43 ;\r\n\t\t\telse if($prec=='high')\r\n\t\t\t\t$prec = 1.62 ;\r\n\t\t\telse if($prec=='vhigh')\r\n\t\t\t\t$prec = 0.81 ;\r\n\t\t\telse if($prec=='ehigh')\r\n\t\t\t\t$prec = 0.00 ;\r\n\t\t\treturn $prec;\r\n\t\t}", "public function getTTC()\n {\n return oledrion_utils::getAmountWithVat($this->getVar('product_price', 'e'), $this->getVar('product_vat_id'));\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getEvento()\r\n {\r\n return $this->evento;\r\n }", "public function getEvento()\r\n {\r\n return $this->evento;\r\n }", "function totalPendiente($idordenventa){\n\t\t\t$data=$this->leeRegistro(\n\t\t\t\t\"`wc_ordencobro` wc_ordencobro inner join `wc_detalleordencobro` wc_detalleordencobro on wc_ordencobro.`idordencobro`=wc_detalleordencobro.`idordencobro` \",\n\t\t\t\t\"sum(wc_detalleordencobro.`saldodoc`)\",\n\t\t\t\t\" wc_detalleordencobro.`estado`=1 and wc_ordencobro.`idordenventa`='$idordenventa' and wc_detalleordencobro.`situacion`='' \",\n\t\t\t\t\"\");\n\t\t\treturn $data[0]['sum(wc_detalleordencobro.`saldodoc`)'];\n\t\t}", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function getValorVenda()\n {\n return $this->valorVenda;\n }", "public function getVat(): ?float;", "public function getValue()\n\t\t{\n\t\t\treturn $this->trade_value;\n\t\t}", "public function getPeso()\n {\n return $this->peso;\n\n }", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "public function getValor() {\n return $this->valor;\n }", "function getPuissance(){\n return $this->_puissance;\n }", "function totalTva()\n{\n\t$total_tva = totalHt() * 0.2;\n\treturn round($total_tva, 2);\n}", "public function getPreteA()\n {\n return $this->prete_a;\n }", "public function getIva()\n {\n return $this->iva;\n }", "function aproximar_promedio($prom,$valor){\n\n\n\tif ($valor==1){\n\t\t$prom=round($prom,0);\n\t}\n\tif ($valor==1){\n\t\t$prom=floor($prom);\n\t}\n\treturn $prom;\n}", "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "public function value()\n {\n return Common::decimal($this->getAttribute('value'));\n }", "function get_productoinventario($producto_id)\r\n {\r\n $producto = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `inventario`\r\n\r\n WHERE\r\n `producto_id` = ?\r\n \",array($producto_id))->row_array();\r\n\r\n return $producto;\r\n }", "function get_productoinventario($producto_id)\r\n {\r\n $producto = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `inventario`\r\n\r\n WHERE\r\n `producto_id` = ?\r\n \",array($producto_id))->row_array();\r\n\r\n return $producto;\r\n }", "public function get_estatura(){\r return $this->estatura;\r }", "public function getPrixVente(): ?float {\n return $this->prixVente;\n }", "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}", "public function get_piso_venta_id()\n {\n \t$usuario = Auth::user()->piso_venta->id;\n\n \treturn response()->json($usuario);\n }", "public function getVelocidad()\n {\n return $this->velocidad;\n }", "public function getVoto()\n {\n return $this->voto;\n }", "public function getProduto()\n {\n return $this->produto;\n }", "public function getProduto()\n {\n return $this->produto;\n }", "public function getPayPalBasketVatValue()\n {\n }", "public function getEVENTO()\n {\n return $this->EVENTO;\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }" ]
[ "0.729701", "0.6754875", "0.67311776", "0.66854584", "0.6677664", "0.6636726", "0.6613844", "0.66039526", "0.6551391", "0.6551391", "0.6551391", "0.6551391", "0.64146423", "0.63332367", "0.62192744", "0.6145585", "0.6143941", "0.6143311", "0.6143311", "0.6107783", "0.6048736", "0.6009635", "0.59961814", "0.5977948", "0.5945129", "0.59373266", "0.5913144", "0.58853847", "0.58616084", "0.58515126", "0.58515126", "0.5846799", "0.5828811", "0.58251435", "0.58086354", "0.57951546", "0.578036", "0.5764038", "0.5756791", "0.575402", "0.5739736", "0.57230407", "0.5711506", "0.56951576", "0.56951576", "0.5673112", "0.566564", "0.5657749", "0.56519073", "0.5649171", "0.56421643", "0.5612247", "0.56120795", "0.5610645", "0.5607015", "0.56040776", "0.5604027", "0.5601656", "0.5597266", "0.5593594", "0.5590286", "0.55818915", "0.5580867", "0.55774415", "0.5562699", "0.5562699", "0.5562699", "0.5562699", "0.5562699", "0.55568683", "0.55568683", "0.5541512", "0.55375427", "0.5529619", "0.5521964", "0.550715", "0.55018896", "0.5488079", "0.54731596", "0.5473045", "0.5460708", "0.5443949", "0.5442812", "0.54399264", "0.54128754", "0.5412638", "0.5408656", "0.5406833", "0.5406833", "0.54057735", "0.54038906", "0.5403437", "0.5399182", "0.5397121", "0.5394872", "0.539251", "0.539251", "0.5391449", "0.53749484", "0.53748626" ]
0.83135885
0
Set the value of precio_venta
Задайте значение precio_venta
public function setPrecio_venta($precio_venta) { $this->precio_venta = $precio_venta; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function setPrecio_venta_dto($precio_venta_dto)\n {\n $this->precio_venta_dto = $precio_venta_dto;\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function testSetTvaFictivePrec() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePrec(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePrec());\n }", "public function set_Venta($id_venta){\n\t\t\n\t\tif(is_numeric($id_venta)){\n\t\t\t$query = \"UPDATE facturas SET fk_venta='$id_venta' WHERE id='$this->id' \";\n\t\t\tif(!mysql_query($query))\n\t\t\tthrow new Exception(\"Error al actualizar la venta en la BBDD.\");\n\n\t\t\t$this->venta = $id_venta;\n\n\t\t}else\n\t\tthrow new Exception(\"Debe introducir una venta v&aacute;lida.\");\n\t}", "public function testSetTvaFictivePres() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePres(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePres());\n }", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "private function set_event_data($pmv = ''){\n\t\t\tif(array_key_exists('EVO_props', $GLOBALS) ){\n\t\t\t\tglobal $EVO_props;\n\t\t\t\tif(isset($EVO_props[$this->event_id])){\n\t\t\t\t\t$this->pmv = $EVO_props[$this->event_id];\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\t$this->pmv = (!empty($pmv))? $pmv : get_post_custom($this->event_id);\n\t\t\t$GLOBALS['EVO_props'][$this->event_id] = $this->pmv;\n\t\t}", "public function NuevaVenta ( $fecha , $venta ) {\r\n\r\n\t\t$this->db->query ( \"INSERT INTO ventas \r\n\t\t\t\t\t\t\t( precio , fecha ) \r\n\t\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t\t\t('$venta', '$fecha')\" ) ;\r\n\t}", "public function setVat($value);", "public function aprova()\n {\n $this -> estadoAtual -> aprova($this);\n }", "function conf_evt__aceptar($evento, $fila)\n\t{\n\t\tif ( $this->datos[$fila]['estado']!='PENDIENTE') \n\t\t{\n\t\t\t$evento->anular(); \n\t\t}\n\t}", "public function testSetFacturationPaiePrec() {\n\n // Set a Date/time mock.\n $facturationPaiePrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationPaiePrec($facturationPaiePrec);\n $this->assertSame($facturationPaiePrec, $obj->getFacturationPaiePrec());\n }", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "public function setPrice($value) {\n //può essere decimale o meno ma con solo 2 cifre dopo il punto\n $this->price = $value;\n \n }", "function setFechaVisitaPoi($fechaVisitaPoi) {\n $this->fechaVisitaPoi = $fechaVisitaPoi;\n }", "public function testSetPourcent() {\n\n $obj = new HistoPaieAnal();\n\n $obj->setPourcent(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcent());\n }", "public function setVoti(float $voto){\n if($voto>2 && $voto <= 10 ){\n \n $this->voti[] = $voto;\n \n } else {\n\n $messaggio = new Exception(\"Il valore $voto è errato\");\n throw $messaggio;\n }\n }", "public function otroPrecio($posicion,$precio){\n $coleccion=$this->getFunciones();\n $coleccion[$posicion]->setPrecio($precio);\n }", "public function setPrecio($precio)\n {\n $this->precio = floatval($precio);\n\n return $this;\n }", "public function testSetPourcentExo() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentExo(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentExo());\n }", "public function getPrecio_venta_dto()\n {\n return $this->precio_venta_dto;\n }", "public function testSetPLafondExo() {\n\n $obj = new Etablissements();\n\n $obj->setPLafondExo(10.092018);\n $this->assertEquals(10.092018, $obj->getPLafondExo());\n }", "function setProgreso($progreso) {\r\n\t\t$this->progreso = $progreso;\r\n\t}", "public static function proiezioniSettimanaProssima() {\n $settimana = EData::getSettimanaProssima();\n $elenco = FPersistentManager::getInstance()->loadBetween($settimana[0], $settimana[1], \"EProiezione\");\n\n VGestoreREST::showJSON($elenco);\n }", "public function updated(Venta $venta)\n {\n $venta->costofinal=$venta->costoc-$venta->descuento;\n $venta->save();\n }", "public function setPiso($piso)\r\n\t{\r\n\t\t$this->piso = $piso;\r\n\t}", "public function setVisina($v){\n if($v<0){\n $this->visina=0;\n }elseif($v>250){\n $this->visina=250;\n }else{\n $this->visina=$v;\n }\n }", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "function actualiza_Ponencia($pp_id, $pp_año, $pp_titulo, $pp_nombre_evento, $pp_lugar, $te_id)\n\t\t{\n\t\t\t$this->sql=\"UPDATE ponencia SET pp_año=$pp_año, pp_titulo='$pp_titulo', pp_nombre_evento='$pp_nombre_evento', pp_lugar='$pp_lugar', te_id=$te_id where pp_id=$pp_id\";\n\t\t\t\n\t\t\tparent::ejecutaQUERY();\n\t\t}", "function setAuditoriaApoyo1_patentes($ptt){\n $this->ptt_rev_apoyo1 = $ptt;\n $this->apoyo1_total_patentes = $ptt;\n $this->save();\n }", "Private function setPorta($porta){\n $this -> porta = $porta;\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "function setPagina($otra_pag){\r\n\t\t\t$this->pag = $otro_pag;\r\n\t\t}", "private function setPrazoEntrega($prazoEntrega) {\n $this->prazoEntrega = (integer) $prazoEntrega;\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function escolherSetorVida()\n {\n $profissional = $this->input->get(\"p\");\n\n if($profissional != 1)\n {\n redirect('jogo/consultaVirtual');\n }\n\n $dados = $this->getDadosTelaInicial();\n \n // carrega o template\n $this->template->view(\"automatico_escolher_setor_vida\", array(\n \"title\" => \"Auto Consulta\",\n \"verticalTabs\" => true,\n \"jogosConsultaVirtual\" => $dados['jogosConsultaVirtual'],\n \"jogosAutoConsulta\" => $dados['jogosAutoConsulta'],\n \"setoresVida\" => $dados['setoresVida'],\n \"profissional\" => $profissional,\n \"codUsuarioCombinacao\" => $dados['codUsuarioCombinacao'],\n \"menuLateral\" => false\n ));\n }", "function setPrice($value, $type='unit');", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public static function proiezioniSettimanali() {\n $settimana = EData::getSettimana();\n $elenco = FPersistentManager::getInstance()->loadBetween($settimana[0], $settimana[1], \"EProiezione\");\n\n VGestoreREST::showJSON($elenco);\n }", "public function setValor( $value ){\n\t\n\t\tarray_push( $this->valores_cliente , $value );\n\t\n\t}", "public function testSetTvaFictive1() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive1(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive1());\n }", "public function created(Venta $venta)\n {\n $venta->costofinal=$venta->costoc-$venta->descuento;\n $venta->save();\n\n }", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "public function setPro_peso($pro_peso)\n {\n $this->pro_peso = str_replace(',', '.', $pro_peso);\n }", "public function setPesoAttribute($input)\n {\n if ($input != '') {\n $this->attributes['peso'] = $input;\n } else {\n $this->attributes['peso'] = null;\n }\n }", "function setPrice( $value )\r\n {\r\n $this->Price = $value;\r\n setType( $this->Price, \"integer\" );\r\n }", "function setAuditoriaSupervisor_patentes($ptt){\n $this->ptt_rev_supervisor_fcv = $ptt;\n $this->supervisor_total_patentes = $ptt;\n $this->save();\n }", "function setEsOtrosEgresos(){\n\t\t//$xO->es_estadistico(\"0\");//Si es estadistico, operacion base estadisticos.- Obsoleto pero usado.\n\t\t//Agregar clase efectivo\n\t\t//Cambiar el recibo que afecta\n\t\t$this->getObj()->recibo_que_afecta(RECIBOS_TIPO_OEGRESOS);\n\t\t$this->getObj()->query()->update()->save($this->getObj()->idoperaciones_tipos()->v());\n\t\t$this->setCleanCache();\n\t}", "public function setVida($nuevo){\n $this->vida=$nuevo;\n }", "abstract public function setValorTransacao($valor);", "public function setIdEvento(int $idevento){$this->idEvento=$idevento;}", "private function setCep($cep)\n {\n //Attribute sanitizer and validation\n if (null != $cep || $cep <= 0) {\n $string = (string) $cep;\n $string = preg_replace('/[^0-9]/', '', $cep);\n $cep = (int) $string;\n }\n $this->cep = $cep;\n }", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "function setAuditoriaApoyo2_patentes($ptt){\n $this->ptt_rev_apoyo2 = $ptt;\n $this->apoyo2_total_patentes = $ptt;\n $this->save();\n }", "public function testSetFacturationComptaPrec() {\n\n // Set a Date/time mock.\n $facturationComptaPrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationComptaPrec($facturationComptaPrec);\n $this->assertSame($facturationComptaPrec, $obj->getFacturationComptaPrec());\n }", "function setPrice($price){\n $this->price = $price;\n }", "public function setFecha($n)\n {\n this->$v_fecha=$n;\n \n }", "function setNapetiVacik($napetiVacik);", "public function testSetMontantTva() {\n\n $obj = new TempsPasses();\n\n $obj->setMontantTva(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantTva());\n }", "public function setProvincia($p_provincia){\r\n\t$this->provincia=$p_provincia;\r\n}", "function aumentar_cantidad_producto($producto_id,$existencia,$ultimocosto,$producto_precio)\r\n {\r\n $sql = \"update inventario set inventario.producto_precio=\".$producto_precio.\", inventario.producto_ultimocosto=\".$ultimocosto.\", inventario.existencia=inventario.existencia+\".$existencia.\" where producto_id=\".$producto_id.\"\";\r\n\r\n $this->db->query($sql);\r\n }", "function aumentar_cantidad_producto($producto_id,$existencia,$ultimocosto,$producto_precio)\r\n {\r\n $sql = \"update inventario set inventario.producto_precio=\".$producto_precio.\", inventario.producto_ultimocosto=\".$ultimocosto.\", inventario.existencia=inventario.existencia+\".$existencia.\" where producto_id=\".$producto_id.\"\";\r\n\r\n $this->db->query($sql);\r\n }", "static function set_price($id, $value)\n {\n if(!$event = reset(MongoLib::find_with_perms('events', $id)))\n return ErrorLib::set_error(\"That event is not within your domain\");\n \n // TODO: check value\n \n if($event['price'] == $value)\n return $id;\n \n // all clear!\n \n $update['price'] = floatval($value);\n MongoLib::set('events', $id, $update);\n\n History::add('events', $id, array('action' => 'set_price', 'value' => $value));\n \n $event['price'] = $value;\n self::validize($event);\n \n return $id;\n }", "public function testSetPu() {\n\n $obj = new TempsPasses();\n\n $obj->setPu(10.092018);\n $this->assertEquals(10.092018, $obj->getPu());\n }", "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "private function setTaxaInscricao($codigopessoa, $codigoTurma){\r\n try{\r\n\r\n $this->dbo->setEntidade(\"dbprodutos\");\r\n $criteriaProduto = new TCriteria();\r\n $criteriaProduto->add(new TFilter('tabela','=',$codigoTurma));\r\n $criteriaProduto->add(new TFilter('ativo','=','1'));\r\n $retTaxaProd = $this->dbo->select(\"*\", $criteriaProduto);\r\n $taxaProd = $retTaxaProd->fetch(PDO::FETCH_ASSOC);\r\n\r\n $dadosTaxa['codigoproduto'] = $taxaProd['codigo'];\r\n $dadosTaxa['valortotal'] = $taxaProd['valor'];\r\n $dadosTaxa['valorcorrigido'] = $taxaProd['valor'];\r\n $dadosTaxa['valormensal'] = $taxaProd['valor'];\r\n //$dadosTaxa['tipomovimentacao'] = 'C';\r\n $dadosTaxa['plcoseq'] = $this->produto['codigoplanoconta'];\r\n $dadosTaxa['numparcelas'] = '1';\r\n $dadosTaxa['datainicio'] = $this->produto['datainicio'];\r\n $dadosTaxa['datavencimento'] = $this->produto['datainicio'];\r\n $dadosTaxa['efetivada'] = '1';\r\n $dadosTaxa['valordescontado'] = 0;\r\n $dadosTaxa['obs'] = \"Taxa de inscrição - Turma - \".$this->produto['nometurma'];\r\n $dadosTaxa['tabela'] = $codigoTurma;\r\n\r\n $codigoTransacTaxa = $this->setTransacao($codigopessoa, $dadosTaxa);\r\n\r\n return $codigoTransacTaxa;\r\n\r\n }catch(Exception $e){\r\n echo $e;\r\n }\r\n }", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "public function testSetParticipServPers() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipServPers(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipServPers());\n }", "function set_viene($pos,$tam=0,$alinea=\"\",$borde=0,$fillColor=0,$tfuen,$estilo=\"\",$valor=0){\n\n\t\t$this->viene[]=array('pos'=>$pos,\n\t\t\t\t\t\t\t\t\"ancho\"=>$tam,'alinea'=>$alinea,'tfuente'=>$tfuen,\n\t\t\t\t\t\t\t\t'estilo'=>$estilo,'borde'=>$borde,'relleno'=>$fillColor,\n\t\t\t\t\t\t\t\t'valor'=>$valor);\n\t}", "private function inizVarContratto(){\r\n $this->varWork=$this->post('data');\r\n $giorni=$this->post('giorni');\r\n $giorni[0]=0;\r\n $this->giorni=$giorni;\r\n $this->setTime();\r\n $this->setDate();\r\n $this->setIdPrenotazione();\r\n }", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new HistoPaieAnal();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "function setPuesto($val)\n\t { return $this->puesto=$val;}", "function asignar_valores(){\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->producto=$_POST['id'];\n\t}", "public function testSetPv1() {\n\n $obj = new TempsPasses();\n\n $obj->setPv1(10.092018);\n $this->assertEquals(10.092018, $obj->getPv1());\n }", "function set_fechaIngreso( $fechaIngreso ) {\n // sets the value of fechaIngreso\n $this->fechaIngreso = $fechaIngreso;\n }", "public function update($venta);", "public function testSetAutresOpe1() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpe1(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpe1());\n }", "public function actualizar_estado_cartera(){\n // Actualizar las cartera con fechas inferior a hoy y con estado distinto a Pagada\n TesoPlanPagosEstudiante::where('fecha_vencimiento','<', date('Y-m-d'))\n ->where('estado','<>', 'Pagada')\n ->update(['estado' => 'Vencida']);\n }", "public function setPuerto($data)\n {\n\n if ($this->_puerto != $data) {\n $this->_logChange('puerto');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_puerto = $data;\n } else if (!is_null($data)) {\n $this->_puerto = (int) $data;\n } else {\n $this->_puerto = $data;\n }\n return $this;\n }", "public function __construct(array $venta)\r\n { $this->idVenta = $venta['IdVenta'];\r\n $this->total = $venta['Total'];\r\n $this->fechaCompra = $venta['FechaCompra'];\r\n $this->usuario = $venta['Usuario'];\r\n }", "public function testSetAutresOpe3() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpe3(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpe3());\n }", "function inicializar($evento,$tipo_ev,$linea_investigacion,$lider,$invitados,$fecha_ini_e,$fecha_cu_eve,$lugar_e,$tema,$facilitador,$asistencia,$estatus_e,$archivo_e,$descripcion,$cod_usuario,$pgconn){\n \n \t$this->evento = $evento;\n \t$this->tipo_ev = $tipo_ev;\n $this->linea_investigacion = $linea_investigacion;\n \t$this->lider = $lider;\n $this->invitados = $invitados;\n \t$this->fecha_ini_e = $fecha_ini_e;\n $this->fecha_cu_eve = $fecha_cu_eve;\n \t$this->lugar_e = $lugar_e;\n \t$this->tema = $tema;\n \t$this->facilitador = $facilitador;\n $this->asistencia = $asistencia;\n $this->estatus_e = $estatus_e;\n $this->archivo_e = $archivo_e;\n $this->descripcion = $descripcion;\n $this->cod_usuario = $cod_usuario;\n $this->pgconn = $pgconn;\n \t//$this->file_inv = $file_inv;\n \t// $this->trayecto = $trayecto;\n \t// $this->trimestre = $trimestre;\n \t// $this->turno = $turno;\n \t// $this->seccion = $seccion;\n //$this->actividad_option = $actividad_option;\n \t\n\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "function setValores($proveedor,$fecha_pedido,$dir_entrega,$orden_produccion,$fecha_requerida,$estado,$n_pedido,$fecha_desde,$fecha_hasta,$fecha_entrega,$estado_op,$id_sede,$paginacion) {\n\t\t$this->proveedor = $proveedor;\n\t\t$this->fecha_pedido = $fecha_pedido;\n\t\t$this->dir_entrega = $dir_entrega;\n\t\t$this->orden_produccion = $orden_produccion;\n\t\t$this->fecha_requerida = $fecha_requerida;\n\t\t$this->estado = $estado;\n\t\t$this->n_pedido = $n_pedido;\n\t\t$this->fecha_desde = $fecha_desde;\n\t\t$this->fecha_hasta = $fecha_hasta;\n\t\t$this->fecha_entrega = $fecha_entrega;\n\t\t$this->estado_op = $estado_op;\n\t\t$this->id_sede = $id_sede;\n\t\t$this->paginacion = $paginacion;\n\t\t\t\t\n\t\t$this->prepararConsulta();\n\t}", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "function modificarProcesoVenta(){\n\t\t$this->procedimiento='vef.ft_proceso_venta_ime';\n\t\t$this->transaccion='VF_PROCON_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_venta','id_proceso_venta','int4');\n\t\t$this->setParametro('tipos','tipos','_varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_desde','fecha_desde','date');\n\t\t$this->setParametro('id_int_comprobante','id_int_comprobante','int4');\n\t\t$this->setParametro('fecha_hasta','fecha_hasta','date');\n\t\t$this->setParametro('estado','estado','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getVenta() {\n return self::$venta;\n }", "public function setPosicion( $posicion, $foco ) {\n $this->posicion[$this->obtenerIdFoco($foco)]=$posicion;\n //activar y enviar\n }", "function set_deposit_price()\n {\n $deposit_price = $this->input->post(\"deposit_price\");\n $this->sale_lib->set_deposit_price($deposit_price);\n \n $this->_reload();\n }", "public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value * 100;\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualEstI');\n if($paginaActual==null)\n Session::put('paginaActualEstI',1);\n }", "public function testSetAutresOpeTotal() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpeTotal(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpeTotal());\n }" ]
[ "0.72043043", "0.66600543", "0.62142336", "0.6193432", "0.61481136", "0.61080164", "0.5973208", "0.59352076", "0.5870347", "0.5779204", "0.5765509", "0.5762735", "0.5739963", "0.57232153", "0.5722016", "0.56890607", "0.5658276", "0.5642662", "0.56414056", "0.56409407", "0.5630984", "0.5620841", "0.56024057", "0.559716", "0.5584964", "0.55425364", "0.55152225", "0.5506394", "0.5477764", "0.54697573", "0.5467084", "0.546478", "0.5461649", "0.5460563", "0.54551905", "0.54476684", "0.5443043", "0.5436458", "0.54268855", "0.5425862", "0.5413212", "0.5404093", "0.5404093", "0.54029596", "0.53992087", "0.5394913", "0.53934264", "0.5386494", "0.5367046", "0.53639805", "0.5358158", "0.5356899", "0.5338921", "0.53371465", "0.53312206", "0.5315562", "0.5302349", "0.52958757", "0.5280727", "0.527975", "0.5278877", "0.5275809", "0.52712303", "0.526966", "0.52634734", "0.5262961", "0.5262961", "0.52611554", "0.5260252", "0.52423096", "0.52403176", "0.52212113", "0.522079", "0.5219876", "0.52087647", "0.52049315", "0.5200833", "0.51871103", "0.51852155", "0.5180818", "0.5178358", "0.5175247", "0.51731956", "0.5172956", "0.5168246", "0.5167796", "0.5164201", "0.51630515", "0.51630515", "0.51576304", "0.5149118", "0.51468074", "0.51457185", "0.51442564", "0.51276547", "0.5127376", "0.5125557", "0.5125009", "0.5123939", "0.5123814" ]
0.738603
0
Get the value of precio_venta_dto
Получить значение precio_venta_dto
public function getPrecio_venta_dto() { return $this->precio_venta_dto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function setPrecio_venta_dto($precio_venta_dto)\n {\n $this->precio_venta_dto = $precio_venta_dto;\n return $this;\n }", "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "public function getVenta() {\n return self::$venta;\n }", "public function setPrecio_venta($precio_venta)\n {\n $this->precio_venta = $precio_venta;\n return $this;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function getData_venda()\n {\n return $this->data_venda;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "function avaliacaoAvaliadorDTO() {\n\n}", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getPonta(){\n return $this->ponta;\n }", "public function getDataVencimento() {\n return $this->dtVencimento;\n }", "function get_data() {\n $dt=DateTime::createFromFormat($this->date_format(), $this->data, $this->timezone());\n if(!$dt) {\n $dt=DateTime::createFromFormat($this->value_format(), $this->data, $this->timezone());\n if(!$dt)\n\treturn null;\n }\n\n return $dt->format($this->value_format());\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getValue() {\n\t\treturn $this->tsValue('value');\n\t}", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function value()\n {\n return Common::decimal($this->getAttribute('value'));\n }", "public function getDataVencimento()\n {\n return $this->dataVencimento;\n }", "protected function getResponseData() {\n $converter = $this->getServiceLocator()->getTypeConverter();\n return $converter->toString($this->value);\n }", "public function getVTipo()\n{\nreturn $this->vTipo;\n}", "public function getCptTva() {\n return $this->cptTva;\n }", "public function getValue() {\n\n return $this->value;\n\n }", "public function getVat()\n {\n $value = $this->get(self::VAT);\n return $value === null ? (string)$value : $value;\n }", "public function getDataOperacao() {\n return $this->data_operacao;\n }", "public function getValue()\n {\n return $this->getReflector()->getValue();\n }", "public function getValueObject(){\n // $class = SmartestDataUtility::getClassForDataType($this->getDatatype());\n // return new $class($this->_properties['value']);\n // echo $this->getDatatype();\n return SmartestDataUtility::objectize($this->_properties['value'], $this->getDatatype());\n }", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function getTpEvento()\n {\n return $this->tpEvento;\n }", "public function getDataWithTypeTsfe() {}", "public function getValue() {\n return $this->get('value');\n }", "public function ultima_venta($piso_venta)//DEL LADO DE LA WEB\n {\n \t$venta = Venta::select('id_extra')->where('piso_venta_id', $piso_venta)->orderBy('id', 'desc')->first();\n\n \treturn response()->json($venta);\n }", "function getFechaTomaInventario(){\n return $this->fecha_toma;\n }", "public function toObject()\r\n\t{\r\n\t\t$value = null;\r\n\t\t\r\n\t\tif(isset($this->dataObject) || !is_null($this->dataObject)) //There is an object behind the data object \r\n\t\t{\r\n\t\t\tKalturaLog::debug(\"Take value from data object [\" . print_r($this->dataObject,true) .\"]\");\r\n\t\t\t$value = $this->dataObject;\r\n\t\t}\r\n\t\telse //Simple Type\r\n\t\t{\r\n\t\t\tKalturaLog::debug(\"Take value from value [\" .print_r($this->getValue(),true) .\"]\");\r\n\t\t\t$value = $this->getValue();\r\n\t\t}\r\n\t\t\r\n\t\treturn $value;\r\n\t}", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "function getValue() {\n return $this->value;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function getValue()\n {\n return $this->value;\n }", "private function getDateObject()\n {\n return $this->value;\n }", "public function getVat()\n {\n return $this->vat;\n }", "public function getValue(){return $this->value;}", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "public function getValue(){\n\t\treturn $this->value;\n\t}", "public function getValue()\n {\n return $this->value;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function get_piso_venta_id()\n {\n \t$usuario = Auth::user()->piso_venta->id;\n\n \treturn response()->json($usuario);\n }", "public function getEvento()\r\n {\r\n return $this->evento;\r\n }", "public function getEvento()\r\n {\r\n return $this->evento;\r\n }", "public function getValue()\n {\n return $this->get(self::VALUE);\n }", "public function getValue() \n { \n return $this->_data; \n }", "public function getVelocidad()\n {\n return $this->velocidad;\n }", "public function get_value()\n { \n return $this->value;\n }", "public function getValue() {\n return $this->_value;\n }", "public function getValor() {\n return $this->valor;\n }", "public function Value()\n {\n return $this->dataValue();\n }", "function getValue() {\n\n return $this->value;\n\n }", "public function getEVENTO()\n {\n return $this->EVENTO;\n }", "public function getPeso()\n {\n }", "public function getValue()\n {\n return $this->value;\n }", "public function get_value() {\n return $this->value;\n }", "public function get_value() {\n return $this->value;\n }", "public function value()\n {\n return $this->_data;\n }", "public function get_estatura(){\r return $this->estatura;\r }", "public function getDataVenda()\n {\n return $this->dataVenda;\n }", "public function getData_acesso()\n {\n return $this->data_acesso;\n }", "function getEventBasePrice() \n {\n return $this->getValueByFieldName( 'event_basePrice' );\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }" ]
[ "0.7543023", "0.6903539", "0.6582616", "0.6494891", "0.610076", "0.60968745", "0.60739625", "0.6026402", "0.60043424", "0.59735423", "0.59345275", "0.5875548", "0.58628976", "0.5854361", "0.58256346", "0.5821796", "0.5821796", "0.5821796", "0.5821796", "0.5748069", "0.57341945", "0.5732712", "0.566514", "0.56555", "0.5645099", "0.5640989", "0.56151927", "0.55805504", "0.5568182", "0.5555345", "0.5551836", "0.554638", "0.55434996", "0.5541707", "0.5541707", "0.5539358", "0.55355287", "0.5523378", "0.5502419", "0.5483425", "0.5483265", "0.54763365", "0.54763365", "0.5469329", "0.5459708", "0.5458782", "0.5458782", "0.5458782", "0.5458782", "0.5458782", "0.54559606", "0.5446431", "0.5435627", "0.5434873", "0.5433926", "0.5433224", "0.54304385", "0.542667", "0.5426665", "0.5426665", "0.5426665", "0.5426665", "0.5426665", "0.542662", "0.5405572", "0.5405572", "0.53987557", "0.53904974", "0.5388795", "0.5376904", "0.5367117", "0.5354646", "0.5354139", "0.5352335", "0.5349591", "0.5348916", "0.53475", "0.5341047", "0.5341047", "0.53399235", "0.5339729", "0.5339159", "0.53316253", "0.53224516", "0.5321301", "0.5321301", "0.5321301", "0.5321301", "0.5321301", "0.5321301", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971", "0.5315971" ]
0.864192
0
Set the value of precio_venta_dto
Установите значение precio_venta_dto
public function setPrecio_venta_dto($precio_venta_dto) { $this->precio_venta_dto = $precio_venta_dto; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPrecio_venta($precio_venta)\n {\n $this->precio_venta = $precio_venta;\n return $this;\n }", "public function getPrecio_venta_dto()\n {\n return $this->precio_venta_dto;\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function set_Venta($id_venta){\n\t\t\n\t\tif(is_numeric($id_venta)){\n\t\t\t$query = \"UPDATE facturas SET fk_venta='$id_venta' WHERE id='$this->id' \";\n\t\t\tif(!mysql_query($query))\n\t\t\tthrow new Exception(\"Error al actualizar la venta en la BBDD.\");\n\n\t\t\t$this->venta = $id_venta;\n\n\t\t}else\n\t\tthrow new Exception(\"Debe introducir una venta v&aacute;lida.\");\n\t}", "public function testSetTvaFictivePrec() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePrec(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePrec());\n }", "public function testSetFacturationPaiePrec() {\n\n // Set a Date/time mock.\n $facturationPaiePrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationPaiePrec($facturationPaiePrec);\n $this->assertSame($facturationPaiePrec, $obj->getFacturationPaiePrec());\n }", "public function testSetTvaFictivePres() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePres(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePres());\n }", "public function setVat($value);", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public function __construct(array $venta)\r\n { $this->idVenta = $venta['IdVenta'];\r\n $this->total = $venta['Total'];\r\n $this->fechaCompra = $venta['FechaCompra'];\r\n $this->usuario = $venta['Usuario'];\r\n }", "function setFechaVisitaPoi($fechaVisitaPoi) {\n $this->fechaVisitaPoi = $fechaVisitaPoi;\n }", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new HistoPaieAnal();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "public function testSetParticipServPers() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipServPers(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipServPers());\n }", "public function testSetPLafondExo() {\n\n $obj = new Etablissements();\n\n $obj->setPLafondExo(10.092018);\n $this->assertEquals(10.092018, $obj->getPLafondExo());\n }", "public function testSetPourcent() {\n\n $obj = new HistoPaieAnal();\n\n $obj->setPourcent(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcent());\n }", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function testSetTvaFictive1() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive1(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive1());\n }", "public function created(Venta $venta)\n {\n $venta->costofinal=$venta->costoc-$venta->descuento;\n $venta->save();\n\n }", "public function testSetFacturationComptaPrec() {\n\n // Set a Date/time mock.\n $facturationComptaPrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationComptaPrec($facturationComptaPrec);\n $this->assertSame($facturationComptaPrec, $obj->getFacturationComptaPrec());\n }", "public function setDataVencimento($dtVencimento) {\n $this->dtVencimento = $dtVencimento;\n }", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new DecTva3519();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "public function testSetMontantTva() {\n\n $obj = new TempsPasses();\n\n $obj->setMontantTva(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantTva());\n }", "public function setFecha($n)\n {\n this->$v_fecha=$n;\n \n }", "public function NuevaVenta ( $fecha , $venta ) {\r\n\r\n\t\t$this->db->query ( \"INSERT INTO ventas \r\n\t\t\t\t\t\t\t( precio , fecha ) \r\n\t\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t\t\t('$venta', '$fecha')\" ) ;\r\n\t}", "public function setFechalecturaAttribute($valor){\n $this->attributes['fechalectura'] = strlen($valor)? Carbon::createFromFormat('d/m/Y', $valor) : null;\n }", "public function testSetTds137() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTds137(10.092018);\n $this->assertEquals(10.092018, $obj->getTds137());\n }", "public function testSetPourcentExo() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentExo(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentExo());\n }", "public function setVTipo($vTipo)\n{\n$this->vTipo = $vTipo;\n\nreturn $this;\n}", "public function testSetFacturationPaie() {\n\n // Set a Date/time mock.\n $facturationPaie = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationPaie($facturationPaie);\n $this->assertSame($facturationPaie, $obj->getFacturationPaie());\n }", "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "public function testSetServiceCpta() {\n\n $obj = new Clients();\n\n $obj->setServiceCpta(true);\n $this->assertEquals(true, $obj->getServiceCpta());\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function updated(Venta $venta)\n {\n $venta->costofinal=$venta->costoc-$venta->descuento;\n $venta->save();\n }", "public function setFecha($value){\n $this->fecha = $value;\n return true;\n}", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new DernPrepaPaie();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "public function setData($date){\n $this->inizio=$date;}", "private function set_event_data($pmv = ''){\n\t\t\tif(array_key_exists('EVO_props', $GLOBALS) ){\n\t\t\t\tglobal $EVO_props;\n\t\t\t\tif(isset($EVO_props[$this->event_id])){\n\t\t\t\t\t$this->pmv = $EVO_props[$this->event_id];\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\t$this->pmv = (!empty($pmv))? $pmv : get_post_custom($this->event_id);\n\t\t\t$GLOBALS['EVO_props'][$this->event_id] = $this->pmv;\n\t\t}", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "public function setValue($value) {\n\t\tif($value == NULL) {\n\t\t\t$this->date_start = NULL;\n\t\t\t$this->date_end = NULL;\n\t\t}\n\t\tif($value['start']) {\n\t\t\t$this->date_start = DateTime::from($value['start']);\n\t\t}\n\t\tif($value['end']) {\n\t\t\t$this->date_end = DateTime::from($value['end']);\n\t\t}\n\t}", "public function setValue($value)\n {\n if ( ! empty($value))\n {\n //prevedu na mysql date format - pokud je vstupni format netozeznan\n //tak vraci FALSE\n $formatted_value = DateFormat::getMysqlDateTime($value, $this->datetime_format);\n\n\n\n Kohana::$log->add(Kohana::INFO, 'datetime.setValue formatted_value: '.json_encode($formatted_value));\n\n //datum je ve spatnem formatu - ulozim si priznak, ze je spatna hodnota\n if ( ! $formatted_value)\n {\n $this->check = FALSE;\n\n //hodnota se nebude zapisovat do modelu - pokud by se zapsisovala\n //jako UNIX TIME, tak bych mohl ztrati puvodni hodnotu - protoze\n //vstupni format je nedefinovany\n return;\n }\n }\n else\n {\n $formatted_value = NULL;\n }\n\n //bazova metoda setValue zajisti zapis do modelu nebo do uloziste pro\n //virtualni formularove prvky\n parent::setValue($formatted_value);\n }", "protected function setValue($value)\r\n {\r\n \\Assert\\that($value)->isInstanceOf('\\DateTime');\r\n\r\n $this->value = clone $value;\r\n }", "private function setTaxaInscricao($codigopessoa, $codigoTurma){\r\n try{\r\n\r\n $this->dbo->setEntidade(\"dbprodutos\");\r\n $criteriaProduto = new TCriteria();\r\n $criteriaProduto->add(new TFilter('tabela','=',$codigoTurma));\r\n $criteriaProduto->add(new TFilter('ativo','=','1'));\r\n $retTaxaProd = $this->dbo->select(\"*\", $criteriaProduto);\r\n $taxaProd = $retTaxaProd->fetch(PDO::FETCH_ASSOC);\r\n\r\n $dadosTaxa['codigoproduto'] = $taxaProd['codigo'];\r\n $dadosTaxa['valortotal'] = $taxaProd['valor'];\r\n $dadosTaxa['valorcorrigido'] = $taxaProd['valor'];\r\n $dadosTaxa['valormensal'] = $taxaProd['valor'];\r\n //$dadosTaxa['tipomovimentacao'] = 'C';\r\n $dadosTaxa['plcoseq'] = $this->produto['codigoplanoconta'];\r\n $dadosTaxa['numparcelas'] = '1';\r\n $dadosTaxa['datainicio'] = $this->produto['datainicio'];\r\n $dadosTaxa['datavencimento'] = $this->produto['datainicio'];\r\n $dadosTaxa['efetivada'] = '1';\r\n $dadosTaxa['valordescontado'] = 0;\r\n $dadosTaxa['obs'] = \"Taxa de inscrição - Turma - \".$this->produto['nometurma'];\r\n $dadosTaxa['tabela'] = $codigoTurma;\r\n\r\n $codigoTransacTaxa = $this->setTransacao($codigopessoa, $dadosTaxa);\r\n\r\n return $codigoTransacTaxa;\r\n\r\n }catch(Exception $e){\r\n echo $e;\r\n }\r\n }", "public function testSetTauxTva1() {\n\n $obj = new DecTva3519();\n\n $obj->setTauxTva1(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxTva1());\n }", "public function setFechaCaducidadAttribute($value)\n {\n $this->attributes['FechaCaducidad'] = (new Carbon($value))->format('d-m-Y');\n }", "public function testSetPv1() {\n\n $obj = new TempsPasses();\n\n $obj->setPv1(10.092018);\n $this->assertEquals(10.092018, $obj->getPv1());\n }", "public function testSetTxEscompteVente() {\n\n $obj = new Clients();\n\n $obj->setTxEscompteVente(10.092018);\n $this->assertEquals(10.092018, $obj->getTxEscompteVente());\n }", "public function setPrecio($precio)\n {\n $this->precio = floatval($precio);\n\n return $this;\n }", "public function testSetTvaFictive3() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive3(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive3());\n }", "public function setDtFimOferta($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_fim_oferta !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_fim_oferta !== null && $tmpDt = new DateTime($this->dt_fim_oferta)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_fim_oferta = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_FIM_OFERTA;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "public function setDateTimeValue($field,$date);", "public function testSetTvaFictive4() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive4(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive4());\n }", "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function setObjetoEnInventario(ObjetoEnInventarioDTO &$objetoEnInventarioDTO){\r\n $objetoEnInventario = ObjetoEnInventarioDTO::toEntity($objetoEnInventarioDTO);\r\n $salonBean = new SalonBean($this->persistenceManager);\r\n $salon = new Salon();\r\n $computadoraBean = new ComputadoraBean($this->persistenceManager);\r\n $computadora = new Computadora();\r\n\r\n # Validamos los campos\r\n if(!$objetoEnInventario->isEntityValid()){\r\n throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 2);\r\n }\r\n\r\n # Si las entidades complejas relacionan un ID válido entonces se verifica que exista la entidad correspondiente\r\n if($objetoEnInventario->getInventarioSalon() !== null){\r\n $salon->setId($objetoEnInventario->getInventarioSalon());\r\n if(!$salonBean->getSalon($salon)){\r\n throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 0);\r\n }\r\n }\r\n\r\n if($objetoEnInventario->getComputadora() !== \"\"){\r\n $computadora->setId($objetoEnInventario->getComputadora());\r\n if(!$computadoraBean->getComputadora($computadora)){\r\n throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 1);\r\n }\r\n }\r\n\r\n # Almacenamos la entidad\r\n if(!$this->objetoEnInventarioBean->setObjetoEnInventario($objetoEnInventario)){\r\n throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_SET_FAIL, $this->ID + 3);\r\n }\r\n\r\n $objetoEnInventarioDTO->loadFromEntity($objetoEnInventario);\r\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function setDtFimOfertaCadastro($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_fim_oferta_cadastro !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_fim_oferta_cadastro !== null && $tmpDt = new DateTime($this->dt_fim_oferta_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_fim_oferta_cadastro = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_FIM_OFERTA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "function setDato($llave,$valor){\r\n $this->js_object_encode[$llave] = $valor;\r\n}", "public function setValue($value)\n {\n if ( ! empty($value))\n {\n //prevedu na mysql date format - pokud je vstupni format netozeznan\n //tak vraci FALSE\n $formatted_value = DateFormat::getMysqlDate($value);\n\n //datum je ve spatnem formatu - ulozim si priznak, ze je spatna hodnota\n if ($formatted_value === FALSE)\n {\n $this->check = FALSE;\n\n //hodnota se nebude zapisovat do modelu - pokud by se zapsisovala\n //jako UNIX TIME, tak bych mohl ztrati puvodni hodnotu - protoze\n //vstupni format je nedefinovany\n return;\n }\n }\n else\n {\n $formatted_value = NULL;\n }\n\n //bazova metoda setValue zajisti zapis do modelu nebo do uloziste pro\n //virtualni formularove prvky\n parent::setValue($formatted_value);\n }", "public function setDataCadastro($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->data_cadastro !== null || $dt !== null) {\n if ($this->data_cadastro === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->data_cadastro->format(\"Y-m-d H:i:s.u\")) {\n $this->data_cadastro = $dt === null ? null : clone $dt;\n $this->modifiedColumns[ProposicaoTableMap::COL_DATA_CADASTRO] = true;\n }\n } // if either are not null\n\n return $this;\n }", "public function testSetTvaFictive2() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive2(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive2());\n }", "public function testSetTds136() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTds136(10.092018);\n $this->assertEquals(10.092018, $obj->getTds136());\n }", "public function testSetPeriodeEmploiDeb() {\n\n // Set a Date/time mock.\n $periodeEmploiDeb = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationExtras();\n\n $obj->setPeriodeEmploiDeb($periodeEmploiDeb);\n $this->assertSame($periodeEmploiDeb, $obj->getPeriodeEmploiDeb());\n }", "public function testSetMontantSaisi() {\n\n $obj = new PointageReglementsTetes();\n\n $obj->setMontantSaisi(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantSaisi());\n }", "public function setValue($data) { $this->_value\t= $data; }", "public function testSetPeriodePointageCloturee() {\n\n // Set a Date/time mock.\n $periodePointageCloturee = new DateTime(\"2018-09-10\");\n\n $obj = new Employes();\n\n $obj->setPeriodePointageCloturee($periodePointageCloturee);\n $this->assertSame($periodePointageCloturee, $obj->getPeriodePointageCloturee());\n }", "private function setCep($cep)\n {\n //Attribute sanitizer and validation\n if (null != $cep || $cep <= 0) {\n $string = (string) $cep;\n $string = preg_replace('/[^0-9]/', '', $cep);\n $cep = (int) $string;\n }\n $this->cep = $cep;\n }", "public function testSetParticipPatronAvtgeMnt1() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipPatronAvtgeMnt1(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipPatronAvtgeMnt1());\n }", "function avaliacaoAvaliadorDTO() {\n\n}", "public function testSetDtPrepa() {\n\n // Set a Date/time mock.\n $dtPrepa = new DateTime(\"2018-09-10\");\n\n $obj = new DernPrepaPaie();\n\n $obj->setDtPrepa($dtPrepa);\n $this->assertSame($dtPrepa, $obj->getDtPrepa());\n }", "function set_Datos($pcDireccion,$pdFecha,$pcIp,$pcOperacion,$pcMotivo,$pcCampo,$pcTabla,$pcValorAnterior,$pcValorNuevo,$pcUsuario,$pcServicio)\n\t\t{\n\t\t\t$this->lcDireccion=$pcDireccion;\n\t\t\t$this->ldFecha=$pdFecha;\n\t\t\t$this->lcIp=$pcIp;\n\t\t\t$this->lcOperacion=$pcOperacion;\n\t\t\t$this->lcCampo=$pcCampo;\n\t\t\t$this->lcTabla=$pcTabla;\n\t\t\t$this->lcMotivo=$pcMotivo;\n\t\t\t$this->lcValorAnterior=$pcValorAnterior;\n\t\t\t$this->lcValorNuevo=$pcValorNuevo;\n\t\t\t$this->lcUsuario=$pcUsuario;\n\t\t\t$this->lcServicio=$pcServicio;\n\t\t}", "function asignar_valores(){\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->producto=$_POST['id'];\n\t}", "function setAuditoriaApoyo1_patentes($ptt){\n $this->ptt_rev_apoyo1 = $ptt;\n $this->apoyo1_total_patentes = $ptt;\n $this->save();\n }", "public function setFechaInicioAttribute($valor){\n $this->attributes['fecha_inicio'] = strlen($valor)? Carbon::createFromFormat('d/m/Y', $valor) : null;\n }", "public function testSetAutresOpe1() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpe1(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpe1());\n }", "Private function setPorta($porta){\n $this -> porta = $porta;\n }", "public function setData_venda($data_venda)\n {\n $this->data_venda = $data_venda;\n\n return $this;\n }", "public function testSetTds117() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTds117(10.092018);\n $this->assertEquals(10.092018, $obj->getTds117());\n }", "public function testSetTaxeSalaire() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTaxeSalaire(10.092018);\n $this->assertEquals(10.092018, $obj->getTaxeSalaire());\n }", "public function testSetCodeExoTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setCodeExoTrav(\"codeExoTrav\");\n $this->assertEquals(\"codeExoTrav\", $obj->getCodeExoTrav());\n }", "public function setDataAttribute($value) {\n $this->attributes['data'] = ( !empty($value) ? Carbon::createFromFormat(\"d/m/Y\", $value) : null );\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function getVenta() {\n return self::$venta;\n }", "public function testSetTds142() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTds142(10.092018);\n $this->assertEquals(10.092018, $obj->getTds142());\n }", "public function testSetNoDossCpta() {\n\n $obj = new iComptaDroits();\n\n $obj->setNoDossCpta(\"noDossCpta\");\n $this->assertEquals(\"noDossCpta\", $obj->getNoDossCpta());\n }", "function set_value($val){\n\t\tif(is_object($this->_calendar)){\n\t\t\t$calendar = $this->_calendar;\n\t\t\t$tablename = $this->avalanche->PREFIX() . \"strongcal_cal_\" . $calendar->getId() . \"_fields\";\n\t\t\t$my_id = $this->getId();\n\t \t$sql = \"UPDATE $tablename SET value = '$val' WHERE id = '$my_id'\";\n\t\t\t$result = $this->avalanche->mysql_query($sql);\n\t\t\tif($result){\n\t\t\t\t$this->_value = $val;\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->_value = $val;\n\t\t\treturn true;\n\t\t}\n\t}", "public function testSetPeriodeEmploiFin() {\n\n // Set a Date/time mock.\n $periodeEmploiFin = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationExtras();\n\n $obj->setPeriodeEmploiFin($periodeEmploiFin);\n $this->assertSame($periodeEmploiFin, $obj->getPeriodeEmploiFin());\n }", "public function testSetAutresOpe3() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpe3(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpe3());\n }", "public function setServiceTimeAttribute() {\n \t$services = [\n\t\t\t'Traditional Haircut' => 20,\n\t\t\t'Specialty Haircut' => 25,\n\t\t\t'Beard Edge-up' => 10,\n\t\t\t'Full Shave' => 15,\n\t\t\t'Haircut and Beard Edge-up' => 30,\n\t\t\t'Haircut and Full Shave' => 35\n\t\t];\n\n \t$this->attributes['service_time'] = (int)$services[$this->attributes['service']];\n\t }", "function asignar_obj_poa($poa_id){\n $data['dato_poa'] = $this->mpoa->dato_poa($poa_id,$this->gestion);\n //lista de pbjetivos estrategicos filtrado por poa_id\n $data['lista_obje']=$this->mpoa->get_list_objetivos_estrategicos($poa_id);\n $ruta = 'mantenimiento/vasignar_obje_poa';\n $this->construir_vista($ruta, $data);\n }", "public function testSetMontantSalTheo() {\n\n $obj = new AttestationAt();\n\n $obj->setMontantSalTheo(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantSalTheo());\n }", "abstract public function setValorTransacao($valor);", "public function setValor( $value ){\n\t\n\t\tarray_push( $this->valores_cliente , $value );\n\t\n\t}", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "public function setDtInicioOfertaCadastro($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_inicio_oferta_cadastro !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_inicio_oferta_cadastro !== null && $tmpDt = new DateTime($this->dt_inicio_oferta_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_inicio_oferta_cadastro = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_INICIO_OFERTA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setProvincia($p_provincia){\r\n\t$this->provincia=$p_provincia;\r\n}" ]
[ "0.6947106", "0.68948", "0.61609", "0.59344053", "0.56940794", "0.5616198", "0.5554823", "0.55523044", "0.5472596", "0.5427213", "0.5399607", "0.535821", "0.5349358", "0.53306174", "0.5311525", "0.529877", "0.5295405", "0.5286133", "0.5284703", "0.52628344", "0.52530247", "0.52496344", "0.52488047", "0.52447236", "0.5234157", "0.5199612", "0.519023", "0.51489085", "0.5131599", "0.51002264", "0.50817055", "0.5078847", "0.50775814", "0.50578314", "0.50494885", "0.5046035", "0.50446826", "0.5044184", "0.50402755", "0.50324965", "0.5030617", "0.50304097", "0.50060046", "0.50049806", "0.5003496", "0.49915507", "0.4991379", "0.49865338", "0.49859193", "0.49823922", "0.49779326", "0.49696553", "0.49636257", "0.49619636", "0.49489987", "0.49480376", "0.49446443", "0.4942217", "0.4942217", "0.4941418", "0.4933639", "0.4932062", "0.49318025", "0.49308383", "0.49296942", "0.49219584", "0.4909572", "0.49072564", "0.4898603", "0.48930627", "0.48924917", "0.4891951", "0.48906472", "0.4881414", "0.4881349", "0.4878714", "0.4876471", "0.48754442", "0.48748207", "0.48679036", "0.48625287", "0.4859879", "0.48460764", "0.4844297", "0.4844105", "0.4844105", "0.48432195", "0.48354924", "0.48326808", "0.4830867", "0.48302194", "0.48246634", "0.48213944", "0.48211282", "0.4820492", "0.4820411", "0.48200437", "0.4819562", "0.4818681", "0.48171115" ]
0.75657177
0
Get the value of descuento
Получить значение descuento
public function getDescuento() { return $this->descuento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescuento()\r\n {\r\n return $this->descuento;\r\n }", "protected function get_desca() {\n $value = $this->raw_get('desca');\n if ($value !== null) {\n $value = json_decode($value);\n }\n return $value;\n }", "public function getDesconto()\n {\n return $this->desconto;\n }", "public function getDescricao () {\n\t\treturn $this->descricao;\n\t}", "public function getDesc()\n {\n $value = $this->get(self::desc);\n return $value === null ? (string)$value : $value;\n }", "public function getDescricao()\n\t{\n\t\treturn $this->descricao;\n\t}", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "public function getDescricao()\n {\n return $this->descricao;\n }", "function getDescBreve () {\n \n \treturn $this -> inciDescBreve;\n \n }", "public function getDescricao() {\n return $this->descricao;\n }", "public function getDescricao() {\n return $this->descricao;\n }", "public function getDescripcio(){\n return $this->descripcio;\n }", "function getDescrizione() {\r\n return $this->descrizione;\r\n }", "public function getOedtdesc()\n {\n return $this->oedtdesc;\n }", "public function getDescricao () {\n\t\treturn $this->gu_descricao;\n\t}", "public function getDesc()\n {\n return $this->desc;\n }", "public function getDesc()\n {\n return $this->desc;\n }", "public function getDesc()\n {\n return $this->desc;\n }", "public function getDesc()\n {\n return $this->desc;\n }", "public function getDesc()\r\n {\r\n return $this->desc;\r\n }", "public function getDesc()\n\t{\n\t\treturn $this->desc;\n\t}", "public function getDescrizione()\n {\n return $this->descrizione;\n }", "public function getDescrizione()\n {\n return $this->descrizione;\n }", "public function getDescricao() {\n \n return $this->sDescricao;\n }", "public function getDesc()\r\n {\r\n return $this->desc;\r\n }", "public function getDescricao() {\n\t\treturn $this->sDescricao;\n\t}", "public function getDescripcion(){\n\t\treturn $this->descripcion;\n\t}", "function getDesc() {\n\t\treturn $this->_Desc;\n\t}", "public function getDescricao()\n {\n }", "function getDesc_teleco()\n {\n if (!isset($this->sdesc_teleco) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sdesc_teleco;\n }", "function getDescricaoConsumo() {\n return $this->descricaoConsumo;\n }", "public function getDescripcionProducto(){\n return $this->descripcionProducto;\n }", "function get_descripcion()\n\t{\n\t\treturn $this->descripcion;\n\t}", "function get_anex_desc(){\n\treturn $this->anex_desc;\n}", "function getDescripcion() {\n return $this->descripcion;\n }", "public function getDescripcion()\n\t{\n\t\treturn $this->descripcion;\n\t}", "public function getComunicazioneDesc()\n {\n return $this->comunicazione_desc;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "function getDescLarga () {\n \treturn $this -> inciDescLarga;\n }", "public function getListaDesc()\n {\n return $this->lista_desc;\n }", "function getDescripcion() {\n return $this->descripcion;\n }", "public function getDescripcion(){\n return $this->descripcion;\n }", "public function getDescripcion(){\n return $this->descripcion;\n }", "public function getDescripcion()\r\n {\r\n return $this->descripcion;\r\n }", "public function getDescripcion()\r\n {\r\n return $this->descripcion;\r\n }", "public function getOedtdesc2()\n {\n return $this->oedtdesc2;\n }", "public function getDesc()\n {\n return $this->description;\n }", "function desc(): string { return $this->desc; }", "public function getDescripcion()\n {\n return $this->descripcion;\n }", "public function getValorDescontado () {\n return $this->fValorDescontado;\n }", "public function getFechtoDescricao()\n {\n return $this->fechtoDescricao;\n }", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function getDescricaoRua() {\n\n return $this->db74_descricao;\n }", "public function getDescription()\n {\n return $this->desc;\n }", "public function getDescription() \t{ return $this->details['description']; }", "public function getDescription()\n {\n return @$this['description'];\n }", "public function getDescription() \n {\n return $this->_fields['Description']['FieldValue'];\n }", "public function get_description(){\n\t\treturn $this->v_description;\n\t}", "public function getDescripcionOperacion() {\n\t\treturn $this->strOperacion_Descripcion;\n\t}", "public function getDescription(){\n\t\treturn $this->description;\n\t}", "function descontarEnLote($descuento){\n\n\t\t$post['_post_lote_descontar'] = $descuento;\n\t\tlog_message('DEBUG','#TRAZA|TRAZ-COMP-ALMACEN|MOVIMIENTODEPOSITOSSAL descontarEnLote($descuento) $post >> '.json_encode($post));\n\t\t$aux = $this->rest->callAPI(\"POST\",REST_ALM.\"/lote/descontar\", $post);\n\t\t$aux =json_decode($aux[\"data\"]);\n\t\treturn $aux->UpdatedRowCount->Value;\n\t}", "function descuento($price, $descuento) {\n $precioReal = \"\";\n $descuentoReal = ($price * $descuento) / 100;\n $precioReal = $price - $descuentoReal;\n return $precioReal;\n }", "public function getDescription()\n {\n return (string)$this->d;\n }", "function getDesc_fase()\n {\n if (!isset($this->sdesc_fase) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sdesc_fase;\n }", "public function getDescripction():string;", "protected function _getDetail()\n {\n return $this->_value - intval($this->_value);\n }", "function get_descr()\n\t{\n\t\treturn $this->descr;\n\t}", "public function getDescription()\r\n {\r\n return $this->getAttr('Description');\r\n }", "public function getValorDepreciado();", "public function getDescontinuado()\n {\n return $this->descontinuado;\n }", "public function getDescription() {\n return $this->data->description;\n }", "public function getDescription()\n {\n \treturn $this->description;\n }", "public function getDescription() {\n return $this->_data['description'];\n }", "public function getDescription() {\n return $this->_data['description'];\n }", "function getTexto() {\n return $this->texto;\n }", "public function getDescription()\n\t{\n\t\treturn $this->get('description');\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->get('description');\n\t}", "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}" ]
[ "0.81474423", "0.7539949", "0.74822", "0.7223202", "0.7182353", "0.71252584", "0.7122015", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.71201855", "0.7109999", "0.7048765", "0.7048765", "0.7028847", "0.7005727", "0.6992452", "0.6989719", "0.697633", "0.697633", "0.697633", "0.697633", "0.69656515", "0.69531065", "0.69100106", "0.69100106", "0.68953836", "0.6892358", "0.68796057", "0.68635094", "0.6859299", "0.6853045", "0.68139565", "0.67625016", "0.6736003", "0.67262536", "0.6725824", "0.6695758", "0.66844195", "0.6675167", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6670328", "0.6666332", "0.6664611", "0.66585195", "0.6652564", "0.6652564", "0.66463137", "0.66463137", "0.66210335", "0.6619913", "0.6595912", "0.65682924", "0.6526949", "0.65138894", "0.6474099", "0.6474099", "0.6474099", "0.64739937", "0.6466225", "0.6455926", "0.6455754", "0.6420042", "0.6412566", "0.64109224", "0.6395357", "0.6388603", "0.63882077", "0.63784695", "0.63771534", "0.63740396", "0.63629115", "0.6361627", "0.6357954", "0.63520825", "0.6347624", "0.63296694", "0.6324556", "0.6319937", "0.6319937", "0.63118666", "0.63038397", "0.63038397", "0.62968874" ]
0.8058454
1
Get the value of iva
Получить значение iva
public function getIva() { return $this->iva; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getIV() { \n return $this->iv;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIV()\n\t{\n\t\tif (!isset($this->iv)) $this->loadConfig();\n\t\treturn $this->iv;\n\t}", "public function getVal();", "public function getValue(): Iota\n {\n return $this->value;\n }", "public function getVak()\n {\n return $this->vak;\n }", "public function getV() {\n $kv = $this->getKV();\n return $kv[1];\n }", "function iva($importe,$iva)\n\t{\n\t\t$total = round($importe + ($importe * $iva)/100,2);\n\t\treturn $total;\n\t}", "public function getIv()\n {\n $value = $this->get(self::iv);\n return $value === null ? (string)$value : $value;\n }", "public function getIV() {\r\n return ipworksencrypt_rc4_get($this->handle, 4 );\r\n }", "public function getIv()\n {\n return $this->iv;\n }", "public function getVat();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getPayPalBasketVatValue()\n {\n }", "function get_value()\n {\n\t\t$appx = new app();\n return $appx->unserialize64($_SESSION['form_value']);\n }", "public function getIva($id) {\n $query = $this->db->query(\"SELECT iva \"\n . \"FROM camiseta \"\n . \"WHERE idcamiseta = $id; \");\n\n return $query->row_array();\n }", "public function getVoto()\n {\n return $this->voto;\n }", "public function getAVSResult() {\n\t\tif ( is_null( $this->getData_Unstaged_Escaped( 'avs_result' ) ) ) {\n\t\t\treturn null;\n\t\t}\n\t\t// Best guess here:\n\t\t// Scale of 0 - 100, of Problem we think this result is likely to cause.\n\n\t\t$avs_map = $this->getGlobal( 'AvsMap' );\n\n\t\t$result = $avs_map[$this->getData_Unstaged_Escaped( 'avs_result' )];\n\t\treturn $result;\n\t}", "public function value();", "public function value();", "public function value();", "public function value();", "public function value();", "public function getVector()\n {\n return $this->_encryption['vector'];\n }", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "public function getVoti()\n {\n return $this->voti;\n }", "public static function getIV()\n {\n return Encryption::$iv;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "function getThreeDSecureIAV() {\n\t\treturn $this->m_3DSecureIAV;\n\t}", "public function getCurrentVal() {}", "function getEncIVName()\n {\n return $this->_db['tb_iv_col'];\n }", "public function getAbv()\n {\n return $this->abv;\n }", "public function getTotalIGV()\n\t{\n\t\treturn $this->getCIF() * ($this->IGV / 100);\n\t}", "function getValue();", "function getValue();", "public function getVat()\n {\n return $this->vat;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function get_vat_base_value_signed() {\n\t\treturn $this->vat_base_value_signed;\n\t}", "public function getUserValue();", "public function getCVV(): ?int;", "private static function _iv() {\n return mcrypt_create_iv(mcrypt_get_iv_size(self::TYPE, self::MODE), MCRYPT_DEV_URANDOM);\n }", "function getV0();", "public function value() {}", "public function value() {}", "public function value() {}", "public function value() {}", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "abstract public function value();", "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getValue(): int;", "public function getValue(): int;", "public function getAcValue() {\r\n\t\treturn $this->_acValue;\r\n\t}", "public static function getAIDOversion(){\n return self::$aido_version;\n }", "public function getVatAmount();", "abstract public function getValue();", "public function get_value_signed() {\n\t\treturn $this->value_signed;\n\t}" ]
[ "0.69976765", "0.681249", "0.681249", "0.6721419", "0.64898", "0.64570874", "0.6375796", "0.6339288", "0.6339155", "0.6230242", "0.62078345", "0.6188156", "0.6044466", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.60162205", "0.59897214", "0.5989084", "0.59415406", "0.59380937", "0.5898709", "0.5892855", "0.5892855", "0.5892855", "0.5892855", "0.5892855", "0.5885637", "0.58813876", "0.5868966", "0.58315617", "0.57878906", "0.57878906", "0.57878906", "0.57878906", "0.57878906", "0.57677394", "0.57455343", "0.5743653", "0.5730477", "0.571824", "0.5717406", "0.57118595", "0.57118595", "0.5709919", "0.5693967", "0.5682792", "0.5677317", "0.5668052", "0.566522", "0.56540287", "0.5640273", "0.5640273", "0.5640273", "0.5640273", "0.56394506", "0.5619001", "0.56168044", "0.560792", "0.560792", "0.5606377", "0.5606377", "0.5598405", "0.55889684", "0.55870384", "0.5582123", "0.5582015" ]
0.7492585
0
Get the value of iva_gravado
Получить значение iva_gravado
public function getIva_gravado() { return $this->iva_gravado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGravado()\n {\n return $this->gravado;\n }", "public function getIva()\n {\n return $this->iva;\n }", "public function setIva_gravado($iva_gravado)\n {\n $this->iva_gravado = $iva_gravado;\n return $this;\n }", "public function getVoto()\n {\n return $this->voto;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getGiro()\n {\n return $this->giro;\n }", "public function getTotalIGV()\n\t{\n\t\treturn $this->getCIF() * ($this->IGV / 100);\n\t}", "public function getValor() {\n return $this->valor;\n }", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function getGlv()\n {\n return $this->_glv;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function getVal();", "public function getNivel_vigilancia(){\n return $this->nivel_vigilancia;\n }", "public function getGravity () {}", "public function getGravity () {}", "public function getGasRate()\n {\n return $this->gas_rate;\n }", "public function getGouhao()\n {\n return $this->gouhao;\n }", "public function getVoti()\n {\n return $this->voti;\n }", "public function get()\n {\n return $this->gif;\n }", "public function getGaleria()\n {\n return $this->galeria;\n }", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function getVat();", "public function getPawnValue();", "public function getImageGamma () {}", "protected function _getFaceValue() {\n\t\treturn Deck::getFaceValue($this->_faceValue);\n\t}", "function lcg_value()\n{\n return 0.0;\n}", "public function getGas()\n {\n return $this->gas;\n }", "public function getGas()\n {\n return $this->gas;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getGsetValue()\n {\n return $this->gset_value;\n }", "public function getValorDepreciado();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValorVenda()\n {\n return $this->valorVenda;\n }", "public function getPv()\n {\n return $this->pv;\n }", "public function getVelocidad()\n {\n return $this->velocidad;\n }", "public function getAvril()\n {\n return $this->avril;\n }", "public function getVat(): ?float;", "public function value();", "public function value();", "public function value();", "public function value();", "public function value();", "function setiva_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT iva FROM tbl_inventario WHERE cod_producto=$cod;\"; \r\n\t $result = @mysql_query($query);\r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t\t$iva=$row['iva'];\r\n\t return $iva;\r\n\t }\r\n }\r\n }", "public function getValorLiquidado() {\n return $this->nValorLiquidado;\n }", "public function getRgba() {}", "public function set_imagenG($valor){\n $this->ImagenG = \"01\".trim($valor);\n }", "public function getImaginary(): float;", "public function getGreen()\n {\n return $this->g;\n }", "public function getGold()\n {\n return $this->getProperty('gold', 'int');\n }", "function iva($importe,$iva)\n\t{\n\t\t$total = round($importe + ($importe * $iva)/100,2);\n\t\treturn $total;\n\t}" ]
[ "0.71049577", "0.659648", "0.65954137", "0.595122", "0.5947607", "0.59252864", "0.59252864", "0.59252864", "0.59252864", "0.59252864", "0.59198177", "0.5883065", "0.58331877", "0.5804077", "0.5743008", "0.5736506", "0.5736506", "0.5661837", "0.5656705", "0.5641459", "0.5575702", "0.5563728", "0.5563728", "0.55444646", "0.5522176", "0.5489497", "0.548662", "0.5484505", "0.54332346", "0.54316896", "0.5430904", "0.5429013", "0.53979594", "0.539792", "0.5396047", "0.5396047", "0.5394298", "0.5394298", "0.5394298", "0.5394298", "0.5394298", "0.5394298", "0.5394298", "0.5382621", "0.53703225", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53654337", "0.53553456", "0.5351929", "0.5348183", "0.533816", "0.533418", "0.532859", "0.532859", "0.532859", "0.532859", "0.532859", "0.5302205", "0.52975255", "0.52861255", "0.5284734", "0.52689135", "0.5268839", "0.526686", "0.5261323" ]
0.85525626
0
Set the value of iva_gravado
Задайте значение iva_gravado
public function setIva_gravado($iva_gravado) { $this->iva_gravado = $iva_gravado; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIva_gravado()\n {\n return $this->iva_gravado;\n }", "public function set_imagenG($valor){\n $this->ImagenG = \"01\".trim($valor);\n }", "public function setGravado($gravado)\n {\n $this->gravado = $gravado;\n\n return $this;\n }", "public function getGravado()\n {\n return $this->gravado;\n }", "public function setVat($value);", "public function setVisina($v){\n if($v<0){\n $this->visina=0;\n }elseif($v>250){\n $this->visina=250;\n }else{\n $this->visina=$v;\n }\n }", "function setGradRate($value)\n {\n $this->grad_rate = $value;\n }", "public function setImg($v=''){\n\t\t\t$this->img=$v;\n\t\t}", "public function setImageGamma ($gamma) {}", "public function setValorAprovacao($mValorAprovacao) {\n $this->mValorAprovacao = $mValorAprovacao;\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function setVoti(float $voto){\n if($voto>2 && $voto <= 10 ){\n \n $this->voti[] = $voto;\n \n } else {\n\n $messaggio = new Exception(\"Il valore $voto è errato\");\n throw $messaggio;\n }\n }", "public function setValorGlosa($valorGlosa)\n {\n $this->valorGlosa = $valorGlosa;\n return $this;\n }", "function set_viene($pos,$tam=0,$alinea=\"\",$borde=0,$fillColor=0,$tfuen,$estilo=\"\",$valor=0){\n\n\t\t$this->viene[]=array('pos'=>$pos,\n\t\t\t\t\t\t\t\t\"ancho\"=>$tam,'alinea'=>$alinea,'tfuente'=>$tfuen,\n\t\t\t\t\t\t\t\t'estilo'=>$estilo,'borde'=>$borde,'relleno'=>$fillColor,\n\t\t\t\t\t\t\t\t'valor'=>$valor);\n\t}", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "function letak($gambar){\n $this->Image($gambar,10,10,20,25);\n //menggeser posisi sekarang\n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function mutate()\r\n\t\t{\r\n\t\t\t$this->value = $this->value * lcg_randf(0.5,2.0);\r\n\t\t\tif ($this->value < FloatGene::$zeroLimit && $this->value > 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = FloatGene::$zeroLimit;\r\n\t\t\t} \r\n\t\t\tif ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0)\r\n\t\t\t{\r\n\t\t\t\t$this->value = - FloatGene::$zeroLimit;\r\n\t\t\t}\r\n\t\t\t// this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n\t\t\tassert($this->value != 0.0);\r\n\t\t}", "function Moto(){\n\t\t\t$this->color = \"negro\";\n\t\t\t$this->ruedas = 2;\n\t\t\t$this->motor = 120;\n\t\t}", "public function setNivel_vigilancia($nivel_vigilancia){\n $this->nivel_vigilancia = $nivel_vigilancia;\n }", "public function setStatusInvCap($idEgr) {\n\t\t\t$Conexion = new dataBaseConn();\n\t\t\t$queryUp = $Conexion -> prepare(\"UPDATE egresos\n SET status_factura = 'Capturada'\n WHERE idegresos = :IdEg;\");\n\t\t\t$queryUp -> bindParam(':IdEg', $idEgr);\n\t\t\t$queryUp -> execute();\n\t\t}", "function letak($gambar){\n $this->Image($gambar,18,10,25,25);\n //menggeser posisi sekarang\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function setDataFim($valor){\n\t\t\t$this->dataFim = $valor;\n\t\t}", "abstract public function setValorTransacao($valor);", "public function setDadosAnexoV(AnexoVRGF $oAnexo) {\n\n $this->oAnexoV = $oAnexo;\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setIva($iva)\n {\n $this->iva = $iva;\n return $this;\n }", "public function mutate() {\r\n $this->value = $this->value * PCommon::linear_randomf(0.5, 2.0);\r\n if ($this->value < FloatGene::$zeroLimit && $this->value > 0.0) {\r\n $this->value = FloatGene::$zeroLimit;\r\n }\r\n if ($this->value > - FloatGene::$zeroLimit && $this->value < 0.0) {\r\n $this->value = - FloatGene::$zeroLimit;\r\n }\r\n // this should not happen, but could if zeroLimit is chosen to low, yell about it!\r\n assert($this->value != 0.0);\r\n }", "public function setGiro($giro)\n {\n $this->giro = $giro;\n\n return $this;\n }", "function grado($mode, $vgr) \n\t{\n\t\tif($mode==1) \n\t\t{\n\t\t\t$this->grado_up = $vgr;\n\t\t\t$rgr = $vgr;\n\t\t}elseif($mode==0) \n\t\t{\n\t\t\t$rgr = $this->grado_up;\n\t\t}\n\t\treturn $rgr;\n\t}", "public function set_valor($id, $valor);", "public function setVida($nuevo){\n $this->vida=$nuevo;\n }", "private function setValor($valor) {\n $this->valor = (float) str_replace(',', '.', $valor);\n }", "public function getIva()\n {\n return $this->iva;\n }", "function setAvgIncome($value)\n {\n $this->avg_income = $value;\n }", "public function setIm($im) {\n $this->im = $im;\n }", "function setAim($aim)\n\t{\n\t\tif($this->aim != $aim)\n\t\t{\n\t\t\t$this->_modified = true;\n\t\t\t$this->aim = $aim;\n\t\t}\n\t}", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "public function setBrightness($value=0)\n {\n $this->uploader->image_brightness = $value;\n }", "function setiva_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT iva FROM tbl_inventario WHERE cod_producto=$cod;\"; \r\n\t $result = @mysql_query($query);\r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t\t$iva=$row['iva'];\r\n\t return $iva;\r\n\t }\r\n }\r\n }", "public function setIvr($data)\n {\n\n if ($this->_ivr != $data) {\n $this->_logChange('ivr');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_ivr = $data;\n } else if (!is_null($data)) {\n if (!in_array($data, $this->_ivrAcceptedValues) && !empty($data)) {\n throw new \\InvalidArgumentException(_('Invalid value for ivr'));\n }\n $this->_ivr = (string) $data;\n } else {\n $this->_ivr = $data;\n }\n return $this;\n }", "public function setAtivo( $lAtivo ) {\n\t\t$this->lAtivo = $lAtivo;\n\t}", "public function setBarista() {\n $config = $this->configFactory->get('draco_coffee.settings');\n $candidates = $this->entityTypeManager->getStorage('user')\n ->getQuery()\n ->condition('status', 1)\n ->condition('roles', $config->get('role'))\n ->execute();\n $victim = $candidates[array_rand($candidates)];\n $this->state->set('draco_coffee.barista', $victim);\n }", "public function setAmaterno(string $amaterno): void\n {\n $this->amaterno = $amaterno;\n }", "public function setCaminho($caminho);", "public function setGross($value)\n {\n return $this->set(self::GROSS, $value);\n }", "public function setBeerAbv(float $newBeerAbv): void {\n\t\t//Verify the abv is between 0 - 100% ABV\n\t\tif($newBeerAbv < 0 || $newBeerAbv > 100) {\n\t\t\tthrow (new\\RangeException(\"beer abv is out of appropriate range\"));\n\t\t}\n\n\t\t//store new beer abv\n\t\t$this->beerAbv = $newBeerAbv;\n\n\t}", "public function encerraVVG() {\n\n\t\t$query = \"\n\t\t\t\tupdate tb_vncl_vlnt_grp\n\t\t\t\tset cd_est_vncl = 2,\n\t\t\t\t\t dt_fim_vncl = now()\n\t\t\t\twhere cd_vlntID = :cd_vlnt\n\t\t\t\tand cd_grpID = :cd_grp\n\t\t\t\tand seql_vnclID = :seql_vncl\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':cd_vlnt', $this->__get('codVoluntario'));\n\t\t$stmt->bindValue(':cd_grp', $this->__get('codGrupo'));\n\t\t$stmt->bindValue(':seql_vncl', $this->__get('sequencial'));\n\t\t$stmt->execute();\n\t\t\n\t\treturn $this;\t\n\n\t}", "public function setincentive($txt=\"\", $key=\"\") {\r\n\r\n if ($key == \"\") {\r\n $key = $this->key;\r\n }\r\n\r\n $data = array(\r\n \"act\" => \"setincentive\",\r\n \"txt\" => $txt,\r\n \"key\" => $key\r\n );\r\n\r\n self::call($data);\r\n\r\n return $this->res;\r\n }", "public function set_imagenC($valor){\n $this->ImagenC = \"02\".trim($valor);\n }", "public function testSetGratuit() {\n\n $obj = new VmpMouvements();\n\n $obj->setGratuit(true);\n $this->assertEquals(true, $obj->getGratuit());\n }", "public function _setAltura($altura)\n {\n $this->altura = $altura;\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "function actualiza_GrupoInvestigacion_determinado($gi_id, $gi_nombre, $gi_sigla)\n\t\t{\n\t\t\t$this->sql=\"UPDATE grupo_investigacion SET gi_nombre='$gi_nombre', gi_sigla='$gi_sigla' where gi_id=$gi_id\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "public function __set($name, $value) {\n\t\t$this->gearman->$name = $value;\n\t}", "public function ligar(){\r\n\t\t$this->setLigado(true);\r\n\t}", "public function testSetGravatar()\n {\n $this->user->setGravatar();\n\n $this->assertNotEquals($this->user->img, null);\n }", "public function setValor( $value ){\n\t\n\t\tarray_push( $this->valores_cliente , $value );\n\t\n\t}", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "public function setGazetteer($value)\n {\n return $this->set('Gazetteer', $value);\n }", "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "public function setAltura($altura)\n {\n $this->comprobarNegativo($altura,$this->altura);\n }", "public function aprova()\n {\n $this -> estadoAtual -> aprova($this);\n }", "public function setRgAttribute($value)\n {\n $this->attributes['rg'] = preg_replace( '/[^0-9]*/', '', $value);\n }", "public function setBargeInAllowed(?bool $value): void {\n $this->getBackingStore()->set('bargeInAllowed', $value);\n }", "public function setAltura($data)\n {\n\n if ($this->_altura != $data) {\n $this->_logChange('altura');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_altura = $data;\n } else if (!is_null($data)) {\n $this->_altura = (float) $data;\n } else {\n $this->_altura = $data;\n }\n return $this;\n }", "public function Ativando($frota){\n \n $sql =\" UPDATE pg_nossafrota set ativo =1 WHERE id =\".$frota->id;\n \n // Instancia a classe do BD.\n $conex = new Mysql_db();\n \n // Chama o metodo para conectar no BD, e guarda o retorno da conexão na variavel $PDO_conex.\n $POD_conex = $conex->Conectar();\n \n // Executa o Script no BD.\n if($POD_conex->query($sql)){\n header('location:index.php');\n \n // Fecha a conexão com o BD.\n $conex->Desconectar();\n }else{\n echo($sql);\n echo(\"Erro ao Desativar no banco de dados.\");\n }\n \n }", "public function setGamer(\\PB_Gamer $value=null)\n {\n return $this->set(self::GAMER, $value);\n }", "function border_gambar($gambar){\n $this->Image($gambar,18,10,25,25);\n //menggeser posisi sekarang\n }", "public function taskUpdategrav()\n {\n if (!$this->authorizeTask('install grav', ['admin.super'])) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK')\n ];\n\n return false;\n }\n\n $gpm = Gpm::GPM();\n $version = $gpm->grav->getVersion();\n $result = Gpm::selfupgrade();\n\n if ($result) {\n $json_response = [\n 'status' => 'success',\n 'type' => 'updategrav',\n 'version' => $version,\n 'message' => $this->admin::translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . $version\n ];\n } else {\n $json_response = [\n 'status' => 'error',\n 'type' => 'updategrav',\n 'version' => GRAV_VERSION,\n 'message' => $this->admin::translate('PLUGIN_ADMIN.GRAV_UPDATE_FAILED') . ' <br>' . Installer::lastErrorMsg()\n ];\n }\n\n $this->sendJsonResponse($json_response);\n }", "public function set_allow_gif ($allow_gif) {\n $this->allow_gif = $allow_gif;\n }", "public function setAnimation($value);", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function setIv($value)\n {\n return $this->set(self::iv, $value);\n }", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "public function arctangente(){\n $this->pantalla = atan((float)$this->pantalla);\n //Devuelve el valor en radianes\n }", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function setIdGrupo ($ug_gu_id) {\n\t\t$this->ug_gu_id = $ug_gu_id;\n\t}", "public function setLogoAttribute($value)\n {\n $uplPath = 'public/logo';\n \n # Get the count row in settings table\n $count = $this->all()->count();\n \n if ($count > 0) {\n # Get the last order in the table\n $settings = $this->orderBy('id', 'desc')->first();\n \n $oldImage = $settings->logo;\n # Update remove the old image and put instead of it the new image\n $logo = SamirzImage::uploadImage($value, $uplPath, true, $oldImage);\n \n } else {\n # Upload the image to the selected path\n $logo = SamirzImage::uploadImage($value, $uplPath);\n }\n \n # Put the retuened path on the logo attribute\n $this->attributes['logo'] = $logo ?? NULL;\n }", "public function setAnchura($data)\n {\n\n if ($this->_anchura != $data) {\n $this->_logChange('anchura');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_anchura = $data;\n } else if (!is_null($data)) {\n $this->_anchura = (float) $data;\n } else {\n $this->_anchura = $data;\n }\n return $this;\n }", "private function setValues()\n {\n $colour = -1;\n\t\t\n\t\t$CAVOKPart = $this->regEx($this->EXP_CAVOK, false);\n\t\tif ($CAVOKPart)\n\t\t{\n\t\t\t$this->colourState=\"BLU\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$cloudPart = $this->regEx($this->EXP_CLOUDS, false);\n if ($cloudPart != null)\n {\n $this->cloudAltitude = substr($cloudPart, 3,3) * 100;\n\t\t\t\n\t\t\tif($this->cloudAltitude<200)\n\t\t\t{\n\t\t\t\t$colourCld=0;\n\t\t\t}\n\t\t\telse if ($this->cloudAltitude<300)\n\t\t\t{\n\t\t\t\t$colourCld=1;\n\t\t\t}\n\t\t\telse if ($this->cloudAltitude<700)\n\t\t\t{\n\t\t\t\t$colourCld=2;\n\t\t\t}\n\t\t\telse if ($this->cloudAltitude<1500)\n\t\t\t{\n\t\t\t\t$colourCld=3;\n\t\t\t}\n\t\t\telse if ($this->cloudAltitude<2500)\n\t\t\t{\n\t\t\t\t$colourCld=4;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$colourCld=5;\n\t\t\t}\n }\n\t\telse\n\t\t{\n\t\t\t$colourCld=5;\n\t\t}\n\t\t\n //----- Visibility\n $visibilityPart = $this->regEx($this->EXP_VISIBILITY, false) ;\n if ($visibilityPart != null)\n {\n $value = (substr($visibilityPart, 0, 4) * 1);\n if (strpos($visibilityPart, \"SM\") !== false)\n { // statute miles\n $this->visibilityMeters = round($value * 1609.344, 0);\n }\n else\n { // meters\n $this->visibilityMeters = $value;\n }\n\t\t\t\n\t\t\tif($this->visibilityMeters<800)\n\t\t\t{\n\t\t\t\t$colourVis=0;\n\t\t\t}\n\t\t\telse if ($this->visibilityMeters<1600)\n\t\t\t{\n\t\t\t\t$colourVis=1;\n\t\t\t}\n\t\t\telse if ($this->visibilityMeters<3700)\n\t\t\t{\n\t\t\t\t$colourVis=2;\n\t\t\t}\n\t\t\telse if ($this->visibilityMeters<5000)\n\t\t\t{\n\t\t\t\t$colourVis=3;\n\t\t\t}\n\t\t\telse if ($this->visibilityMeters<8000)\n\t\t\t{\n\t\t\t\t$colourVis=4;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$colourVis=5;\n\t\t\t}\n }\n\t\telse\n\t\t{\n\t\t\t$colourVis=-1;\n\t\t}\n\t\t\n\t\t$colour=min($colourVis, $colourCld);\n\t\t\n\t\tif($colour==0)\n\t\t{\n\t\t\t$this->colourState=\"RED\";\n\t\t}\n\t\telse if($colour==1)\n\t\t{\n\t\t\t$this->colourState=\"AMB\";\n\t\t}\n\t\telse if($colour==2)\n\t\t{\n\t\t\t$this->colourState=\"YLO\";\n\t\t}\n\t\telse if($colour==3)\n\t\t{\n\t\t\t$this->colourState=\"GRN\";\n\t\t}\n\t\telse if($colour==4)\n\t\t{\n\t\t\t$this->colourState=\"WHT\";\n\t\t}\n\t\telse if($colour==5)\n\t\t{\n\t\t\t$this->colourState=\"BLU\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->colourState=\"NIL\";\n\t\t}\n }", "public function setGuerrier($IDG)\n {\n $req = \"SELECT * FROM Guerrier WHERE ID=$IDG\";\n $result = $this->_BDD->query($req);\n $Info = $result->fetch();\n\n\n $this->setPersobyID($Info['IDPerso']);\n\n\n $this->_brut = $Info['Brut'];\n\n }", "public function alterarValor(ValoresVendas $valoresVenda) {\n\t\n\t\t$sql = \"UPDATE valores_venda SET valor_venda='\" . $valoresVenda->valor_venda . \"'\n\t\t\t\tWHERE codigo_venda = '\" . $valoresVenda->codigo_venda . \"'\";\n\t\n\t\t$conn = new Conexao ();\n\t\t$conn->openConnect ();\n\t\n\t\tmysqli_select_db ( $conn->getCon (), $conn->getBD());\n\t\t$resultado = mysqli_query ( $conn->getCon (), $sql );\n\t\n\t\t$conn->closeConnect ();\n\n\t}", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "function set($name,$value) {\n $this->properties[$name] = $value;\n $props = serialize($this->properties);\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instances` set `properties`=? where `instance_id`=?\";\n $this->mDb->query($query,array($props,$this->instance_id));\n }", "public function vaga ($vaga_id = NULL) {\r\n\t\t$this->load->model(\"Republica_model\", \"republica\");\r\n\r\n\t\t$data['vaga'] = $this->vaga->read($vaga_id);\r\n\t\t$data['fotos'] = $this->vaga->buscaFotos($vaga_id);\r\n\t\t$data['republica'] = $this->republica->read($data['vaga']->IDRepublica);\r\n\t\t$data['title'] = \"Vaga da \".$data['republica']->NomeRepublica;\r\n\r\n\t\t$this->load->view('vaga', $data);\r\n\t}", "public function setAltura($altura)\n {\n $this->altura = $altura;\n }", "function __construct(){\n $this->ruedas = 4; //El estado inicial es 4 ruedas.\n $this->color = \"\"; //El estado inicial esta sin definir.\n $this->motor = 1600; //El estado inicial son 1600.\n\n\n }" ]
[ "0.7096397", "0.62547636", "0.59609437", "0.583422", "0.57010096", "0.56581736", "0.5364794", "0.5359305", "0.53112817", "0.53015953", "0.5232883", "0.5197791", "0.5181197", "0.51788497", "0.5163243", "0.5121943", "0.51209575", "0.51065564", "0.507176", "0.5057749", "0.50567436", "0.5045284", "0.50424737", "0.501234", "0.5011236", "0.4986531", "0.49814615", "0.49492276", "0.49404132", "0.48844594", "0.48722205", "0.48718587", "0.48577324", "0.48402852", "0.4835526", "0.48193336", "0.47979465", "0.47720495", "0.47628552", "0.4754671", "0.4746204", "0.4745201", "0.4739661", "0.47346815", "0.4729481", "0.47209844", "0.4717711", "0.47030416", "0.4690805", "0.4684342", "0.46684587", "0.46680954", "0.4640813", "0.46345502", "0.46345502", "0.46342614", "0.4632689", "0.46313718", "0.46313277", "0.4628866", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46219206", "0.46218497", "0.46149975", "0.46141997", "0.46111447", "0.46086374", "0.46028987", "0.46026945", "0.46011838", "0.4595131", "0.45936096", "0.45857486", "0.4585606", "0.45828834", "0.45811903", "0.45771813", "0.4575571", "0.4572879", "0.4569751", "0.45550534", "0.45534098", "0.45529717", "0.4543368", "0.45415175", "0.45397773", "0.4532689", "0.4531359", "0.45303658", "0.4511738", "0.4510593", "0.4508997" ]
0.74669456
0
Get the value of precio_final_iva
Получить значение precio_final_iva
public function getPrecio_final_iva() { return $this->precio_final_iva; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIva()\n {\n return $this->iva;\n }", "public function setPrecio_final_iva($precio_final_iva)\n {\n $this->precio_final_iva = $precio_final_iva;\n return $this;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function setPrecio_final_iva_dto($precio_final_iva_dto)\n {\n $this->precio_final_iva_dto = $precio_final_iva_dto;\n return $this;\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "function iva($importe,$iva)\n\t{\n\t\t$total = round($importe + ($importe * $iva)/100,2);\n\t\treturn $total;\n\t}", "public function valorAtual(){\n if($this->tipo_periodo == $DIA){\n $timestampDeposito = strtorime($this->data_deposito);\n if(date(\"Y-m\", $timestampDeposito) == date(\"Y-m\") && Util::get_dias_mes($this->data_deposito) == $this->periodo){\n return $this->valor + rendimentoDias($this->periodo);\n }else{\n return $this->valor;\n }\n\n }else if($this->tipo_periodo == $MES){\n\n }else if($this->tipo_periodo == $ANO){\n\n }\n }", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getValorAtual() {\n return $this->nValorAtual;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "function consultarCondicionesIVA() {\n return NULL;\n }", "public function getValor() {\n return $this->valor;\n }", "function getPesoVolumetricoTotal(){\n $res = 0;\n foreach($this->paquetes as $pk){\n $res += $pk->getPesoVolumetrico();\n }\n return $res;\n }", "public function getPVP($idproductos){\n\t\t$sql = \"SELECT precio \".\n\t\t\t\"FROM `productos` \".\n\t\t\t\"WHERE idproductos = \".$idproductos;\n\t\t$q = $this->c->prepare($sql);\n\t\t$q->execute();\n\t\treturn $q->fetch()['precio'];\n\t}", "public function imc(){\n return $this->peso / ($this->altura * $this->altura);\n }", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function getProcResultado() {\n return $this->iProcResultado;\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function getIva_gravado()\n {\n return $this->iva_gravado;\n }", "public function getPrecioAhora()\r\n {\r\n return $this->precioAhora;\r\n }", "public function getPaRes()\n {\n return $this->paRes;\n }", "public function getPv()\n {\n return $this->pv;\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function tipos_iva()\n\t{\n\n\t\t$this->Autorizacion(\"wsfe\");\n\n\t\t#LLAMAMOS CLIENTE SOAP\n\n\t\t$client = new SoapClient($this->WSDL_CAE, array(\n\t\t\t'soap_version' => SOAP_1_2,\n\t\t\t'location' => $this->URL_TIPO_IVA,\n\t\t\t'trace' => 1\n\t\t));\n\n\t\t#CREDENCIALES\n\n\t\t$Auth = array('Token' => $this->token, 'Sign' => $this->sign, 'Cuit' => floatVal($this->cuit_emisor));\n\n\t\t$FEParamGetTiposIva = array('Auth' => $Auth);\n\t\t#ENVIAMOS EL REQUEST\n\n\t\t$results = $client->FEParamGetTiposIva($FEParamGetTiposIva);\n\n\t\t#GUARDAMOS RESPONSE\n\n\t\t$json_obj = json_encode($results);\n\t\tfile_put_contents($this->facturacion_path(\"/xml/request-tiposiva.xml\"), $client->__getLastRequest());\n\t\tfile_put_contents($this->facturacion_path(\"/xml/response-tiposiva.json\"), $json_obj);\n\t\tif (is_soap_fault($results)) {\n\t\t\texit(\"SOAP Fault: \" . $results->faultcode . \"\\n\" . $results->faultstring . \"\\n\");\n\t\t}\n\n\t\t#LEEMOS LOS DATOS\n\t}", "public function getPercentualDepreciado();", "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function getTotalIGV()\n\t{\n\t\treturn $this->getCIF() * ($this->IGV / 100);\n\t}", "public function getPiso()\r\n\t{\r\n\t\treturn($this->piso);\r\n\t}", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function getValor() {\n return $this->nValor;\n }", "public function getValor() {\n return $this->nValor;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getVatPercentage(): ?int;", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function getValor()\n {\n return $this->nValor;\n }", "public function getPrice() {\n $prezzo= $this->prezzo;\n if ($this->sconto==true) {\n $sconto = ($prezzo * $this->percSconto) / 100;\n $prezzo = round($prezzo - $sconto, 2);\n }\n return $prezzo;\n }", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function getValorDepreciado();", "public function getPeso(): float;", "public static function calcularIva($base_imponible, $iva)\n {\n\n // $iva = $iva/100 * round($base_imponible,2);\n // //$total = round($iva + $base_imponible,2);\n // $total = round($iva,2) + round($base_imponible,2);\n // return [\n // 'base_imponible' => round($base_imponible,2),\n // 'monto_iva' => round($iva,2),\n // 'total' => round($total,2)\n // ];\n\n $iva = $iva / 100 * $base_imponible;\n //$total = round($iva + $base_imponible,2);\n $total = $iva + $base_imponible;\n return [\n 'base_imponible' => $base_imponible,\n 'monto_iva' => $iva,\n 'total' => $total\n ];\n }", "public function aprovadoComProgressaoParcial() {\n\n $lAprovadoProgressaoParcial = false;\n if ( $this->getResultadoFinal() != null && $this->getResultadoFinal()->getCodigoResultadoFinal() != null ) {\n\n $sWhere = \"ed107_diariofinal = {$this->getResultadoFinal()->getCodigoResultadoFinal()}\";\n $oDaoProgressaoAluno = new cl_progressaoparcialalunodiariofinalorigem();\n $sSqlProgressao = $oDaoProgressaoAluno->sql_query( null, \"1\", null, $sWhere );\n $rsDadosProgressao = $oDaoProgressaoAluno->sql_record( $sSqlProgressao );\n if ($rsDadosProgressao && $oDaoProgressaoAluno->numrows > 0) {\n $lAprovadoProgressaoParcial = true;\n }\n }\n return $lAprovadoProgressaoParcial;\n }", "public function effectiveVat() {\n \treturn $this->effectivePrice() * env('VAT_PERCENTAGE');\n }", "public function petroleoportonelada()\n\t{\n\t\t \n\t\t \n\t\t if($this->descargada>0) {\n\t\t $this->consumoportonelada=round($this->d2/$this->descargada,1);\n\t\t \t} else {\n\t\t\t $this->consumoportonelada=0;\n\t\t\t}\n\t\t\treturn $this->consumoportonelada;\n\t\t \n\t}", "public function getAnoFinal() {\n return $this->iAnoFinal;\n }", "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}", "public function getValorParcelaIsenta () {\n return $this->nValorParcelaIsenta; \n }", "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "public static function getValueProduct($id, $tipo = null, $user = null)\r\n {\r\n $value = 0;\r\n $read = new Read();\r\n $read->ExeRead('products', 'where id=:id', 'id=' . $id);\r\n foreach ($read->getResult() as $dados) {\r\n extract($dados);\r\n if ($user != null) {\r\n if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else if ($tipo == 3) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 18), 2, \",\", \"\");\r\n } else if ($tipo == 4) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 9), 2, \",\", \"\");\r\n } else if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n }", "public function calcular()\n {\n // e consigo fazer isso pois um objeto pessoa foi armazenado na propriedade,\n // que nesse caso, tem o mesmo nome\n return $this->pessoa->getPeso() / ($this->pessoa->getAltura() ** 2);\n }", "public function getCalculatedFinalPrice()\n {\n return $this->_getData('calculated_final_price');\n }", "function setiva_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT iva FROM tbl_inventario WHERE cod_producto=$cod;\"; \r\n\t $result = @mysql_query($query);\r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t\t$iva=$row['iva'];\r\n\t return $iva;\r\n\t }\r\n }\r\n }", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "public function getTotal_venda()\n {\n return $this->total_venda;\n }", "public function imc(){\n $this->imc = $this->peso / ($this->altura * $this->altura );\n return $this->imc;\n; }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function getValorTotal()\n {\n return $this->valor_total;\n }", "public function getValorAnulado() {\n return $this->nValorAnulado;\n }", "public function getValorTotal () {\n return $this->iValorTotal;\n }", "function tempo()\n {\n return $this->km(pow($this->vdot, 1.73) - $this->vdot * 36 + 1340);\n }", "function getPuissance(){\n return $this->_puissance;\n }", "public function getEta()\n {\n return 2021 - $this->anno_uscita;\n }", "public function getPeso()\n {\n }", "public function get_current_price(){\n\t\treturn (float) $this->v_current_price;\n\t}", "public function getPeso()\n {\n return $this->peso;\n }", "public function getPeso()\n {\n return $this->peso;\n }", "public function getValorTotal() \n {\n $total = 0;\n foreach ($this->contratoParcelas as $parcela) {\n // seta o valor total\n $totalTemp = $parcela->valor;\n \n // busca a faixa e calcula os encargos\n if ($faixaCalculo = CarteiraCalculo::findFaixa($this->carteira->id_campanha, $parcela->getAtraso())) { \n // soma o total da parcela\n $totalTemp += floor(($parcela->valor * ($faixaCalculo->multa / 100)) * 100) / 100;\n $totalTemp += floor(($parcela->valor * (($faixaCalculo->juros / 30 * $parcela->getAtraso()) / 100)) * 100) / 100;\n $totalTemp += floor(($totalTemp * ($faixaCalculo->honorario / 100)) * 100) / 100;\n \n // soma o total do contrato\n $total += $totalTemp;\n }\n }\n \n return $total;\n }", "function valor_opcion($opcion_id) {\n $valor_opcion = $this->Pcrn->campo_id('sis_opcion', $opcion_id, 'valor');\n return $valor_opcion;\n }", "public function getResultadoFinal() {\n return $this->sResultadoFinal;\n }", "public function getIvaPorcentajeEstudioCredito( ){\n\t\treturn $this->ivaPorcentajeEstudioCredito;\n\t}", "public function getPeso() {\n\t\t$sql = sprintf(\"Select\n sum(a.`peso`) as peso\n from\n `taxaitens` a\n inner join `taxa_item` b on(a.`idItem` = b.`id`)\n inner join `taxa` c on(a.`idTaxa` = c.`id`)\n where\n c.`data` BETWEEN '%s' and '%s' and\n b.`sexo` = 1\", $this->datai, $this->dataf);\n\t\t$rs = $this->conn->executeSql($sql)->fetch_object();\n\n\t\treturn $rs->peso;\n\t}", "public function getValorAttribute($valor)\n {\n return $valor / 100;\n }" ]
[ "0.76322126", "0.7236428", "0.7236428", "0.71008563", "0.70260894", "0.6701061", "0.6487205", "0.6475386", "0.64706284", "0.64699644", "0.64511454", "0.64261883", "0.63563114", "0.63563114", "0.63563114", "0.63563114", "0.63340634", "0.63340634", "0.6267662", "0.6257327", "0.62538916", "0.61856484", "0.6168989", "0.6164351", "0.6137532", "0.606011", "0.606011", "0.606011", "0.606011", "0.606011", "0.5990509", "0.5987973", "0.59877485", "0.5981936", "0.5981592", "0.59708476", "0.5931853", "0.59245485", "0.59200865", "0.5905352", "0.58872026", "0.5884872", "0.5868637", "0.5865271", "0.5853537", "0.5849664", "0.58471537", "0.58390015", "0.58049387", "0.57961583", "0.5784678", "0.5780775", "0.5780775", "0.5774586", "0.5774586", "0.5774586", "0.5774586", "0.5774586", "0.5774586", "0.5774586", "0.5769048", "0.5758993", "0.5754038", "0.5747829", "0.5730183", "0.572104", "0.57124406", "0.5707", "0.56940424", "0.5686453", "0.5681797", "0.56681967", "0.5666153", "0.5665093", "0.5664238", "0.5654583", "0.5652842", "0.56485957", "0.56185", "0.5611745", "0.56102914", "0.55983764", "0.5554159", "0.55512977", "0.55334854", "0.55334425", "0.552388", "0.5523131", "0.55230874", "0.5520221", "0.5518345", "0.5518283", "0.55174565", "0.55174565", "0.5511591", "0.55076873", "0.55036104", "0.550208", "0.54995644", "0.54990214" ]
0.8863847
0
Set the value of precio_final_iva
Установите значение precio_final_iva
public function setPrecio_final_iva($precio_final_iva) { $this->precio_final_iva = $precio_final_iva; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function setPrecio_final_iva_dto($precio_final_iva_dto)\n {\n $this->precio_final_iva_dto = $precio_final_iva_dto;\n return $this;\n }", "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualNivA');\n if($paginaActual==null)\n Session::put('paginaActualNivA',1);\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualEstI');\n if($paginaActual==null)\n Session::put('paginaActualEstI',1);\n }", "public function getIva()\n {\n return $this->iva;\n }", "public static function actualizaPuntuacion($val, $id){\n $producto = null;\n $producto = GestionProducto::guardarProducto($id);\n $producto['puntos'] = (($producto['puntos'] * $producto['num_votaciones']) + $val)/($producto['num_votaciones']+1);\n $producto['num_votaciones']= $producto['num_votaciones']+1;\n\n $prod = Product::actualizapuntos($producto);\n \n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function setValorAprovacao($mValorAprovacao) {\n $this->mValorAprovacao = $mValorAprovacao;\n }", "public function setValorAtual($nValorAtual = 0);", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualR');\n if($paginaActual==null)\n Session::put('paginaActualR',1);\n }", "public function setAnoFinal($iAnoFinal) {\n $this->iAnoFinal = $iAnoFinal;\n }", "function iva($importe,$iva)\n\t{\n\t\t$total = round($importe + ($importe * $iva)/100,2);\n\t\treturn $total;\n\t}", "public function aprova()\n {\n $this -> estadoAtual -> aprova($this);\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function setIva($iva)\n {\n $this->iva = $iva;\n return $this;\n }", "public function setIVA($IVA)\n {\n $this->IVA = $IVA;\n\n return $this;\n }", "public function setIVA($IVA)\n {\n $this->IVA = $IVA;\n\n return $this;\n }", "private function asigna_val(){\n \t//asigna variables del archivo\n \t$this->nombre = $this->archivo[\"name\"];\n \t$this->tipo = $this->archivo[\"type\"];\n \t\n \t$this->tamano = $this->archivo[\"size\"];\n \t$this->dimensiones = getimagesize($this->ruta_temporal);\n \t$this->alto = $this->dimensiones[1];\n \t$this->ancho = $this->dimensiones[0];\n\n \t$this->origen = $this->ruta_temporal;\n \t$this->destino = $this->destino.$this->nombre;\n\n \t$this->ruta_temporal = $this->archivo[\"tmp_name\"];\n\n \t/*if( $this->archivo[\"tmp_name\"] ){\n\n \t}else{\n\n \t}*/\n\n\n }", "public function setValorAtual($nValorAtual) {\n $this->nValorAtual = $nValorAtual;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function setValorTotal ($iValorTotal) {\n $this->iValorTotal = $iValorTotal;\n }", "public function setDataFim($valor){\n\t\t\t$this->dataFim = $valor;\n\t\t}", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "function setiva_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT iva FROM tbl_inventario WHERE cod_producto=$cod;\"; \r\n\t $result = @mysql_query($query);\r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t\t$iva=$row['iva'];\r\n\t return $iva;\r\n\t }\r\n }\r\n }", "public function escolherSetorVida()\n {\n $profissional = $this->input->get(\"p\");\n\n if($profissional != 1)\n {\n redirect('jogo/consultaVirtual');\n }\n\n $dados = $this->getDadosTelaInicial();\n \n // carrega o template\n $this->template->view(\"automatico_escolher_setor_vida\", array(\n \"title\" => \"Auto Consulta\",\n \"verticalTabs\" => true,\n \"jogosConsultaVirtual\" => $dados['jogosConsultaVirtual'],\n \"jogosAutoConsulta\" => $dados['jogosAutoConsulta'],\n \"setoresVida\" => $dados['setoresVida'],\n \"profissional\" => $profissional,\n \"codUsuarioCombinacao\" => $dados['codUsuarioCombinacao'],\n \"menuLateral\" => false\n ));\n }", "public function tipos_iva()\n\t{\n\n\t\t$this->Autorizacion(\"wsfe\");\n\n\t\t#LLAMAMOS CLIENTE SOAP\n\n\t\t$client = new SoapClient($this->WSDL_CAE, array(\n\t\t\t'soap_version' => SOAP_1_2,\n\t\t\t'location' => $this->URL_TIPO_IVA,\n\t\t\t'trace' => 1\n\t\t));\n\n\t\t#CREDENCIALES\n\n\t\t$Auth = array('Token' => $this->token, 'Sign' => $this->sign, 'Cuit' => floatVal($this->cuit_emisor));\n\n\t\t$FEParamGetTiposIva = array('Auth' => $Auth);\n\t\t#ENVIAMOS EL REQUEST\n\n\t\t$results = $client->FEParamGetTiposIva($FEParamGetTiposIva);\n\n\t\t#GUARDAMOS RESPONSE\n\n\t\t$json_obj = json_encode($results);\n\t\tfile_put_contents($this->facturacion_path(\"/xml/request-tiposiva.xml\"), $client->__getLastRequest());\n\t\tfile_put_contents($this->facturacion_path(\"/xml/response-tiposiva.json\"), $json_obj);\n\t\tif (is_soap_fault($results)) {\n\t\t\texit(\"SOAP Fault: \" . $results->faultcode . \"\\n\" . $results->faultstring . \"\\n\");\n\t\t}\n\n\t\t#LEEMOS LOS DATOS\n\t}", "public function set_imagenC($valor){\n $this->ImagenC = \"02\".trim($valor);\n }", "public function inativa()\n {\n $this->status = 0;\n }", "public function setValorTotal($valor){\n\t\t\t$this->valorTotal = $valor;\n\t\t}", "public function valorAtual(){\n if($this->tipo_periodo == $DIA){\n $timestampDeposito = strtorime($this->data_deposito);\n if(date(\"Y-m\", $timestampDeposito) == date(\"Y-m\") && Util::get_dias_mes($this->data_deposito) == $this->periodo){\n return $this->valor + rendimentoDias($this->periodo);\n }else{\n return $this->valor;\n }\n\n }else if($this->tipo_periodo == $MES){\n\n }else if($this->tipo_periodo == $ANO){\n\n }\n }", "function set_resaltar_siempre_dia_actual($resaltar)\n\t{\n\t\t$this->siempre_resalta_dia_actual = $resaltar;\n\t}", "public function set_valor($id, $valor);", "public function setAtivo( $lAtivo ) {\n\t\t$this->lAtivo = $lAtivo;\n\t}", "public function setFecha_efectiva_parto($fecha_efectiva_parto)\r\n\t{\r\n\t\t$this->fecha_efectiva_parto = $fecha_efectiva_parto;\r\n\t}", "public function setIvaPorcentajeEstudioCredito( $ivaPorcentajeEstudioCredito ){\n\t\t$this->ivaPorcentajeEstudioCredito = $ivaPorcentajeEstudioCredito;\n\t}", "public function atualizar($oficina_palestrante){\r\n\t\t$sql = 'UPDATE oficina_palestrante SET id = :id, id_palestrante = :id_palestrante, id_oficina = :id_oficina WHERE id = :id';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->bindValue(':id',$oficina_palestrante->getId()); \n\r\t\t$consulta->bindValue(':id_palestrante',$oficina_palestrante->getId_palestrante()); \n\r\t\t$consulta->bindValue(':id_oficina',$oficina_palestrante->getId_oficina()); \r\n\t\t$consulta->execute();\r\n\t}", "function set_deposit_price()\n {\n $deposit_price = $this->input->post(\"deposit_price\");\n $this->sale_lib->set_deposit_price($deposit_price);\n \n $this->_reload();\n }", "function actualiza_Ponencia($pp_id, $pp_año, $pp_titulo, $pp_nombre_evento, $pp_lugar, $te_id)\n\t\t{\n\t\t\t$this->sql=\"UPDATE ponencia SET pp_año=$pp_año, pp_titulo='$pp_titulo', pp_nombre_evento='$pp_nombre_evento', pp_lugar='$pp_lugar', te_id=$te_id where pp_id=$pp_id\";\n\t\t\t\n\t\t\tparent::ejecutaQUERY();\n\t\t}", "public function _setAltura($altura)\n {\n $this->altura = $altura;\n }", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "public function actualizar_estado_cartera(){\n // Actualizar las cartera con fechas inferior a hoy y con estado distinto a Pagada\n TesoPlanPagosEstudiante::where('fecha_vencimiento','<', date('Y-m-d'))\n ->where('estado','<>', 'Pagada')\n ->update(['estado' => 'Vencida']);\n }", "public function actualizarporcentajeAction()\n {\n $request= $this->getRequest();\n $id_actividad_desempeno=$request->get('id_actividad_desempeno');\n $porcentaje=$request->get('porcentaje');\n $actividad_desempeno=$this->getDoctrine()->getRepository(\"NetpublicCoreBundle:ActividadDesempeno\")->find($id_actividad_desempeno);\n $actividad_desempeno->setPorcentaje($porcentaje);\n $em= $this->getDoctrine()->getEntityManager();\n $em->persist($actividad_desempeno);\n $em->flush();\n \n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n \n }", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function setFinal($final){\n if($final === true){\n $this->final = true;\n }else{\n $this->final = false;\n }\n }", "public function testSetTvaFictivePrec() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePrec(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePrec());\n }", "public function getValorAtual() {\n return $this->nValorAtual;\n }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "public function modificarIrA( $proyecto, $encuesta_id ){\n $vectorId = array();\n $vectorCodigo = array();\n $vectorIr_a = array();\n $vectorId_pregunta_tp = array();\n \n $select = \"select id, codigo, ir_a, id_pregunta_tp from \" .$proyecto .\".entrada where id_instrumento = '\" .$encuesta_id .\"';\";\n $objs = Aux::findBySql($select)->all();\n foreach( $objs as $obj ){\n $vectorId[] = $obj->id;\n $vectorCodigo[] = $obj->codigo;\n $vectorIr_a[] = $obj->ir_a;\n $vectorId_pregunta_tp[] = $obj->id_pregunta_tp;\n }\n $vectorCodigo[-1] = '';\n foreach( $objs as $obj ){\n if( $obj->codigo != 'x3fin' && (int)substr($obj->ir_a,0,1) != 0 ){\n if( $obj->ir_a == 'x3fin' || $obj->ir_a == '' )\n $auxIr = 'x3fin';\n else if( isset($vectorCodigo[$obj->ir_a -1]) )\n $auxIr = $vectorCodigo[$obj->ir_a -1];\n else\n $auxIr = '';\n $update = \"update \" .$proyecto .\".entrada set ir_a = '\" .$auxIr .\"' where id='\" .$obj->id .\"';\";\n Aux::findBySql($update)->one();\n if( false && ($obj->id_pregunta_tp == 3 || $obj->id_pregunta_tp == 4 || $obj->id_pregunta_tp == 5) ){\n $select2 = \"select id, ir_a from \" .$proyecto .\".entrada_op where id_entrada = '\" .$obj->id .\"';\";\n $objs2 = Aux::findBySql($select2)->all();\n foreach( $objs2 as $obj2 ){ \n if( $obj2->ir_a == 'x3fin' )\n $auxIr2 = 'x3fin';\n else if( $obj2->ir_a == '' && $obj->ir_a == '' )\n $auxIr2 = 'x3fin';\n else if( $obj2->ir_a == '' )\n $auxIr2 = $obj->ir_a;\n else if( isset($vectorCodigo[$obj2->ir_a -1]) )\n $auxIr2 = $vectorCodigo[$obj2->ir_a -1];\n else\n $auxIr2 = '';\n Aux::findBySql( \"update \" .$proyecto .\".entrada_op set ir_a = '\" .$auxIr2 .\"' where id='\" .$obj2->id .\"' ;\" )->one();\n } // foreach\n } // if\n } // if\n } // for \n }", "public function setAvaliacaoResultadoFinal(AvaliacaoResultadoFinal $oAvaliacaoResultadoFinal) {\n\t\t$this->oAvaliacaoResultadoFinal = $oAvaliacaoResultadoFinal;\n\t}", "public function setFinal($final)\n {\n if ($final && !$this->final) {\n //Limpiamos las conexiones antiguas\n foreach ($this->ConexionesOrigen as $key => $c)\n unset($this->ConexionesOrigen[$key]);\n\n $conexion = new Conexion();\n $conexion->tipo = 'secuencial';\n $conexion->tarea_id_destino = null;\n $conexion->regla = null;\n $this->ConexionesOrigen[] = $conexion;\n $this->es_final = 1;\n } else if (!$final && $this->final) {\n //Limpiamos las conexiones antiguas\n foreach ($this->ConexionesOrigen as $key => $c)\n unset($this->ConexionesOrigen[$key]);\n $this->es_final = 0;\n }\n }", "public function pi_setPiVarDefaults() {}", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function testSetPourcentageImp() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentageImp(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentageImp());\n }", "public function atualizarPercentualProjeto($params)\n {\n $this->_mapper->atualizarPercentualProjeto($params);\n }", "private function inizVarContratto(){\r\n $this->varWork=$this->post('data');\r\n $giorni=$this->post('giorni');\r\n $giorni[0]=0;\r\n $this->giorni=$giorni;\r\n $this->setTime();\r\n $this->setDate();\r\n $this->setIdPrenotazione();\r\n }", "abstract public function setValorTransacao($valor);", "public function ActualizarValoresDistribucion()\n {\n $horario = DB::statement((\" \n UPDATE practica_distribucion, convenio_os_pmo, obra_social SET practica_distribucion.total = ((practica_distribucion.porcentaje * convenio_os_pmo.valor) / 100) ,practica_distribucion.valor = convenio_os_pmo.valor WHERE practica_distribucion.practica_distribucion_id = convenio_os_pmo.id AND convenio_os_pmo.obra_social_id = obra_social.id\n \"));\n\n return response()->json($horario, 201); \n return $this->showAll($res);\n \n }", "public function ActualizarProvincias()\n\t{\n\n\t\tself::SetNames();\n\t\tif(empty($_POST[\"id_provincia\"]) or empty($_POST[\"provincia\"]))\n\t\t{\n\t\t\techo \"1\";\n\t\t\texit;\n\t\t}\n\n\t\t\t\t$sql = \" SELECT provincia FROM provincias WHERE id_provincia != ? AND provincia = ?\";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute(array($_POST[\"id_provincia\"],$_POST[\"provincia\"]));\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\t\t\t\t\t$sql = \" UPDATE provincias set \"\n\t\t\t\t\t.\" provincia = ? \"\n\t\t\t\t\t.\" where \"\n\t\t\t\t\t.\" id_provincia = ?;\n\t\t\t\t\t\";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1, $provincia);\n\t\t\t\t\t$stmt->bindParam(2, $id_provincia);\n\n\t\t\t\t\t$provincia = limpiar($_POST[\"provincia\"]);\n\t\tif (limpiar($_POST['id_provincia']==\"\")) { $id_provincia = limpiar('0'); } else { $id_provincia = limpiar($_POST['id_provincia']); }\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\techo \"<span class='fa fa-check-square-o'></span> LA PROVINCIA HA SIDO ACTUALIZADA EXITOSAMENTE\";\n\t\t\t\texit;\n\n\t\t\t\t} else {\n\n\t\t\t\techo \"2\";\n\t\t\t\texit;\n\t\t\t}\n\t}", "public function setAltura($altura)\n {\n $this->altura = $altura;\n }", "public function setAltura($altura)\n {\n $this->comprobarNegativo($altura,$this->altura);\n }", "public function setValor( $valor )\n {\n $this->valorMoeda = $valor; //Seta o valor da forma digitada\n $valor = str_replace(array(\".\",\",\"), \"\", $valor);\n $valor = str_pad($valor, 10, \"0\", STR_PAD_LEFT);\n $this->valor = $valor; //seta o valor sem pontos ou virgula\n }", "public function setAltura($altura)\n {\n $this->altura = $altura;\n }", "function asignar_valores(){\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->producto=$_POST['id'];\n\t}", "public function testSetTvaFictivePres() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePres(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePres());\n }", "function actualiza_Proyecto($ip_id, $proy_id, $proy_lugar, $proy_año, $proy_titulo, $proy_autor, $proy_nom_empresa, $tp_id, $finan_id)\n\t\t{\n\t\t\t//Actualiza los datos del proyecto\n\t\t\t$this->sql=\"update proyecto set proy_lugar='$proy_lugar', proy_año=$proy_año, proy_titulo='$proy_titulo', proy_autor='$proy_autor', proy_nom_empresa='$proy_nom_empresa', tp_id=$tp_id, finan_id=$finan_id \";\n\t\t\t$this->sql.=\"where proy_id=$proy_id\";\n\t\t\t\n\t\t\tparent::ejecutaQUERY();\n\t\t}", "public function mudarPercentual() {\n $cd_tarefa = $_POST['cd_tarefa'];\n $dados['pcompleto'] = $_POST['porcento'];\n if ($this->tarefa->atualizarTarefa($dados, $cd_tarefa)) {\n header(\"location: ../views/tarefa.php?tarefa=\" . $cd_tarefa);\n } else {\n header(\"location: ../views/tarefas.php\");\n }\n }", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "public function setFormaAprovacao($iFormaAprovacao) {\n\t $this->iFormaAprovacao = $iFormaAprovacao;\n\t}", "public function SetSaldoDisponivel($valor){\n\t\t $this->saldo_disponivel= $valor;\n\t }", "public function aprovadoComProgressaoParcial() {\n\n $lAprovadoProgressaoParcial = false;\n if ( $this->getResultadoFinal() != null && $this->getResultadoFinal()->getCodigoResultadoFinal() != null ) {\n\n $sWhere = \"ed107_diariofinal = {$this->getResultadoFinal()->getCodigoResultadoFinal()}\";\n $oDaoProgressaoAluno = new cl_progressaoparcialalunodiariofinalorigem();\n $sSqlProgressao = $oDaoProgressaoAluno->sql_query( null, \"1\", null, $sWhere );\n $rsDadosProgressao = $oDaoProgressaoAluno->sql_record( $sSqlProgressao );\n if ($rsDadosProgressao && $oDaoProgressaoAluno->numrows > 0) {\n $lAprovadoProgressaoParcial = true;\n }\n }\n return $lAprovadoProgressaoParcial;\n }", "public function setPaginaAtual($pagina){\n $this->PaginaAtual = $pagina;\n }", "public function setLPUParcial ($orcamento) {\n $this->setOrcamento($orcamento);\n $this->setOrcamentoId($orcamento->getId());\n $this->save(); \n }", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "public function setFinal($val)\n {\n $this->_propDict[\"final\"] = $val;\n return $this;\n }", "public function setPreventivasVinculadas($preventivaPai, $preventivaFilho) {\n\t\t//foreach ($preventivaFilho as $indice => $p){\n\t\t\tDoctrine_Core::getTable(\"Vinculacao\")->setPreventivaPai($preventivaPai);\n\t\t\tDoctrine_Core::getTable(\"Vinculacao\")->setPreventivaFilho($preventivaFilho);\n\t\t\t return $p; \n\t\t//} \n }", "public function updatePrice()\n\t{\n\t\t$this->price_pT = $this->product->getCurrentPrice(strtotime($this->created_on));\n\t}", "public function setVida($nuevo){\n $this->vida=$nuevo;\n }", "public function setCompetenciaFinal($iAno, $iMes) {\n\n $this->iAnoFinal = $iAno;\n $this->iMesFinal = $iMes;\n }", "public static function updAfterAvaluoEnfoqueFisico($idavaluo, $total_valor_fisico) {\n\t\t$rowAvaluosConclusiones = Avaluos::find($idavaluo)->AvaluosConclusiones;\n\t\t$rowAvaluosConclusiones->valor_fisico = $total_valor_fisico;\n\t\t$rowAvaluosConclusiones->save();\n\t}", "public function setAtiTotal($atiTotal);", "public function setProvincia($p_provincia){\r\n\t$this->provincia=$p_provincia;\r\n}", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public static function calcularIva($base_imponible, $iva)\n {\n\n // $iva = $iva/100 * round($base_imponible,2);\n // //$total = round($iva + $base_imponible,2);\n // $total = round($iva,2) + round($base_imponible,2);\n // return [\n // 'base_imponible' => round($base_imponible,2),\n // 'monto_iva' => round($iva,2),\n // 'total' => round($total,2)\n // ];\n\n $iva = $iva / 100 * $base_imponible;\n //$total = round($iva + $base_imponible,2);\n $total = $iva + $base_imponible;\n return [\n 'base_imponible' => $base_imponible,\n 'monto_iva' => $iva,\n 'total' => $total\n ];\n }", "public function SetNumerodaConta($valor){\n\t\t $this->numerodaConta= $valor;\n\t }", "public function setIdprovincia($p_idprovincia){\r\n\t$this->idprovincia=$p_idprovincia;\r\n}", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function setFinal(DerivationType $value): void\n {\n $this->finalAttr = $value;\n }", "function pIva($iva)\n {\n $iva = str_replace(' ', '', trim($iva));\n \n // If the P.IVA isn't 11 charachters long and isn't a number returns false\n if (!preg_match('!^([0-9]+){11}$!', $iva)) {\n return false;\n }\n \n // Get the length of the the code ($iva)\n $length = strlen($iva);\n $numbers1 = 0;\n $numbers2 = 0;\n for ($i = 0; $i <= $length; $i++) {\n if (($i + 1) % 2 == 0) {\n // Multiply not odd numbers\n $num = ($iva{$i} * 2);\n // If number is greater than 9 then here we have to subtract 9\n // to the number\n if ($num > 9) {\n $num -= 9;\n }\n \n // Sum not odd numbers\n $numbers1 += $num;\n } else {\n // Sum odd numbers\n $numbers2 += $iva{$i};\n }\n }\n \n // Sum the two numbers and divide to 10\n // If the result is zero rest then the P.IVA is correct\n $op = (($numbers1 + $numbers2) / 10);\n if (!preg_match('!\\.!', $op)) {\n return true;\n }\n \n return false;\n }", "public function set_imagenG($valor){\n $this->ImagenG = \"01\".trim($valor);\n }", "public function ActualizarApartado(){\n $iIdApartado = $this->input->post('iIdApartado');\n $data[\"vApartado\"] = $this->input->post(\"nombre2\");\n $aux = $this->mp->updateApartado($iIdApartado, $data);\n echo $aux;\n //var_dump($data);\n }" ]
[ "0.76021355", "0.7013996", "0.63090134", "0.58888215", "0.5806647", "0.5754672", "0.5754672", "0.56799585", "0.5677553", "0.5610875", "0.56030995", "0.55754673", "0.55708706", "0.5560011", "0.5526952", "0.55009556", "0.5478288", "0.5436221", "0.5417039", "0.53957075", "0.536583", "0.5347943", "0.5347943", "0.53275716", "0.5288904", "0.5228644", "0.5217086", "0.5214517", "0.5213129", "0.52043915", "0.51790017", "0.5136114", "0.51311445", "0.5128103", "0.5109536", "0.51050025", "0.5084789", "0.5078272", "0.5078211", "0.5077743", "0.5061551", "0.50576144", "0.50495523", "0.5041908", "0.5038273", "0.5034531", "0.50281966", "0.5023923", "0.5020359", "0.50035524", "0.4981588", "0.4979105", "0.497587", "0.49737984", "0.49668205", "0.4966557", "0.49607283", "0.49597892", "0.49518102", "0.49389014", "0.49317297", "0.49179944", "0.49167207", "0.49111047", "0.490361", "0.49034435", "0.48983213", "0.48831567", "0.48765054", "0.48690268", "0.48689872", "0.48685136", "0.4861504", "0.4860715", "0.48479927", "0.48234904", "0.4816397", "0.4814712", "0.4804509", "0.4804302", "0.47885668", "0.47855473", "0.47851765", "0.47736377", "0.47727245", "0.4768384", "0.47683612", "0.47668836", "0.47625312", "0.47599146", "0.47593263", "0.47562352", "0.47551918", "0.4752638", "0.4750894", "0.47505128", "0.47464052", "0.47345012", "0.47286236", "0.4727929" ]
0.7634043
0
Get the value of precio_final_iva_dto
Получить значение precio_final_iva_dto
public function getPrecio_final_iva_dto() { return $this->precio_final_iva_dto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "public function setPrecio_final_iva_dto($precio_final_iva_dto)\n {\n $this->precio_final_iva_dto = $precio_final_iva_dto;\n return $this;\n }", "public function getPrecio_venta_dto()\n {\n return $this->precio_venta_dto;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIva()\n {\n return $this->iva;\n }", "public function getPrecioProducto(){\n return $this->precioProducto;\n }", "function getPrecio() {\n return $this->precio;\n }", "public function setPrecio_final_iva($precio_final_iva)\n {\n $this->precio_final_iva = $precio_final_iva;\n return $this;\n }", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function getprecio()\r\n {\r\n return $this->precio;\r\n }", "public function getPrecio(){\n\n return $this->precio ;\n }", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function getPrecio_venta()\n {\n return $this->precio_venta;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor() {\n return $this->valor;\n }", "public function getValorDepreciado();", "public function getPrecioAndVecesCompradoByID(){\n $consulta = $this->conexion->prepare(\"SELECT nombre, precio, vecesComprado FROM \".$this->table.\" WHERE idproducto = :id\");\n $res = $consulta->execute(array(\n \"id\" => $this->id\n ));\n $resultados = $consulta->fetch();\n\n return $resultados;\n }", "public function getDataFinal() {\n \treturn $this->oDtFim;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getDataResultadoFinal() {\n return $this->oDtResultado;\n }", "public function valor(): mixed\n {\n return $this->valor;\n }", "public function getPrecio($params){\n\t\treturn $precio;\n\t}", "function avaliacaoAvaliadorDTO() {\n\n}", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "public function getPraticien():?PraticienDTO\n {\n return $this->praticien;\n }", "public function getDataVencimento()\n {\n return $this->dataVencimento;\n }", "public function getPrecio_compra()\n {\n return $this->precio_compra;\n }", "public function getDataVencimento() {\n return $this->dtVencimento;\n }", "public function value()\n\t{\n\t\t$response = $this->response();\n\t\t$value = isset($response->PaReq) && 'null' != $response->PaReq ? $response->PaReq : $response->cavv;\n\t\treturn (string) $value;\n\t}", "public function getValor() {\n return $this->nValor;\n }", "public function getValor() {\n return $this->nValor;\n }", "public function getPeso()\n {\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getAtivo()\n {\n return $this->ativo;\n }", "public function getValue()\n {\n return $this->getReflector()->getValue();\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function getValor()\n {\n return $this->nValor;\n }", "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}", "public function getPVP($idproductos){\n\t\t$sql = \"SELECT precio \".\n\t\t\t\"FROM `productos` \".\n\t\t\t\"WHERE idproductos = \".$idproductos;\n\t\t$q = $this->c->prepare($sql);\n\t\t$q->execute();\n\t\treturn $q->fetch()['precio'];\n\t}", "public function getPeriodoActual() {\n return $this->periodoActual;\n }", "public function value()\n {\n return Common::decimal($this->getAttribute('value'));\n }", "public function getData_venda()\n {\n return $this->data_venda;\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function getDataPublicacao()\n {\n return $this->dataPublicacao;\n }", "public static function getValueProduct($id, $tipo = null, $user = null)\r\n {\r\n $value = 0;\r\n $read = new Read();\r\n $read->ExeRead('products', 'where id=:id', 'id=' . $id);\r\n foreach ($read->getResult() as $dados) {\r\n extract($dados);\r\n if ($user != null) {\r\n if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else if ($tipo == 3) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 18), 2, \",\", \"\");\r\n } else if ($tipo == 4) {\r\n return number_format(Dados::calculaDesconto($preco / 2, 9), 2, \",\", \"\");\r\n } else if (Dados::existePlanoAtivo($user == null ? $_SESSION['idUser'] : $user)) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else if (isset($_SESSION['carrinho'])) {\r\n if (Dados::verificaSeExisteDePlanoAtivacaoNoPedido()) {\r\n $value = $preco / 2;\r\n return number_format($value, 2, \",\", \"\");\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n } else {\r\n $value = $preco;\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n\r\n return number_format($value, 2, \",\", \"\");\r\n }\r\n }", "public function getPiso()\r\n\t{\r\n\t\treturn($this->piso);\r\n\t}", "function getvalorpauta($format = FALSE){\r\n\t\treturn ($format ? number_format($this->valorpauta, 4, \",\", \"\") : $this->valorpauta);\r\n\t}", "public function getValorAnulado() {\n return $this->nValorAnulado;\n }", "public function getResultadoAprovacao() {\n return $this->sResultadoAprovacao;\n }", "public function tipos_iva()\n\t{\n\n\t\t$this->Autorizacion(\"wsfe\");\n\n\t\t#LLAMAMOS CLIENTE SOAP\n\n\t\t$client = new SoapClient($this->WSDL_CAE, array(\n\t\t\t'soap_version' => SOAP_1_2,\n\t\t\t'location' => $this->URL_TIPO_IVA,\n\t\t\t'trace' => 1\n\t\t));\n\n\t\t#CREDENCIALES\n\n\t\t$Auth = array('Token' => $this->token, 'Sign' => $this->sign, 'Cuit' => floatVal($this->cuit_emisor));\n\n\t\t$FEParamGetTiposIva = array('Auth' => $Auth);\n\t\t#ENVIAMOS EL REQUEST\n\n\t\t$results = $client->FEParamGetTiposIva($FEParamGetTiposIva);\n\n\t\t#GUARDAMOS RESPONSE\n\n\t\t$json_obj = json_encode($results);\n\t\tfile_put_contents($this->facturacion_path(\"/xml/request-tiposiva.xml\"), $client->__getLastRequest());\n\t\tfile_put_contents($this->facturacion_path(\"/xml/response-tiposiva.json\"), $json_obj);\n\t\tif (is_soap_fault($results)) {\n\t\t\texit(\"SOAP Fault: \" . $results->faultcode . \"\\n\" . $results->faultstring . \"\\n\");\n\t\t}\n\n\t\t#LEEMOS LOS DATOS\n\t}", "public function getIvaPorcentajeEstudioCredito( ){\n\t\treturn $this->ivaPorcentajeEstudioCredito;\n\t}", "public function getValorOrcamento() {\n return $this->nValorOrcamento;\n }", "public function getValorAtual() {\n return $this->nValorAtual;\n }", "public function get_valor($id);", "public function getActualValue() {\n return $this->_actualValue;\n }", "public function getTarifaComision()\n {\n return $this->tarifaComision;\n }", "public function getDispositivo( ) {\n\n return $this->dispositivo;\n\n }", "public function getVTipo()\n{\nreturn $this->vTipo;\n}", "public function getPlazaActualAttribute()\n\t{\n\t\treturn $this->datosLaborales()->whereNull('fin')->first();\n\t}", "public function getValorParcelaIsenta () {\n return $this->nValorParcelaIsenta; \n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "public function getData_acesso()\n {\n return $this->data_acesso;\n }", "public function getPeso(): float;", "public function getPeso()\n {\n return $this->peso;\n }", "public function getPeso()\n {\n return $this->peso;\n }", "public function getPrecio_compra_total()\n {\n return $this->precio_compra_total;\n }", "public function getVoto()\n {\n return $this->voto;\n }", "public function getValorVenda()\n {\n return $this->valorVenda;\n }", "public function get_peso(){\r return $this->peso;\r }", "public function getGetCompetitivePricingForASINResult() \n {\n return $this->_fields['GetCompetitivePricingForASINResult']['FieldValue'];\n }", "public function getValue() {\n\n return $this->value;\n\n }", "public function getValorPago() {\n return $this->nValorPago;\n }", "public function getProcResultado() {\n return $this->iProcResultado;\n }", "public function getResultadoAvaliacao() {\n return $this->oResultadoAvaliacao;\n }" ]
[ "0.7736184", "0.69622177", "0.69177425", "0.65583825", "0.65583825", "0.64233166", "0.6356036", "0.6296168", "0.62676114", "0.6262131", "0.62491655", "0.62491655", "0.6226093", "0.62060946", "0.61807084", "0.6173429", "0.6171159", "0.61090493", "0.61047375", "0.61047375", "0.61047375", "0.61047375", "0.60482436", "0.6017053", "0.6017053", "0.6017053", "0.6017053", "0.6017053", "0.59570736", "0.59354717", "0.59040076", "0.5879814", "0.5810507", "0.5788931", "0.5750058", "0.57374364", "0.5729099", "0.5728132", "0.57186925", "0.57186925", "0.57186925", "0.57186925", "0.57186925", "0.57186925", "0.57063895", "0.568905", "0.5682293", "0.56741506", "0.5611895", "0.5609601", "0.5609601", "0.5588309", "0.5587765", "0.5587765", "0.5587765", "0.5587765", "0.5587765", "0.5587765", "0.5587765", "0.55692536", "0.5553319", "0.5549431", "0.55375206", "0.5523836", "0.55233467", "0.55188686", "0.5513126", "0.5510998", "0.5487426", "0.54852515", "0.54800725", "0.5476474", "0.54763865", "0.5469289", "0.5456772", "0.5452859", "0.54465884", "0.54374784", "0.5429879", "0.5413977", "0.5403371", "0.54007405", "0.5396792", "0.5393894", "0.5392041", "0.53835064", "0.53835064", "0.53813756", "0.53689903", "0.535937", "0.535937", "0.53515583", "0.5349959", "0.5337522", "0.53363353", "0.53359586", "0.53335345", "0.53253156", "0.5322621", "0.5320571" ]
0.88267523
0
Set the value of precio_final_iva_dto
Задайте значение precio_final_iva_dto
public function setPrecio_final_iva_dto($precio_final_iva_dto) { $this->precio_final_iva_dto = $precio_final_iva_dto; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio_final_iva_dto()\n {\n return $this->precio_final_iva_dto;\n }", "public function setPrecio_final_iva($precio_final_iva)\n {\n $this->precio_final_iva = $precio_final_iva;\n return $this;\n }", "public function getPrecio_final_iva()\n {\n return $this->precio_final_iva;\n }", "function setPrecio($precio) {\n $this->precio = $precio;\n }", "public function setIva($iva)\n {\n $this->iva = $iva;\n return $this;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function getIVA()\n {\n return $this->IVA;\n }", "public function setIVA($IVA)\n {\n $this->IVA = $IVA;\n\n return $this;\n }", "public function setIVA($IVA)\n {\n $this->IVA = $IVA;\n\n return $this;\n }", "public function setValorAprovacao($mValorAprovacao) {\n $this->mValorAprovacao = $mValorAprovacao;\n }", "public function darPrecioVenta()\n {\n /**\n * Declaracion de variables\n * float $valorFinalProducto, $costo, $incremento\n * int $anio\n */\n\n if ($this->getProductoDisponible()) {\n $costo = $this->getCostoProducto();\n $anio = date('Y') - $this->getAnioFabricacion();\n $incremento = $this->getIncrementoAnual();\n $valorFinalProducto = $costo + ($costo * $anio * ($incremento / 100));\n } else {\n $valorFinalProducto = -1;\n }\n\n return $valorFinalProducto;\n }", "public function testSetTvaFictivePrec() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePrec(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePrec());\n }", "public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }", "public function getIva()\n {\n return $this->iva;\n }", "function asignar_valores(){\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->producto=$_POST['id'];\n\t}", "public function getPrecio_venta_dto()\n {\n return $this->precio_venta_dto;\n }", "public function setPrecio_venta_dto($precio_venta_dto)\n {\n $this->precio_venta_dto = $precio_venta_dto;\n return $this;\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function testSetTvaFictivePres() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictivePres(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictivePres());\n }", "private function PegarValoresItemPedidoCompra(){\r\n if($this->sTipoProduto == \"camiseta\"){\r\n $this->sSql = \"SELECT * FROM camiseta WHERE cdCamiseta = '\".$this->nCdProduto.\"'\";\r\n $oDadosCamiseta = $this->oBd->PesquisarSQL($this->sSql);\r\n if($oDadosCamiseta){\r\n $this->dProdutoValorUnitario = $oDadosCamiseta[0]->valor - $oDadosCamiseta[0]->desconto;\r\n }\r\n } //fim - ($this->sTipoProduto == \"camiseta\")\r\n $this->dProdutoValorTotal = $this->dProdutoValorUnitario * $this->nQtde;\r\n }", "public function setIvaPorcentajeEstudioCredito( $ivaPorcentajeEstudioCredito ){\n\t\t$this->ivaPorcentajeEstudioCredito = $ivaPorcentajeEstudioCredito;\n\t}", "public function tipos_iva()\n\t{\n\n\t\t$this->Autorizacion(\"wsfe\");\n\n\t\t#LLAMAMOS CLIENTE SOAP\n\n\t\t$client = new SoapClient($this->WSDL_CAE, array(\n\t\t\t'soap_version' => SOAP_1_2,\n\t\t\t'location' => $this->URL_TIPO_IVA,\n\t\t\t'trace' => 1\n\t\t));\n\n\t\t#CREDENCIALES\n\n\t\t$Auth = array('Token' => $this->token, 'Sign' => $this->sign, 'Cuit' => floatVal($this->cuit_emisor));\n\n\t\t$FEParamGetTiposIva = array('Auth' => $Auth);\n\t\t#ENVIAMOS EL REQUEST\n\n\t\t$results = $client->FEParamGetTiposIva($FEParamGetTiposIva);\n\n\t\t#GUARDAMOS RESPONSE\n\n\t\t$json_obj = json_encode($results);\n\t\tfile_put_contents($this->facturacion_path(\"/xml/request-tiposiva.xml\"), $client->__getLastRequest());\n\t\tfile_put_contents($this->facturacion_path(\"/xml/response-tiposiva.json\"), $json_obj);\n\t\tif (is_soap_fault($results)) {\n\t\t\texit(\"SOAP Fault: \" . $results->faultcode . \"\\n\" . $results->faultstring . \"\\n\");\n\t\t}\n\n\t\t#LEEMOS LOS DATOS\n\t}", "public function testSetValoriseCp() {\n\n $obj = new Bulletins();\n\n $obj->setValoriseCp(10.092018);\n $this->assertEquals(10.092018, $obj->getValoriseCp());\n }", "public function setAnoFinal($iAnoFinal) {\n $this->iAnoFinal = $iAnoFinal;\n }", "public function setValorTotal ($iValorTotal) {\n $this->iValorTotal = $iValorTotal;\n }", "public function testSetIndCp() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setIndCp(10.092018);\n $this->assertEquals(10.092018, $obj->getIndCp());\n }", "public function testSetPeriodeEmploiFin() {\n\n // Set a Date/time mock.\n $periodeEmploiFin = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationExtras();\n\n $obj->setPeriodeEmploiFin($periodeEmploiFin);\n $this->assertSame($periodeEmploiFin, $obj->getPeriodeEmploiFin());\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "public static function actualizaPuntuacion($val, $id){\n $producto = null;\n $producto = GestionProducto::guardarProducto($id);\n $producto['puntos'] = (($producto['puntos'] * $producto['num_votaciones']) + $val)/($producto['num_votaciones']+1);\n $producto['num_votaciones']= $producto['num_votaciones']+1;\n\n $prod = Product::actualizapuntos($producto);\n \n }", "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualNivA');\n if($paginaActual==null)\n Session::put('paginaActualNivA',1);\n }", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualEstI');\n if($paginaActual==null)\n Session::put('paginaActualEstI',1);\n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function getPorcetanjeAttribute()\n {\n \n $finalizadas = $this->countact($this->id,'FINALIZADA')->value;\n $asignadas = $this->countact($this->id,'')->value;\n\n //$finalizadas = (empty($this->countact($this->id,'FINALIZADA')->value)) ? \"0\": $this->countact($this->id,'FINALIZADA')->value; \n //$asignadas = (empty($this->countact($this->id,'')->value)) ? \"1\": $this->countact($this->id,'')->value;\n\n $porcentaje = round($finalizadas / $asignadas * 100,2);\n\n return $porcentaje;\n }", "public function getValorAprovacao() {\n return $this->mValorAprovacao;\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "function conf__form_pi(toba_ei_formulario_ml $form)\r\n\t{\r\n $datos=$this->controlador()->dep('datos')->tabla('participacion_inv')->get_filas();\r\n if(isset($datos)){\r\n $form->set_datos($datos);\r\n }\r\n\t}", "public function setAvaliacaoResultadoFinal(AvaliacaoResultadoFinal $oAvaliacaoResultadoFinal) {\n\t\t$this->oAvaliacaoResultadoFinal = $oAvaliacaoResultadoFinal;\n\t}", "private function inizVarContratto(){\r\n $this->varWork=$this->post('data');\r\n $giorni=$this->post('giorni');\r\n $giorni[0]=0;\r\n $this->giorni=$giorni;\r\n $this->setTime();\r\n $this->setDate();\r\n $this->setIdPrenotazione();\r\n }", "public function actualizar_estado_cartera(){\n // Actualizar las cartera con fechas inferior a hoy y con estado distinto a Pagada\n TesoPlanPagosEstudiante::where('fecha_vencimiento','<', date('Y-m-d'))\n ->where('estado','<>', 'Pagada')\n ->update(['estado' => 'Vencida']);\n }", "public function setFecha_efectiva_parto($fecha_efectiva_parto)\r\n\t{\r\n\t\t$this->fecha_efectiva_parto = $fecha_efectiva_parto;\r\n\t}", "public function testSetParticipServPers() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipServPers(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipServPers());\n }", "public function set_valor($id, $valor);", "private function asigna_val(){\n \t//asigna variables del archivo\n \t$this->nombre = $this->archivo[\"name\"];\n \t$this->tipo = $this->archivo[\"type\"];\n \t\n \t$this->tamano = $this->archivo[\"size\"];\n \t$this->dimensiones = getimagesize($this->ruta_temporal);\n \t$this->alto = $this->dimensiones[1];\n \t$this->ancho = $this->dimensiones[0];\n\n \t$this->origen = $this->ruta_temporal;\n \t$this->destino = $this->destino.$this->nombre;\n\n \t$this->ruta_temporal = $this->archivo[\"tmp_name\"];\n\n \t/*if( $this->archivo[\"tmp_name\"] ){\n\n \t}else{\n\n \t}*/\n\n\n }", "function set_deposit_price()\n {\n $deposit_price = $this->input->post(\"deposit_price\");\n $this->sale_lib->set_deposit_price($deposit_price);\n \n $this->_reload();\n }", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function setFormaAprovacao($iFormaAprovacao) {\n\t $this->iFormaAprovacao = $iFormaAprovacao;\n\t}", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new DecTva3519();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function conseguirPrecio($clave_insumo_medico)\n {\n \n $precio_unitario = 0; \n $iva = 0;\n $tipo_insumo_id = 0;\n $response = array();\n\n $contrato_precio = ContratoPrecio::where('insumo_medico_clave',$clave_insumo_medico)->first();\n if($contrato_precio){\n $tipo_insumo_id = $contrato_precio->tipo_insumo_id;\n $precio_unitario = $contrato_precio->precio;\n if($contrato_precio->tipo_insumo_id == 3){\n $iva = $precio_unitario - ($precio_unitario/1.16 );\n }\n }\n\n $response['tipo_insumo_id'] = $tipo_insumo_id;\n $response['precio_unitario'] = $precio_unitario;\n $response['iva'] = $iva;\n\n return $response;\n }", "public function testSetIntitSousTotalApec() {\n\n $obj = new OrgaGeneriques();\n\n $obj->setIntitSousTotalApec(\"intitSousTotalApec\");\n $this->assertEquals(\"intitSousTotalApec\", $obj->getIntitSousTotalApec());\n }", "public function setIdprovincia($p_idprovincia){\r\n\t$this->idprovincia=$p_idprovincia;\r\n}", "public function testSetAutresOpeTotal() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpeTotal(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpeTotal());\n }", "public function actionEditPrecioUnitario()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetallePedido');\r\n// /$_cantidad= $es->value;\r\n $es->onBeforeUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n $_precioUnitario= yii::app()->request->getParam('value');\r\n $_subtotal=$model->cantidad*$_precioUnitario;//calculando el subtotal\r\n $_impuesto=$_subtotal*((int)Yii::app()->params['impuesto']*0.01); //calculando impuesto\r\n $_total=$_subtotal+$_impuesto; //calculando total\r\n \r\n $event->sender->setAttribute('subtotal', $_subtotal);//Actualizando Cantidad\r\n $event->sender->setAttribute('impuesto', $_impuesto);//Actualizando impuesto\r\n $event->sender->setAttribute('total', $_total); //actualizando total\r\n \r\n };\r\n \r\n $es->update();\r\n }", "public function setVat($value);", "protected function salvarDadosResultado(AvaliacaoAproveitamento $oAvaliacaoAproveitamento) {\n\n $iAnoCalendario = $this->oRegencia->getTurma()->getCalendario()->getAnoExecucao();\n\n $GLOBALS[\"HTTP_POST_VARS\"][\"ed73_i_valornota\"] = '';\n $GLOBALS[\"HTTP_POST_VARS\"][\"ed73_c_valorconceito\"] = '';\n $GLOBALS[\"HTTP_POST_VARS\"][\"ed73_t_parecer\"] = '';\n\n $oDaoDiarioResultado = db_utils::getDao(\"diarioresultado\");\n $oDaoDiarioResultado->ed73_c_amparo = $oAvaliacaoAproveitamento->isAmparado() ? \"S\" : \"N\";\n $oDaoDiarioResultado->ed73_c_aprovmin = $oAvaliacaoAproveitamento->temAproveitamentoMinimo()?\"S\":\"N\";\n $oDaoDiarioResultado->ed73_i_procresultado = $oAvaliacaoAproveitamento->getElementoAvaliacao()->getCodigo();\n $oDaoDiarioResultado->ed73_i_diario = $this->getCodigoDiario();\n $oDaoDiarioResultado->ed73_i_numfaltas = $oAvaliacaoAproveitamento->getNumeroFaltas();\n $oDaoDiarioResultado->ed73_i_valornota = '';\n $oDaoDiarioResultado->ed73_c_valorconceito = '';\n $oDaoDiarioResultado->ed73_t_parecer = '';\n\n $oElementoAvaliacao = $oAvaliacaoAproveitamento->getElementoAvaliacao();\n $nValorAproveitamento = $oAvaliacaoAproveitamento->getValorAproveitamento()->getAproveitamento();\n $iTotalReprovacoesNoPeriodo = count($this->oDiario->getDisciplinasReprovadasNoPeriodo($oElementoAvaliacao));\n\n $lTemDireitoRecuperacao = true;\n $oRecuperacao = AvaliacaoPeriodicaRepository::getAvaliacaoDependente($oElementoAvaliacao);\n $sFormaAvaliacao = $oElementoAvaliacao->getFormaDeAvaliacao()->getTipo();\n\n /**\n * Disciplinas apenas com Frequencia nao tem direito a recuperacao\n */\n\n if (trim($this->getRegencia()->getFrequenciaGlobal()) == 'F') {\n\n $lTemDireitoRecuperacao = false;\n $oAvaliacaoAproveitamento->emRecuperacao(false);\n unset($oRecuperacao);\n }\n $iTotalDisciplinasRecuperacao = 0;\n if (!empty($oRecuperacao)) {\n\n $iTotalDisciplinasRecuperacao = $oRecuperacao->quantidadeMaximaDisciplinasParaRecuperacao();\n\n /**\n * Número máximo de Reprovações atingidas\n */\n $lTemDireitoRecuperacao = $iTotalDisciplinasRecuperacao > 0 && $iTotalReprovacoesNoPeriodo <= $iTotalDisciplinasRecuperacao;\n\n /**\n * Caso o aluno tenha algum aproveitamento na recuperacao, o mesmo nao deverá ficar mais em recuperaçã, pois\n * já concluiu o mesmo.\n */\n $oAproveitamentoNaRecuperacao = $this->oDiario->getDisciplinasPorRegenciaPeriodo($this->getRegencia(),\n $oRecuperacao\n );\n if (!empty($oAproveitamentoNaRecuperacao)) {\n\n if ($oAproveitamentoNaRecuperacao->getValorAproveitamento()->getAproveitamento() != \"\") {\n\n $oAvaliacaoAproveitamento->setEmRecuperacao(false);\n $lTemDireitoRecuperacao = false;\n }\n }\n }\n if ($this->oDiario->getMatricula()->isAvaliadoPorParecer()) {\n $sFormaAvaliacao = 'PARECER';\n }\n if (!$this->isEncerrado()) {\n\n $oResultadoAvaliacao = $oAvaliacaoAproveitamento->getElementoAvaliacao();\n $nAproveitamento = ''; \n $oAproveitamento = $oResultadoAvaliacao->getResultado($this->getAvaliacoes());\n if (!empty($oAproveitamento)) {\n $nAproveitamento = $oAproveitamento->getAproveitamento();\n }\n $nValorAproveitamento = ArredondamentoNota::arredondar($nAproveitamento, $iAnoCalendario);\n\n \n /**\n * Validação necessária para tratamento do Resultado Final tratando o tipo de avaliação\n */\n switch ($sFormaAvaliacao) {\n \n /**\n * NOTA:> Temos que avaliar o valor definido para aproveitamento mínimo\n */\n case 'NOTA':\n \n $oAvaliacaoAproveitamento->setAproveitamentoMinimo(true);\n $oAvaliacaoAproveitamento->setEmRecuperacao(false);\n if ( !empty( $nValorAproveitamento ) && $nValorAproveitamento < $oResultadoAvaliacao->getAproveitamentoMinimo() ) {\n\n\n if (!empty($oRecuperacao) && $lTemDireitoRecuperacao) {\n $oAvaliacaoAproveitamento->setEmRecuperacao(true);\n }\n $oAvaliacaoAproveitamento->setAproveitamentoMinimo(false);\n }\n break;\n \n /**\n * NIVEL:> Temos que avaliar a ordem das avaliações\n */\n case 'NIVEL':\n\n $oAvaliacaoAproveitamento->setAproveitamentoMinimo(true);\n $oAvaliacaoAproveitamento->setEmRecuperacao(false);\n if ( $oAvaliacaoAproveitamento->getValorAproveitamento()->hasOrdem() && \n $oAvaliacaoAproveitamento->getValorAproveitamento()->getOrdem() < $oResultadoAvaliacao->getFormaDeAvaliacao()->getConceitoMinimo()->iOrdem ) {\n\n if (!empty($oRecuperacao) && $lTemDireitoRecuperacao) {\n $oAvaliacaoAproveitamento->setEmRecuperacao(true);\n }\n $oAvaliacaoAproveitamento->setAproveitamentoMinimo(false);\n } \n break;\n /**\n * PARECER:> Sempre de acordo com informado\n */\n case 'PARECER':\n break;\n \n }\n }\n\n switch ($sFormaAvaliacao) {\n\n case 'NOTA':\n \n $oDaoDiarioResultado->ed73_i_valornota = \"{$nValorAproveitamento}\";\n break;\n\n case 'NIVEL':\n\n $oDaoDiarioResultado->ed73_c_valorconceito = $nValorAproveitamento;\n break;\n\n case 'PARECER':\n \n $oDaoDiarioResultado->ed73_t_parecer = $nValorAproveitamento;\n break;\n }\n\n if ($oAvaliacaoAproveitamento->getCodigo() == '') {\n\n $oDaoDiarioResultado->incluir(null);\n $oAvaliacaoAproveitamento->setCodigo($oDaoDiarioResultado->ed73_i_codigo);\n } else {\n\n $oDaoDiarioResultado->ed73_i_codigo = $oAvaliacaoAproveitamento->getCodigo();\n $oDaoDiarioResultado->alterar($oDaoDiarioResultado->ed73_i_codigo);\n }\n if ($oDaoDiarioResultado->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar Resultado da avaliacao \");\n }\n\n /**\n * Excluimos a informacao da recuperacao\n */\n $oDaoDiarioResultadoRecuperacao = new cl_diarioresultadorecuperacao();\n $oDaoDiarioResultadoRecuperacao->excluir(null, \"ed116_diarioresultado = {$oAvaliacaoAproveitamento->getCodigo()}\");\n if ($oDaoDiarioResultadoRecuperacao->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar Resultado da avaliacao \");\n }\n\n if ($oAvaliacaoAproveitamento->emRecuperacao()) {\n\n $oDaoDiarioResultadoRecuperacao = new cl_diarioresultadorecuperacao();\n $oDaoDiarioResultadoRecuperacao->ed116_diarioresultado = $oAvaliacaoAproveitamento->getCodigo();\n $oDaoDiarioResultadoRecuperacao->incluir(null);\n if ($oDaoDiarioResultadoRecuperacao->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar Resultado da avaliacao \");\n }\n }\n\n\n $oDaoParecerPadronizado = db_utils::getDao(\"parecerresult\");\n $oDaoParecerPadronizado->excluir(null, \" ed63_i_diarioresultado = {$oAvaliacaoAproveitamento->getCodigo()}\");\n if ($oAvaliacaoAproveitamento->getParecerPadronizado() != \"\") {\n\n $oDaoParecerPadronizado->ed63_i_diarioresultado = $oAvaliacaoAproveitamento->getCodigo();\n $oDaoParecerPadronizado->ed63_t_parecer = trim($oAvaliacaoAproveitamento->getParecerPadronizado());\n $oDaoParecerPadronizado->incluir(null);\n if ($oDaoParecerPadronizado->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar dados do parecer padronizado do resultado\\n{$oDaoParecerPadronizado->erro_msg}\");\n }\n }\n\n if ($oAvaliacaoAproveitamento->getElementoAvaliacao()->geraResultadoFinal()) {\n\n $oAvaliacaoResultadoFinal = $this->getResultadoFinal();\n $nPercentualPresenca = $this->calcularPercentualFrequencia();\n $sResultadoFrequencia = 'A';\n\n $sFormaControleFrequenciaDisciplina = $this->oRegencia->getFrequenciaGlobal();\n if ($oAvaliacaoAproveitamento->getElementoAvaliacao()->reprovaPorFrequencia()\n && $sFormaControleFrequenciaDisciplina <> 'A') {\n\n $nPercentualMinimoFrequencia = $this->oDiario->getProcedimentoDeAvaliacao()->getPercentualFrequencia();\n if ($nPercentualPresenca < $nPercentualMinimoFrequencia) {\n $sResultadoFrequencia = 'R';\n }\n }\n $oAvaliacaoResultadoFinal->setResultadoAvaliacao($oAvaliacaoAproveitamento->getElementoAvaliacao());\n\n /**\n * Se o tipo da Avaliacao for PARECER não salvamos o aproveitamento e sim a palavre 'Parecer'\n */\n $sTipoAvaliacao = $oAvaliacaoAproveitamento->getElementoAvaliacao()->getFormaDeAvaliacao()->getTipo();\n if ($this->oDiario->getMatricula()->isAvaliadoPorParecer()) {\n $sTipoAvaliacao = 'PARECER';\n }\n if ($sTipoAvaliacao == 'PARECER') {\n $nValorAproveitamento = 'Parecer';\n }\n $sResultadoFinal = '';\n $sResultadoAprovacao = '';\n if ($nValorAproveitamento != '') {\n\n $sResultadoAprovacao = $oAvaliacaoAproveitamento->temAproveitamentoMinimo()?\"A\":\"R\";\n if ($sFormaControleFrequenciaDisciplina == 'F') {\n $sResultadoAprovacao = '';\n }\n\n if ($sResultadoAprovacao <> 'R' && $sResultadoFrequencia <> 'R') {\n $sResultadoFinal = 'A';\n } else {\n $sResultadoFinal = 'R';\n }\n }\n $oAmparo = $this->getAmparo();\n if ($oAmparo != null && $oAmparo->isTotal()) {\n $sResultadoFinal = 'A';\n }\n \n foreach ( $this->getDiario()->getTurma()->getEtapas() as $oEtapaTurma ) {\n \n if ( $oEtapaTurma->getEtapa()->getCodigo() == $this->getDiario()->getMatricula()->getEtapaDeOrigem()->getCodigo()\n && $oEtapaTurma->temAprovacaoAutomatica() ) {\n \n $sResultadoAprovacao = \"A\";\n $sResultadoFinal = \"A\";\n $sResultadoFrequencia = \"A\";\n }\n }\n \n $oAvaliacaoResultadoFinal->setValorAprovacao($nValorAproveitamento);\n $oAvaliacaoResultadoFinal->setResultadoAprovacao($sResultadoAprovacao);\n $oAvaliacaoResultadoFinal->setResultadoFinal($sResultadoFinal);\n $oAvaliacaoResultadoFinal->setPercentualFrequencia($nPercentualPresenca);\n $oAvaliacaoResultadoFinal->setResultadoFrequencia($sResultadoFrequencia);\n $oAvaliacaoResultadoFinal->salvar();\n }\n }", "public function _setAltura($altura)\n {\n $this->altura = $altura;\n }", "public function setValorCampo($valor){\r\n $this->valor_campo = $valor;\r\n }", "public function __set($atributo, $valor) {\n $this->$atributo = $valor;\n }", "public function setAtiTotal($atiTotal);", "function setFechaVisitaPoi($fechaVisitaPoi) {\n $this->fechaVisitaPoi = $fechaVisitaPoi;\n }", "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "function editDesplazamiento(){\n\t\tif($this->params['cod_interno'])\n\t\t\tTPersona::setCiudadDesplazado($this->params['cod_interno'], $this->params['desplazamiento']['cod_ciudad']);\n\t}", "public function testSetPourcentageImp() {\n\n $obj = new Etablissements();\n\n $obj->setPourcentageImp(10.092018);\n $this->assertEquals(10.092018, $obj->getPourcentageImp());\n }", "protected function salvarDadosAvaliacao(AvaliacaoAproveitamento $oAvaliacaoAproveitamento) {\n\n $oDaoDiarioAvaliacao = db_utils::getDao(\"diarioavaliacao\");\n $oDaoDiarioAvaliacao->ed72_c_amparo = $oAvaliacaoAproveitamento->isAmparado() ? \"S\" : \"N\";\n $oDaoDiarioAvaliacao->ed72_c_aprovmin = $oAvaliacaoAproveitamento->temAproveitamentoMinimo()?\"S\":\"N\";\n $oDaoDiarioAvaliacao->ed72_c_tipo = $oAvaliacaoAproveitamento->getTipo();\n $oDaoDiarioAvaliacao->ed72_i_procavaliacao = $oAvaliacaoAproveitamento->getElementoAvaliacao()->getCodigo();\n $oDaoDiarioAvaliacao->ed72_i_diario = $this->getCodigoDiario();\n $oDaoDiarioAvaliacao->ed72_i_escola = $oAvaliacaoAproveitamento->getEscola()->getCodigo();\n $oDaoDiarioAvaliacao->ed72_i_numfaltas = $oAvaliacaoAproveitamento->getNumeroFaltas();\n $oDaoDiarioAvaliacao->ed72_i_valornota = '';\n $oDaoDiarioAvaliacao->ed72_c_valorconceito = '';\n $oDaoDiarioAvaliacao->ed72_t_parecer = '';\n $oDaoDiarioAvaliacao->ed72_t_obs = $oAvaliacaoAproveitamento->getObservacao();\n $oDaoDiarioAvaliacao->ed72_c_convertido = $oAvaliacaoAproveitamento->isConvertido() ? 'S' : 'N';\n\n $nValorAproveitamento = $oAvaliacaoAproveitamento->getValorAproveitamento()->getAproveitamento();\n $oElementoAvaliacao = $oAvaliacaoAproveitamento->getElementoAvaliacao();\n $sFormaAvaliacao = $oElementoAvaliacao->getFormaDeAvaliacao()->getTipo();\n if ($this->oDiario->getMatricula()->isAvaliadoPorParecer()) {\n $sFormaAvaliacao = 'PARECER';\n }\n switch ($sFormaAvaliacao) {\n\n case 'NOTA':\n\n $oDaoDiarioAvaliacao->ed72_i_valornota = \"{$nValorAproveitamento}\";\n break;\n\n case 'NIVEL':\n\n $oDaoDiarioAvaliacao->ed72_c_valorconceito = \"{$nValorAproveitamento}\";\n break;\n\n case 'PARECER':\n\n $oDaoDiarioAvaliacao->ed72_t_parecer = pg_escape_string((\"{$nValorAproveitamento}\"));\n break;\n }\n\n if ($sFormaAvaliacao != 'PARECER') {\n $oDaoDiarioAvaliacao->ed72_t_parecer = pg_escape_string((\"{$oAvaliacaoAproveitamento->getParecer()}\"));\n }\n\n if ($nValorAproveitamento < $oElementoAvaliacao->getAproveitamentoMinimo()) {\n $oDaoDiarioAvaliacao->ed72_c_aprovmin = 'N';\n }\n /**\n * Quando aluno amparado, sempre tem aproveitamento minimo;\n */\n if ($oAvaliacaoAproveitamento->isAmparado()) {\n $oDaoDiarioAvaliacao->ed72_c_aprovmin = 'S';\n }\n\n if ($oAvaliacaoAproveitamento->getCodigo() == '') {\n\n $oDaoDiarioAvaliacao->ed72_c_convertido = 'N';\n $oDaoDiarioAvaliacao->incluir(null);\n $oAvaliacaoAproveitamento->setCodigo($oDaoDiarioAvaliacao->ed72_i_codigo);\n } else {\n\n $oDaoDiarioAvaliacao->ed72_i_codigo = $oAvaliacaoAproveitamento->getCodigo();\n $oDaoDiarioAvaliacao->alterar($oDaoDiarioAvaliacao->ed72_i_codigo);\n }\n if ($oDaoDiarioAvaliacao->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar aproveitamento da avaliação\");\n }\n\n $oDaoParecerPadronizado = db_utils::getDao(\"pareceraval\");\n $oDaoParecerPadronizado->excluir(null,\" ed93_i_diarioavaliacao = {$oAvaliacaoAproveitamento->getCodigo()}\");\n if ($oAvaliacaoAproveitamento->getParecerPadronizado() != \"\") {\n\n $oDaoParecerPadronizado->ed93_i_diarioavaliacao = $oAvaliacaoAproveitamento->getCodigo();\n $oDaoParecerPadronizado->ed93_t_parecer = trim($oAvaliacaoAproveitamento->getParecerPadronizado());\n $oDaoParecerPadronizado->incluir(null);\n if ($oDaoParecerPadronizado->erro_status == 0) {\n throw new BusinessException(\"Erro ao salvar dados do parecer padronizado da avaliacao\\n{$oDaoParecerPadronizado->erro_msg}\");\n }\n }\n }", "function set_resaltar_siempre_dia_actual($resaltar)\n\t{\n\t\t$this->siempre_resalta_dia_actual = $resaltar;\n\t}", "public function setFinal(DerivationType $value): void\n {\n $this->finalAttr = $value;\n }", "abstract public function setValorTransacao($valor);", "public function setPrecio($value){\n\t\tif($this->validateMoney($value)){\n\t\t\t$this->precio = $value;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function fnSetPaginaActual(){\n $paginaActual = Session::get('paginaActualR');\n if($paginaActual==null)\n Session::put('paginaActualR',1);\n }", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n }", "public function testSetTvaFictive4() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive4(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive4());\n }", "public function setVTipo($vTipo)\n{\n$this->vTipo = $vTipo;\n\nreturn $this;\n}", "public function setDataFim($valor){\n\t\t\t$this->dataFim = $valor;\n\t\t}", "public function setFechalecturaAttribute($valor){\n $this->attributes['fechalectura'] = strlen($valor)? Carbon::createFromFormat('d/m/Y', $valor) : null;\n }", "public function setPrecioProducto($precioProducto){\n $this->precioProducto = $precioProducto;\n }", "public function testSetFacturationPaiePrec() {\n\n // Set a Date/time mock.\n $facturationPaiePrec = new DateTime(\"2018-09-10\");\n\n $obj = new Clients();\n\n $obj->setFacturationPaiePrec($facturationPaiePrec);\n $this->assertSame($facturationPaiePrec, $obj->getFacturationPaiePrec());\n }", "public function insertVentaCredito($listaProducto, $companyID, $userCompanyID, $cliente, $datosIva){\n $total = 0;\n $subTotal = 0;\n $iva = 0;\n $dataSalesDetails = array();\n foreach($listaProducto as $fila) {\n $datosProductos = $this->productos_model->getSingleProduct($fila[\"ProductID\"], $companyID);\n $datosProductos = $datosProductos[0];\n $subTotal = $subTotal + $datosProductos->precio * $fila[\"cantidad\"];\n if($datosProductos->taxFree == \"1\")\n $iva = $iva + ($datosProductos->precio * $fila[\"cantidad\"] * ($datosIva->porcentaje/100));\n //$total = $total + ($datosProductos->precio * $fila[\"cantidad\"]) + ($datosProductos->precio * $fila[\"cantidad\"] * ($datosIva->porcentaje/100));\n /*}else{\n $total = $total + ($datosProductos->precio * $fila[\"cantidad\"]);\n } */\n $dataSalesDetails[] = array(\n 'saleID' => 0,\n 'companyID' => $companyID,\n 'productID' => $fila[\"ProductID\"],\n 'precio' => $datosProductos->precio,\n 'cantidad'=> $fila[\"cantidad\"],\n 'iva' => ($datosProductos->taxFree == \"1\")?$datosProductos->precio * $fila[\"cantidad\"] * ($datosIva->porcentaje/100):0.00\n );\n }\n $total = $subTotal + $iva;\n $fecha = getdate();\n $fechaNow = $fecha[\"year\"] . '-' . (($fecha[\"mon\"] < 10)?\"0\".$fecha[\"mon\"]:$fecha[\"mon\"]) . '-' . (($fecha[\"mday\"] < 10)?\"0\".$fecha[\"mday\"]:$fecha[\"mday\"]) . ' ' . (($fecha[\"hours\"] < 10) ? \"0\". $fecha[\"hours\"] : $fecha[\"hours\"]) . ':' . (($fecha[\"minutes\"] < 10) ? \"0\".$fecha[\"minutes\"] : $fecha[\"minutes\"]) . ':' . (($fecha[\"seconds\"] < 10) ? \"0\".$fecha[\"seconds\"] : $fecha[\"seconds\"]);\n $dataSales = array(\n 'companyID' => $companyID,\n 'usercompanyID' => $userCompanyID,\n 'fecha' => $fechaNow,\n 'subtotal' => $subTotal,\n 'iva' => $iva,\n 'total' => $total,\n 'customerID' => $cliente[\"customerID\"],\n 'cancelada' => 0,\n 'contado' => 0\n );\n $this->db->trans_start();\n $this->db->insert('sales', $dataSales);\n $id = $this->db->insert_id();\n for($i = 0; $i < sizeof($dataSalesDetails); $i++){\n $dataSalesDetails[$i][\"saleID\"] = $id;\n }\n $this->db->insert_batch('salesdetails', $dataSalesDetails);\n $this->db->query(\"update customers set saldo = saldo + \". $total .\" where companyID = \". $companyID .\" and customerID = \". $cliente[\"customerID\"]);\n $this->db->trans_complete();\n return $id;\n }", "public function testSetAutresOpe4() {\n\n $obj = new DecTva3519();\n\n $obj->setAutresOpe4(10.092018);\n $this->assertEquals(10.092018, $obj->getAutresOpe4());\n }", "public function setProvincia($p_provincia){\r\n\t$this->provincia=$p_provincia;\r\n}", "public function actualizarporcentajeAction()\n {\n $request= $this->getRequest();\n $id_actividad_desempeno=$request->get('id_actividad_desempeno');\n $porcentaje=$request->get('porcentaje');\n $actividad_desempeno=$this->getDoctrine()->getRepository(\"NetpublicCoreBundle:ActividadDesempeno\")->find($id_actividad_desempeno);\n $actividad_desempeno->setPorcentaje($porcentaje);\n $em= $this->getDoctrine()->getEntityManager();\n $em->persist($actividad_desempeno);\n $em->flush();\n \n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\");\n \n }", "public function inativa()\n {\n $this->status = 0;\n }", "public function escolherSetorVida()\n {\n $profissional = $this->input->get(\"p\");\n\n if($profissional != 1)\n {\n redirect('jogo/consultaVirtual');\n }\n\n $dados = $this->getDadosTelaInicial();\n \n // carrega o template\n $this->template->view(\"automatico_escolher_setor_vida\", array(\n \"title\" => \"Auto Consulta\",\n \"verticalTabs\" => true,\n \"jogosConsultaVirtual\" => $dados['jogosConsultaVirtual'],\n \"jogosAutoConsulta\" => $dados['jogosAutoConsulta'],\n \"setoresVida\" => $dados['setoresVida'],\n \"profissional\" => $profissional,\n \"codUsuarioCombinacao\" => $dados['codUsuarioCombinacao'],\n \"menuLateral\" => false\n ));\n }", "public function setPesoAttribute($input)\n {\n if ($input != '') {\n $this->attributes['peso'] = $input;\n } else {\n $this->attributes['peso'] = null;\n }\n }", "function setId_tarifa($iid_tarifa = '')\n {\n $this->iid_tarifa = $iid_tarifa;\n }", "public function setValorAtual($nValorAtual = 0);", "public function setentidadFederativaClaveAttribute($clave)\n {\n $array = $this->catalogo->inegiEntidades($clave);\n\n $this->attributes['entidadFederativa_clave'] = $array->Cve_Ent;\n $this->attributes['entidadFederativa_valor'] = $array->Nom_Ent;\n }", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "public function setObjetivo($objetivo){\n $this->objetivo = $objetivo;\n }", "public function setObjetivo($objetivo){\n $this->objetivo = $objetivo;\n }", "function avaliacaoAvaliadorDTO() {\n\n}", "public function testSetProvCp() {\n\n $obj = new Bulletins();\n\n $obj->setProvCp(10.092018);\n $this->assertEquals(10.092018, $obj->getProvCp());\n }", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->subcategoria=$_POST['subcategoria'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->estado=$_POST['estado'];\n\t}", "public function testSetPeriode() {\n\n // Set a Date/time mock.\n $periode = new DateTime(\"2018-09-10\");\n\n $obj = new HistoPaieAnal();\n\n $obj->setPeriode($periode);\n $this->assertSame($periode, $obj->getPeriode());\n }", "public function testSetTvaFictive2() {\n\n $obj = new DecTva3519();\n\n $obj->setTvaFictive2(10.092018);\n $this->assertEquals(10.092018, $obj->getTvaFictive2());\n }" ]
[ "0.7561017", "0.70456547", "0.6717546", "0.5586718", "0.53068656", "0.5272836", "0.5272836", "0.5182173", "0.5182173", "0.51817644", "0.5169349", "0.51454467", "0.51048833", "0.50942415", "0.50800043", "0.5078755", "0.507136", "0.50449777", "0.5025587", "0.5013701", "0.50045156", "0.49881768", "0.4982768", "0.49788344", "0.49663022", "0.49580732", "0.4948343", "0.49397892", "0.49217835", "0.49165714", "0.4913623", "0.49032137", "0.48700655", "0.48491547", "0.4848935", "0.48349786", "0.4833512", "0.4833512", "0.48277122", "0.4827699", "0.482039", "0.47982535", "0.47914046", "0.47853324", "0.47853062", "0.47765863", "0.47727472", "0.47681722", "0.47614905", "0.47530785", "0.47463688", "0.47459972", "0.4726993", "0.4726993", "0.47255152", "0.47194558", "0.47172293", "0.47121775", "0.47076568", "0.47075957", "0.47041994", "0.4702817", "0.4695195", "0.469435", "0.46897653", "0.4688776", "0.4687568", "0.46868345", "0.46842948", "0.46766773", "0.46732488", "0.46726772", "0.46685374", "0.4665901", "0.46639484", "0.46637014", "0.4649855", "0.46482047", "0.46481147", "0.46480873", "0.46477497", "0.46473634", "0.46379247", "0.46376744", "0.4637634", "0.46351904", "0.46298796", "0.46271816", "0.46122706", "0.46122506", "0.46053204", "0.46014366", "0.4600153", "0.4596434", "0.4596434", "0.45957816", "0.45884237", "0.45855653", "0.45844558", "0.45792323" ]
0.77785754
0
Get the value of moneda
Получить значение moneda
public function getMoneda() { return $this->moneda; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValueWord();", "public function getMonedaId()\n {\n return $this->moneda_id;\n }", "public function getSearchValue();", "public function monedaPredeterminada(){\n\t\t\t$Conexion = new dataBaseConn();\n\t\t\t$query = $Conexion -> prepare(\"SELECT m.nombre_moneda FROM moneda m INNER JOIN configuracion_default confD ON m.id_moneda = confD.tipo_de_cambio\");\n\t\t\t$query -> execute();\n\t\t\t$result = $query -> fetch();\n\t\t\treturn $result;\n\t\t}", "public function word(){ return $this->word; }", "public function getTextValue()\n {\n return $this->textValue;\n }", "public function getSearchTerm();", "function txt($token) {\n\t\tglobal $language_name;\n\t\tstatic $language = null;\n\t\tif (!$language) {\n\t\t\tif ($language_name == \"es\") {\n\t\t\t\t$language = new Language\\Spanish;\t\t// Spanish default at the moment\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$language = new Language\\English;\n\t\t\t}\n\t\t}\n\t\t$result = $language->get($token);\n\t\tif (!$result) {\n\t\t\tstatic $english = null;\n\t\t\t$english = new Language\\English;\n\t\t\t$result = $english->get($token);\n\t\t}\n\t\treturn htmlentities($result,ENT_IGNORE,\"ISO-8859-1\");\n\t}", "static function get($id){\n \t$query = \"SELECT * FROM cloto_text where id = $id;\";\n $resuts = dbQuery($query);\n $valor = $resuts[0][\"value\"];\n return $valor;\n }", "public static function moneda($value)\r\n {\r\n return Yii::app()->numberFormatter->format(\"¤ #.00\",(float) $value, Yii::t('app', '$'));\r\n }", "function get_text(){\n return $this->text;\n }", "public function getText(): string;", "public function getText(): string;", "public function getTexto() {\n return $this->texto;\n }", "public function getSearchTerm() : string;", "public function getText();", "public function getText();", "public function getText();", "public function getTexto()\n {\n return $this->texto;\n }", "public function getTexto()\n {\n return $this->texto;\n }", "public function getTexto()\n {\n return $this->texto;\n }", "public function result_text()\n {\n $key = \"Fish\" ; \n $keyword = 'designTool' ; \n $arr= DataProvider::get($key,$keyword);\n if($arr == false)\n {\n return null;\n }\n else\n { \n $rate = array ();\n foreach($arr as $key => $value)\n {\n $rate[$key] = $value['Per']; \n }\n $index = Common::randomIndex($rate);\n return $arr[$index] ;\n }\n }", "public function obtenerMoneda($id) {\n\t\t\n $this->db->where('id', $id);\n $query = $this->db->get('coins');\n if ($query->num_rows() > 0)\n return $query->result();\n else\n return $query->result();\n \n }", "function getTexto() {\n return $this->texto;\n }", "public function getText() { return $this->_text; }", "public function getTextao()\r\n\t{\r\n\t\treturn $this->textao;\r\n\t}", "public function getText()\n {\n return $this->getSearchText();\n }", "final public function getTextValue(): string\n {\n return $this->getAllExisting()[$this->state];\n }", "public function getText(){\n\t\treturn($this->text);\n\t}", "function getFullText();", "public function getValue() : string;", "public function getValue() : string;", "public function getText(): string\n {\n return $this->text->getValue();\n }", "public function getValue(): string;", "public function getValue(): string;", "public function getValue(): string;", "public function getText(){\n\t\treturn $this->_text;\n\t}", "public function getValue()\n\t{\n\t\treturn Text::plain(urldecode($this->getAttribute('value')));\n\t}", "public function getValue()\n {\n return $this->token;\n }", "public function getWikiText() {\n\t\treturn $this->textbox1;\n\t}", "public function value()\n {\n return $this->searchQuery;\n }", "public function getTermText()\n {\n return $this->_termText;\n }", "function convertir_moneda($valor){\n\t\t//echo \"Entro: \".$valor;\n\t\t$sql=\"SELECT * FROM configuracion\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado=mysql_fetch_array($consulta);\n\t\tif(isset($_SESSION['moneda_temp']) && $_SESSION['moneda_temp']==\"dollar\")\n\t\t\t$valor=ceil($valor/$resultado['dolar_conf']);\n\t\tif(isset($_SESSION['moneda_temp']) && $_SESSION['moneda_temp']==\"euro\")\n\t\t\t$valor=ceil($valor/$resultado['euro_conf']);\n\t\treturn $valor;\n\t}", "public static function getFrase(){\n //getter statico não usa o this usa-se o self::$atributo\n return self::$frase;\n }", "function GetValueText()\r\n\t{\r\n\t\tswitch ($this->m_type)\r\n\t\t{\r\n\t\t\tcase 1: // text\t\r\n\t\t\tcase 5:\t// textarray\r\n\t\t\tcase 2: // radeo\r\n\t\t\tcase 3: // chekbox\r\n\t\t\t\treturn $this->m_value;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: // select\r\n\t\t\tcase 7: // list\r\n\t\t\t\treturn $this->m_valueList[$this->m_value];\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function get_text()\n {\n }", "function moeda($string, $cifrao=TRUE)\n {\n return Oraculum_Text::moeda($string, $cifrao);\n }", "public function frase()\n {\n $cadena = \"\";\n foreach ($this->frase as $palabra) {\n $cadena.=$palabra[0];\n }\n return $cadena;\n }", "function getText():DynamicValue\n {\n return $this->text;\n }", "public function getText()\n {\n return $this->text;\n }", "public function getText()\n {\n return $this->text;\n }", "public function getText() {\n return $this->text;\n }", "public function getTranslationValue()\n {\n return isset($this->match[2]) ? $this->match[2] : NULL;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getText()\n\t{\n\t\n\t\treturn $this->text;\n\t\n\t}", "public function getSword() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getText(){\n\t\treturn $this->getContent(0);\n\t}", "public function get_text(){\n\t\treturn $this->arr_text;\n\t}", "public function getTerm()\n {\n return $this->term;\n }" ]
[ "0.7256454", "0.6368465", "0.60100985", "0.59747434", "0.59688497", "0.59635204", "0.5933703", "0.58615774", "0.5757709", "0.57411605", "0.5738412", "0.5723115", "0.5723115", "0.5720539", "0.5716753", "0.5708091", "0.5708091", "0.5708091", "0.57080877", "0.57080877", "0.57080877", "0.5702948", "0.5693968", "0.56749254", "0.56620157", "0.5651905", "0.5637847", "0.5633221", "0.5632437", "0.5603243", "0.55999404", "0.55999404", "0.5594488", "0.5592944", "0.5592944", "0.5592944", "0.5590513", "0.5569086", "0.5567417", "0.5549372", "0.5537905", "0.5517709", "0.5514256", "0.54938936", "0.54928946", "0.5492491", "0.54909015", "0.5476769", "0.54717714", "0.5446258", "0.5446258", "0.5445723", "0.54420626", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.5440778", "0.54400545", "0.5428217", "0.54143035", "0.54143035", "0.54143035", "0.54143035", "0.54143035", "0.54102623", "0.5409066", "0.54076487" ]
0.7407049
0
Get the value of bien
Получить значение bien
public function getBien() { return $this->bien; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBishopValue();", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getVal();", "public function getBagian()\n {\n return $this->db->get(\"bagian_karyawan\")->result();\n }", "public function getValue(){return $this->value;}", "public function value() {}", "public function value() {}", "public function value() {}", "public function value() {}", "public function get_value() : string\n {\n }", "public function value();", "public function value();", "public function value();", "public function value();", "public function value();", "public function bValue() {\n\t\treturn $this->column('b_value');\n\t}", "public function bong(){\n return $this->getStone(); \n }", "public function getBolsa()\n{\nreturn $this->bolsa;\n}", "public function getValue(): string;", "public function getValue(): string;", "public function getValue(): string;", "public function getLien()\n {\n return $this->lien;\n }", "public function getValue(){\n\t\treturn $this->value;\n\t}", "public function getIntbuomsale()\n {\n return $this->intbuomsale;\n }", "public function get_value()\n { \n return $this->value;\n }", "public abstract function getValue();", "public function getValue() {\n\n\t \t\t return $this->value;\n\t }", "public function getValue() {return $this->_value; }", "public function getValue()\n {\n }", "public function getValue()\n {\n }", "public function getValue()\n {\n }", "abstract public function getValue();", "public function getValue() {\n\n return $this->value;\n\n }", "public function getRookValue();", "function get_value() {\n\t\treturn $this->value;\n\t}", "public function getValue()\n\t\t{\n\t\t\treturn $this->trade_value;\n\t\t}", "public function getBookValue()\n\t\t{\n\t\t\treturn $this->book_value;\n\t\t}", "public function getValue() : string;", "public function getValue() : string;", "public function getBatiment()\n {\n return $this->batiment;\n }", "public function getNamaBelakang(){\n return $this->nama_belakang;\n }", "function getValue() {\n return $this->value;\n }", "public function getValue() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"value\");\n\t}", "public function getPayPalBasketVatValue()\n {\n }", "public function getValue(){\n\t\t\t# Return the value\n\t\t\treturn $this->value;\n\t\t}", "public function getValue()\n {\n return $this->value;\n }", "public function getValue(){\n\t\treturn $this->svalue;\n\t}", "abstract public function value();", "public function getValue() {\n\t return $this->value;\n\t}", "function getvalue() {\n\treturn $this->value;\n}", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() \n {\n return $this->value;\n }", "public function getValue() {\n return $this->get('value');\n }", "public function value(): mixed;", "protected function getValue()\n {\n }" ]
[ "0.6976307", "0.6633956", "0.6633956", "0.6633956", "0.6633956", "0.6633956", "0.66206115", "0.66206115", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6553521", "0.6377577", "0.636097", "0.6344518", "0.6330387", "0.6330387", "0.6330387", "0.6330387", "0.6315301", "0.6270909", "0.6270909", "0.6270909", "0.6270909", "0.6270909", "0.6263848", "0.6259378", "0.6252884", "0.62444985", "0.62444985", "0.62444985", "0.6239299", "0.6223534", "0.6211746", "0.61909527", "0.6180938", "0.6174522", "0.61689025", "0.61602896", "0.61602896", "0.61602896", "0.61591893", "0.61416173", "0.6136685", "0.61221063", "0.611987", "0.61167955", "0.61106145", "0.61106145", "0.6101513", "0.6094203", "0.6085938", "0.60838425", "0.606965", "0.6053139", "0.60514677", "0.604882", "0.6045902", "0.60392296", "0.6035956", "0.6030761", "0.6030761", "0.60259956", "0.6016279", "0.6001832", "0.60009325" ]
0.7581249
0
check if current page is dark schema body
проверить, является ли текущая страница темной схемой фона
function videopro_is_body_dark_schema(){ if(is_page()){ $schema = get_post_meta(get_the_ID(), 'body_schema', true); if(isset($schema) && $schema != ''){ if($schema == 'dark') return true; return false; } else { $schema = ot_get_option('body_schema', 'light'); if($schema == 'dark') return true; return false; } return false; } else { $schema = ot_get_option('body_schema', 'light'); if($schema == 'dark') return true; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function codeless_is_inner_content(){\n $condition = false;\n\n // Condition to test if query is a blog\n if( ! codeless_is_blog_query() )\n $condition = true;\n\n\n if( (! codeless_page_from_builder() || \n ( codeless_get_page_layout() != 'fullwidth' \n && codeless_get_page_layout() != '' \n && codeless_get_page_layout() != 'default' ) || \n ( is_single() \n && get_post_type() == 'post' \n && codeless_get_post_style() != 'custom' ) \n )\n && $condition )\n\n return true;\n\n return false;\n}", "public function hasBody();", "public function hasBody(): bool;", "function is_gutenberg_page() {\n if ( function_exists( 'is_gutenberg_page' ) &&\n is_gutenberg_page()\n ) {\n // The Gutenberg plugin is on.\n return true;\n }\n\n $current_screen = get_current_screen();\n\n if ( method_exists( $current_screen, 'is_block_editor' ) &&\n $current_screen->is_block_editor()\n ) {\n // Gutenberg page on 5+.\n return true;\n }\n\n return false;\n }", "function isTheme($xmlobj) {\n\tif (! $xmlobj->details) return false;\n\tif (! $xmlobj->layout) return false;\n\n\tif (! $xmlobj->details->name) return false;\n\tif (! $xmlobj->details->author) return false;\n\tif (! $xmlobj->details->author['email']) return false;\n\tif (! $xmlobj->details->version) return false;\n\tif (! $xmlobj->details->protected) return false;\n\n\tif (! $xmlobj->layout->header) return false;\n\tif (! $xmlobj->layout->release) return false;\n\tif (! $xmlobj->layout->footer) return false;\n\n\treturn true;\n}", "public function is_own_page();", "public function isPage();", "function is_main_blog()\n{\n}", "public function is_current_blog_previewed()\n {\n }", "public function hasContent(): bool\n {\n return !$this->isEmpty('body');\n }", "public function has_sidebar() {\n\t\t// Get our extra body classes.\n\t\treturn ( apply_filters( 'avada_has_sidebar', in_array( 'has-sidebar', $this->body_classes, true ), $this->body_classes, 'has-sidebar' ) );\n\t}", "public function isDark(){\n return $this->lightness() <= $this->lightnessBorder ? true : false;\n }", "public static function verified_blog() {\n return isset($_GET['lf_login_complete']) && $_GET['lf_login_complete'] === 'true' \n && isset( $_GET['page'] ) && $_GET['page'] === 'livefyre_apps';\n }", "public function isLiveBlogNodePage() {\n return $this->requestStack->getCurrentRequest()->attributes->get('node');\n }", "public function hasThemeDocumentation(): bool\n {\n $documentationPage = $this->getThemeDocumentationParentPage();\n return !is_null($documentationPage);\n }", "protected function should_show_theme()\n {\n }", "private function is_in_page() {\n\t\t$screen = get_current_screen();\n\t\tif ( is_object( $screen ) && in_array( $screen->id, array(\n\t\t\t\t'defender_page_wdf-debug',\n\t\t\t\t'defender_page_wdf-debug-network'\n\t\t\t) )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "static function currentIsPage(): bool\n {\n return $GLOBALS['_index']->type === WebState::PAGE;\n }", "private function hasFrontEnd() {\n\t\treturn (is_object($GLOBALS['TSFE']) && ($GLOBALS['TSFE']->id > 0));\n\t}", "public function hasBody(){\n return $this->_has(13);\n }", "function tkmnineteen_schema_body() {\n\n\t\t// Check conditions.\n\t\t$is_blog = ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) ? true : false;\n\n\t\t// Set up default itemtype.\n\t\t$itemtype = 'WebPage';\n\n\t\t// Get itemtype for the blog.\n\t\t$itemtype = ( $is_blog ) ? 'Blog' : $itemtype;\n\n\t\t// Get itemtype for search results.\n\t\t$itemtype = ( is_search() ) ? 'SearchResultsPage' : $itemtype;\n\t\t// Get the result.\n\t\t$result = apply_filters( 'astra_schema_body_itemtype', $itemtype );\n\n\t\t// Return our HTML.\n\t\techo apply_filters( 'tkmnineteen_schema_body', \"itemtype='https://schema.org/\" . esc_attr( $result ) . \"' itemscope='itemscope'\" );\n\t}", "function isHead()\n {\n\n }", "public function hasPageThemeCustomizations(Site $site): bool;", "function is_preview() {\n\tglobal $test_theme;\n\treturn(LOGGED_IN && !empty($test_theme));\n}", "function wc_current_theme_is_fse_theme()\n {\n }", "function isGutenbergPage()\n{\n // Short-circuit\n if (!is_admin()) {\n return false;\n }\n\n // On Wordpress 5.0, use dedicated method\n if (function_exists('\\WP_Screen::is_block_editor')) {\n return WP_Screen::is_block_editor();\n }\n\n // Fallback for older wordpress versions\n return (function_exists('is_gutenberg_page') && is_gutenberg_page());\n}", "function hasBlackContent() {\r\n\t\treturn $this->blackContent || $this->autoBlackContent;\r\n\t}", "function contentOnly()\n\t{\n\t\treturn $this->twidooContentOnly;\n\t}", "abstract function isSite();", "private function is_in_page() {\n\t\t$screen = get_current_screen();\n\t\tif ( is_object( $screen ) && in_array( $screen->id, array(\n\t\t\t\t'defender_page_wdf-backup',\n\t\t\t\t'defender_page_wdf-backup-network'\n\t\t\t) )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isDocument();", "function bunchy_is_trending_page() {\n\treturn is_page( bunchy_get_trending_page_id() );\n}", "public static function is_embed_page()\n {\n }", "public static function is_embed_page()\n {\n }", "public function hasContent();", "public function hasContent();", "public function isLight(){\n return $this->isDark() ? false : true;\n }", "public static function has_page_header() {\n\t\t$post_id = wpv_get_the_ID();\n\n\t\tif ( is_null( $post_id ) )\n\t\t\treturn true;\n\n\t\tif ( is_single() && has_post_format( 'aside' ) )\n\t\t\treturn false;\n\n\t\treturn get_post_meta( $post_id, 'show-page-header', true ) !== 'false' && ! is_page_template( 'page-blank.php' );\n\t}", "function biagiotti_mikado_dashboard_page() {\n\t\treturn is_page_template('user-dashboard.php');\n\t}", "public function isPage()\n {\n if ($this->name) {\n return true;\n }\n return false;\n }", "public function has_booking_theme() {\n return !!$this->get_booking_theme();\n }", "function goya_is_blog () {\n\treturn ( is_archive() || is_author() || is_category() || is_home() || is_single() || is_tag()) && 'post' == get_post_type();\n}", "public static function is_admin_or_embed_page()\n {\n }", "public static function is_admin_or_embed_page()\n {\n }", "public function isDark()\n {\n // TODO: Read a paper on this :P\n return $this->luma() < 0.50;\n }", "public function isDocType()\n {\n return $this->type === Token::DOCTYPE;\n }", "public function isUserJsOrCssPage() {\n\t\treturn $this->getNamespaceId() == 2 && ( substr( $this->getTitle(), -3 ) == '.js' || substr( $this->getTitle(), -4 ) == '.css' );\n\t}", "static function currentIsTopic(): bool\n {\n return\n $GLOBALS['_index']->type === WebState::PAGE\n && $GLOBALS['_page']['type'] == Page::FORUM\n && $GLOBALS['_index']->segment !== null;\n }", "function bt_check_for_eggnews()\n{\n $theme = wp_get_theme();\n if (1==1) {\n echo '<div class=\"notice notice-warning is-dismissible\">\n <p>The current theme is' . $theme . '</p>\n </div>';\n }\n}", "public function have_sidebar(){\r\n\r\n return self::current_sidebar_layout();\r\n\r\n }", "public function is_page_active()\n\t{\n\t\treturn (bool) $this->content();\n\t}", "function codeless_is_layout_modern(){\n $layout_modern = codeless_get_mod( 'layout_modern' );\n\n if( codeless_get_meta( 'layout_modern' ) != 'default' && codeless_get_meta( 'layout_modern' ) != '' ){\n $layout_modern = codeless_get_meta( 'layout_modern' );\n }\n\n return $layout_modern;\n}", "public function isApplicableOnCurrentPage();", "public function isBodySearch(): bool {\n // all that for one lousy pun\n return !$this->threadTitleSearch;\n }", "public static function should_output_yoast_schema() {\n\t\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Using WPSEO hook.\n\t\treturn apply_filters( 'wpseo_json_ld_output', true );\n\t}", "private function is_screen() {\n\t\treturn get_current_screen()->post_type === $this->object_type;\n\t}", "public function getIsOnPage() {\n $parts = explode('.', $this->path);\n return ($parts[sizeof($parts) - 4] == \"PageTypes\");\n }", "function mad_display_sidebar() {\n if (\n is_404() ||\n is_front_page() && 'page' == get_option('show_on_front') ||\n is_product() ||\n is_checkout()\n ) {\n return false;\n } else {\n return true;\n }\n}", "function wporg_is_handbook_landing_page() {\n\treturn (\n\t\t$GLOBALS['wp_query']->is_handbook_root\n\t||\n\t\t(\n\t\t\t! empty( $GLOBALS['wp_query']->query_vars['handbook'] )\n\t\t&&\n\t\t\t$GLOBALS['wp_query']->found_posts === 1\n\t\t&&\n\t\t\t! empty( $GLOBALS['wp_query']->query_vars['page_id'] )\n\t\t)\n\t);\n }", "public function inFooter(): bool;", "function woodmart_elementor_is_preview_page() {\n\t\treturn isset( $_GET['preview_id'] );\n\t}", "function is_child_theme()\n{\n}", "static function currentIsArticle(): bool\n {\n return\n $GLOBALS['_index']->type === WebState::PAGE\n && $GLOBALS['_page']['type'] == Page::CATEGORY\n && $GLOBALS['_index']->segment !== null;\n }", "public function is_main_blog() {\n\t\t\treturn ( get_current_blog_id() === $this->get_main_blog_id() );\n\t\t}", "public function is_blogger(){\n\t\tif (preg_match(\"/\\.blogspot\\./\",$this->url) || preg_match(\"/\\.blogger\\./\",$this->url))\n\t\t\treturn true;\n\n\t\t// Look for that unmistakable blogger fingerprint.\n\t\t$divs = $this->getElementsByTagName(\"div\");\n\t\tforeach($divs as $div){\n\t\t\t$id = $div->getAttribute(\"id\");\n\t\t\tif (preg_match(\"/Blog[0-9]*_comments-block-wrapper/\",$id)){\n\t\t\t\t$dls = $div->getElementsByTagName(\"dl\");\n\t\t\t\tforeach($dls as $dl){\n\t\t\t\t\t$id = $dl->getAttribute('id');\n\t\t\t\t\tif (preg_match(\"/comment[s]?-block/\",$id)){\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "function snax_is_embedly_dark_skin() {\n\treturn 'on' === apply_filters( 'snax_is_embedly_dark_skin', get_option( 'snax_embedly_dark_skin', 'off' ) );\n}", "public function isHead(){ }", "function this_is_a_blog_page(){\n if (is_home() || is_singular( 'post' ) || is_post_type_archive('post') || is_tag() || is_category() || is_date() || is_search()) {\n if(!is_post_type_archive('product')){\n return true;\n }\n }\n return false;\n}", "function aton_qodef_is_blog_template($current_page = '') {\n\n\t\tif($current_page == '') {\n\t\t\t$current_page = aton_qodef_get_page_template_name();\n\t\t}\n\n\t\t$blog_templates = aton_qodef_blog_templates();\n\n\t\treturn in_array($current_page, $blog_templates);\n\t}", "function is_feed() {\n\treturn(basename($_SERVER['PHP_SELF']) == XML_PAGE);\n}", "private function is_webhook_settings_page()\n {\n }", "function is_full()\n {\n return $this->_page_full;\n }", "function ifbodyclass ($theid, $theclass){\n\t$bodyclasses = get_body_class();\n\tif (in_array('page-id-'.$theid,$bodyclasses)) {\n\t echo $theclass;\n\t} \n}", "public function isPageValid()\n {\n return $this->context->getSession()->getPage()->has('css', 'li#c1.a');\n }", "function affinity_mikado_is_blog_template($current_page = '') {\n\n\t\tif ($current_page == '') {\n\t\t\t$current_page = affinity_mikado_get_page_template_name();\n\t\t}\n\n\t\t$blog_templates = affinity_mikado_blog_templates();\n\n\t\treturn in_array($current_page, $blog_templates);\n\t}", "public function is_theme_active()\n {\n }", "function is_userpage() {\n\t$ucat = UCAT;\n\treturn(!empty($ucat));\n}", "public function hasBody ()\n {\n return isset($this->_values['body']) && ($this->_values['body'] !== null);\n }", "function isWebpage ()\n\t{\n\t\treturn get_class($this) === 'Webpage' ;\n\t}", "function gregr_home_widget_test() {\n\n\tif ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) {\n\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_featured' );\t\t\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_middle' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_bottom' );\n\t}\n}", "public function creamyBody() {\n\t\t$theme = $this->db->getSettingValueForKey(CRM_SETTING_THEME);\n\t\tif (empty($theme)) { $theme = CRM_SETTING_DEFAULT_THEME; }\n\t\treturn '<body class=\"skin-'.$theme.' sidebar-mini fixed \">';\n\t}", "function is_blog () {\n\tglobal $post;\n\t$posttype = get_post_type($post );\n\treturn ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;\n}", "private function has_page_header_subheading() {\n\t\tif ( $this->get_page_subheading ) {\n\t\t\treturn true;\n\t\t}\n\t}", "public static function isSlurpPage() {\n global $post;\n $isSlurp = false;\n if(isset($post) && is_object($post)) {\n $content = $post->post_content;\n if(strpos($content, '{{mj-checkout-form}}') !== false) {\n $isSlurp = true;\n }\n }\n else {\n // Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . \"] Check Slurp Page Failed: \" . print_r($post, 1));\n }\n return $isSlurp;\n }", "public function hasContent()\n {\n return false;\n }", "public function is_element_overview_page()\n\t\t{\n\t\t\tif( is_bool( $this->is_element_overview_page ) )\n\t\t\t{\n\t\t\t\treturn $this->is_element_overview_page;\n\t\t\t}\n\n\t\t\tif( ! function_exists( 'get_current_screen' ) )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->is_element_overview_page = false;\n\n\t\t\t$screens = array(\n\t\t\t\t\t\t\t$this->get_post_type()\n\t\t\t\t\t\t);\n\n\t\t\t$post_type = '';\n\n\t\t\t\t//\tWP bug: we cannot rely on QuickEdit, that screen object exists\n\t\t\t$screen = get_current_screen();\n\n\t\t\tif( empty( $screen ) || ( ! isset( $screen->post_type ) ) )\n\t\t\t{\n\t\t\t\tif( isset( $_REQUEST['action'] ) && ( 'inline-save' != $_REQUEST['action'] ) )\n\t\t\t\t{\n\t\t\t\t\treturn $this->is_element_overview_page;\n\t\t\t\t}\n\n\t\t\t\tif( ! isset( $_REQUEST['post_type'] ) )\n\t\t\t\t{\n\t\t\t\t\treturn $this->is_element_overview_page;\n\t\t\t\t}\n\t\t\t\t$post_type = $_REQUEST['post_type'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$post_type = $screen->post_type;\n\t\t\t}\n\n\t\t\tif( ! in_array( $post_type, $screens ) )\n\t\t\t{\n\t\t\t\treturn $this->is_element_overview_page;\n\t\t\t}\n\n\t\t\t$this->is_element_overview_page = true;\n\n\t\t\treturn $this->is_element_overview_page;\n\t\t}", "public function is_allowed_page(){\n\n\n $allowed_screens = array(\n 'toolset_page_views-editor',\n 'toolset_page_ct-editor',\n 'toolset_page_view-archives-editor',\n 'toolset_page_dd_layouts_edit',\n 'page',\n 'post',\n );\n\n $allowed_pages = array(\n 'dd_layouts_edit',\n 'views-editor',\n 'ct-editor',\n 'view-archives-editor',\n\t\t\t\t'cred_association_form'\n );\n\n\n\n $bootstrap_available = false;\n $bootstrap_version = Toolset_Settings::get_instance();\n\n if(isset($bootstrap_version->toolset_bootstrap_version) && $bootstrap_version->toolset_bootstrap_version != \"-1\"){\n $bootstrap_available = true;\n }\n \n if(defined('LAYOUTS_PLUGIN_NAME')){\n $bootstrap_available = true;\n }\n\n if(is_admin()){\n\n $screen_id = '';\n $screen_base = '';\n $screen = get_current_screen();\n\n if(isset($screen)){\n $screen_id = $screen->id;\n $screen_base = (isset($screen->base)) ? $screen->base : false;\n }\n\n if(in_array($screen_id, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(in_array($screen_base, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(isset($_GET['page']) && in_array($_GET['page'], $allowed_pages) && $bootstrap_available === true){\n return true;\n }\n\n\n } else {\n if ( isset( $_GET['toolset_editor'] ) === true ) {\n return true;\n }\n }\n\n return false;\n\n }", "private function has_page_header() {\n\t\t\n\t\t// Define vars\n\t\t$return = true;\n\t\t$style = $this->page_header_style;\n\n\t\t// Return if page header is disabled via custom field\n\t\tif ( $this->post_id ) {\n\n\t\t\t// Return if page header is disabled and there isn't a page header background defined\n\t\t\tif ( 'on' == get_post_meta( $this->post_id, 'pluton_disable_title', true )\n\t\t\t\t&& 'background-image' != $style ) {\n\t\t\t\t$return\t= false;\n\t\t\t}\n\n\t\t}\n\n\t\t// Check if page header style is set to hidden\n\t\tif ( 'hidden' == $style || is_page_template( 'templates/landing.php' ) ) {\n\t\t\t$return = false;\n\t\t}\n\n\t\t// Apply filters and return\n\t\treturn apply_filters( 'pluton_display_page_header', $return );\n\n\t}", "function em_is_my_bookings_page(){\r\n\treturn em_get_page_type() == 'my_bookings';\r\n}", "function wpex_has_footer_reveal() {\n\n\t// Global object\n\tglobal $wpex_theme;\n\n\t// Disabled by default\n\t$return = false;\n\n\t// Theme option check\n\tif ( get_theme_mod( 'footer_reveal', false ) ) {\n\t\t$return = true;\n\t}\n\n\t// Meta check\n\tif ( $wpex_theme->post_id ) {\n\t\tif ( 'on' == get_post_meta( $wpex_theme->post_id, 'wpex_footer_reveal', true ) ) {\n\t\t\t$return = true;\n\t\t} elseif ( 'off' == get_post_meta( $wpex_theme->post_id, 'wpex_footer_reveal', true ) ) {\n\t\t\t$return = false;\n\t\t}\n\t}\n\n\t// Disable on 404\n\tif ( is_404() ) {\n\t\t$return = false;\n\t}\n\n\t// Disable on mobile\n\tif ( $wpex_theme->is_mobile ) {\n\t\t$return = false;\n\t}\n\n\t// Apply filters\n\t$return = apply_filters( 'wpex_has_footer_reveal', $return );\n\n\t// Disable on boxed style - ALWAYS\n\tif ( 'boxed' == $wpex_theme->main_layout ) {\n\t\t$return = false;\n\t}\n\n\t// Return\n\treturn $return;\n\n}", "function bunchy_is_latest_page() {\n\treturn is_home();\n}", "function webt_is_preview_mode()\n{\n\t$preview_id = strpos($_SERVER['REQUEST_URI'], 'preview_id');\n\t$preview_nonce = strpos($_SERVER['REQUEST_URI'], 'preview_nonce');\n\t$preview_true = strpos($_SERVER['REQUEST_URI'], 'preview=true');\n\n\tif (($preview_true !== false) || ($preview_id !== false) && ($preview_nonce !== false)) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function libero_mikado_is_blog_template($current_page = '') {\n\n\t\tif($current_page == '') {\n\t\t\t$current_page = libero_mikado_get_page_template_name();\n\t\t}\n\n\t\t$blog_templates = libero_mikado_blog_templates();\n\n\t\treturn in_array($current_page, $blog_templates);\n\t}", "public function isRTE() {}", "function ct_home_widget_test() {\n\n\tif ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) {\n\n // remove_action( 'genesis_loop', 'genesis_do_loop' );\n // add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_featured' );\t\t\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_middle' );\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_bottom' );\n\t}\n}", "function parserHasContent() {\n\t\treturn (!empty($this->root)? TRUE : FALSE);\n\t}", "private function isHomePage() {\r\r\n global $wp_query;\r\r\n\r\r\n if (isset($wp_query->queried_object_id)) {\r\r\n $this->post = get_post($wp_query->queried_object_id);\r\r\n\r\r\n }\r\r\n\r\r\n //Check if blog posts page\r\r\n if (is_home() && $wp_query->is_posts_page) {\r\r\n return false;\r\r\n }\r\r\n\r\r\n return (is_home() || (isset($wp_query->query) && empty($wp_query->query) && !is_preview()));\r\r\n }", "function is_blog () {\r\n global $post;\r\n $posttype = get_post_type($post );\r\n return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;\r\n}", "function is_html_request() {\n return $this->rc->output->type == 'html';\n }", "function maiguides_is_table_of_contents() {\n\n\t// It's a main guide page!\n\tif ( is_singular( 'mai_guide' ) ) {\n\t\treturn true;\n\t}\n\n\t// It's not a guide entry post type.\n\tif ( ! is_singular( maiguides_get_guide_entry_post_types() ) ) {\n\t\treturn false;\n\t}\n\n\t// Get the value.\n\t$value = get_post_meta( get_the_ID(), 'guide_ids', true );\n\n\t// Bail if no value.\n\tif ( ! $value ) {\n\t\treturn false;\n\t}\n\n\t// Yep!\n\treturn true;\n}" ]
[ "0.6078157", "0.60613376", "0.60255367", "0.6022482", "0.59510875", "0.5847638", "0.5793184", "0.57819366", "0.5775919", "0.57719237", "0.5737562", "0.5724465", "0.5692602", "0.56920844", "0.56885314", "0.56826365", "0.56787044", "0.5673491", "0.5673308", "0.5635619", "0.5611132", "0.56089324", "0.5597846", "0.55863935", "0.5585484", "0.55799073", "0.55567175", "0.55424666", "0.5532068", "0.5522975", "0.5522084", "0.5515737", "0.5503339", "0.55017126", "0.5474245", "0.5474245", "0.5469807", "0.543782", "0.54337585", "0.5421403", "0.54190344", "0.54013526", "0.5400193", "0.5400193", "0.539545", "0.53901976", "0.5387752", "0.53842235", "0.53825897", "0.5373061", "0.5371774", "0.5368864", "0.5367862", "0.5360117", "0.5357065", "0.534462", "0.5334588", "0.53322744", "0.532107", "0.53198063", "0.531774", "0.5314151", "0.5300798", "0.52952397", "0.52883005", "0.5279146", "0.5276669", "0.5267374", "0.5266273", "0.5260024", "0.5259263", "0.5259147", "0.52588457", "0.5257681", "0.5257639", "0.5252372", "0.52502316", "0.5249388", "0.5248258", "0.5243655", "0.52415484", "0.5230086", "0.52266264", "0.5226589", "0.5226276", "0.5216934", "0.5215986", "0.5213362", "0.52099246", "0.520956", "0.52067626", "0.5205268", "0.5199562", "0.5198782", "0.519246", "0.5187949", "0.5186694", "0.5185313", "0.51784515", "0.5177256" ]
0.8125289
0
Will delete current child entity from persistent storage Id will be unassigned from entity, but data which entity has in memory will be still available until thread will be closed or entity will be grabbed by GC
Удалит текущий дочерний объект из постоянного хранилища. Идентификатор будет освобожден у объекта, но данные, которые хранит объект в памяти, останутся доступными до закрытия потока или пока объект не будет захвачен сборщиком мусора.
public function delete() { if($this->__persists) { // Get arranger (for compatibility with 5.6 set into separated operation) $arranger = DBOModelTransformerManager::getArranger(); // Do Save if ($arranger::delete($this->__currentSchema, self::createCurrentValuesDataMapping($this))) { // Flag entity as not persisted in system $this->__persists = false; // Erase value of the indexing parameter in the child if($this->__currentSchema->primary) { $this->{$this->__currentSchema->primary->parameterName} = null; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function entityDelete(){\n // update model\n $this->getModel()->delete();\n }", "public function _delete() {\n\t\t$this->parent->delete_child($this);\n\t}", "public function deleteSelf(){\n $this->delete();\n }", "public function delete()\n {\n $this->_entity->setIsActive(false);\n $this->save();\n }", "public function delete(){\n if($this->id > 0){\n SQL::delete($this::STORAGE, [\"id\" => $this->id]);\n }\n }", "final public function delete() {\n $this->_beforeDelete();\n $this->_deleted = TRUE;\n $this->_registerToFlusherOnce();\n }", "protected function clearEntity() {\n $this->entity = $this->entityTypeManager->getStorage('liveblog_post')->create([\n 'liveblog' => $this->entity->liveblog->target_id,\n ]);\n }", "public function testRemove1(): void\n {\n $parent = new ChildTestObj();\n $child = new ChildChildTestObj();\n $parent->name = 'Parent';\n $parent->id = '/functional/childtest';\n $parent->child = $child;\n $child->name = 'Child';\n\n $this->dm->persist($parent);\n $this->dm->flush();\n $this->dm->clear();\n\n $parent = $this->dm->find($this->type, '/functional/childtest');\n $parent->child->name = 'Child changed';\n\n $this->dm->remove($parent);\n $this->dm->flush();\n $this->dm->clear();\n $parent = $this->dm->find($this->type, '/functional/childtest');\n $this->assertNull($parent);\n }", "public function delete(){\n\t\t//Llama al metodo estatico de borrar y le pasa el id del objeto actual\n\t\tself::__delete($this->id);\n\t}", "public function delete() {\n $table = $this->getTableName();\n $mysql = $this->getMySQL();\n\n try {\n if (isset($this->id) && !is_nan($this->id) && $this->id > 0) {\n // TODO: recursively delete all relationships\n $relationships = $this->getRelationships();\n foreach ($relationships as $relation) {\n if ($relation instanceof OneToOne) {\n // This is a child-side relationship so skip it\n continue;\n }\n\n $relation->deleteAll();\n }\n\n $mysql->deleteRow($table, $this->uuid);\n\n // Unset the id, beccause the row is no longer attached\n unset($this->id);\n }\n }\n catch (DBException $exception) {\n throw $exception;\n }\n }", "public function delete()\n {\n foreach ($this->get_children_recursive()->getAsArray() as $child)\n $child->delete();\n Tag::where(\"id\", \"=\", $this->id)->delete();\n Tag_meta::where('tag_id', '=', $this->id)->delete();\n if($this->get_type()->get_id() == Types::getTagPrimary()->get_id())\n {\n $references = Tags_reference::where(\"tag_id\", \"=\", $this->id)->get(['*']);\n foreach($references as $reference)\n {\n Data_block::where('id', '=', $reference->data_block_id)->delete();\n $reference->delete();\n }\n }\n $this->id = null;\n }", "protected function _delete()\n\t{\n\t//\tconect to db\n\t\t$db = database::connect($this->get_env());\n\t\t$preparedData['id'] = $this['id']->get();\n\t//\tdelete main table entry\n\t\t$db->stack('DELETE FROM `'.$this->get_table().'` WHERE `id` = :id LIMIT 1', $preparedData);\n\t//\tdelete relations\n\t\t$db->stack('DELETE FROM `'.attrRel::table.'` WHERE `item` = \"'.$this->get_table().'\" AND `itemid` = :id', $preparedData);\n }", "public function __destruct()\n {\n # This method is used only if there's a record in the database\n if(isset($this->ID))\n {\n # If we want to physically delete the object from DB\n if($this->blForDeletion == true)\n {\n $strQuery = 'DELETE FROM ' . $this->strTableName . ' WHERE id = :eid';\n $objStatement = $this->objPDO->prepare($strQuery);\n $objStatement->bindValue(':eid', $this->ID, PDO::PARAM_INT);\n $objStatement->execute();\n }\n\n # If we want to set the object as deleted\n if($this->IsDeleted == 1)\n {\n $strQuery = 'UPDATE ' . $this->strTableName . ' SET is_deleted = 1 WHERE id = :eid';\n $objStatement = $this->objPDO->prepare($strQuery);\n $objStatement->bindValue(':eid', $this->ID, PDO::PARAM_INT);\n $objStatement->execute();\n }\n }\n }", "private function detachManaged($oid)\n {\n $entity = $this->entities[$oid];\n $class = get_class($entity);\n $metadata = $this->dm->getMetadata($class);\n $id = $metadata->reflProp($metadata->primaryKey()->name())->getValue($entity);\n\n unset($this->entities[$oid]);\n unset($this->ids[$oid]);\n unset($this->originalData[$oid]);\n unset($this->idMap[$class][$id]);\n unset($this->states[$oid]);\n }", "abstract protected function removeAllPersistentData();", "function db_deletemyself() {\n if ( !is_numeric($this->properties->id)) return false;\n $sql='DELETE FROM '\n . constant($this->parentNode->properties->childtablename)\n . ' WHERE id=' . $this->properties->id . ' LIMIT 1';\n\n if (($result = Node::getdblink()->query($sql))===false) return false;\n if (isset($this->parentNode->properties->id) && isset($this->parentNode->partnerNode->properties->id)) {\n $this->db_deletemylink();\n }\n return true;\n }", "public function dissociate()\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, null);\n\n $this->parent->setEntityAttribute($this->relation, null);\n }", "protected abstract function delete();", "public function destroy()\n {\n $em = static::getEntityManager();\n $em->remove($this);\n $em->flush();\n }", "public function delete($entity){\n $entity->delete();\n }", "public function delete( $entity ): void {\n\t}", "public function deleteAction() {\n// Create object for entity manager\n $entityManager = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n\n $id = (int) $this->params()->fromRoute('id', 0);\n\n// Find bid detail\n $bid = $entityManager->find('CsnCms\\Entity\\Bid', $id);\n\n $bidName = $bid->getName();\n\n// Delete query to delete this record\n $dql = \"Delete from CsnCms\\Entity\\Bid a where a.bidid =\" . $id;\n\n try {\n\n// Get user identity\n $userData = $this->identity();\n\n $query = $entityManager->createQuery($dql);\n\n// Extecute query\n $query->execute();\n\n// Call activity model\n $activity = new ActivityModel();\n\n $type = 'Deleted';\n// Save activity data\n $activity->saveActivity($entityManager, addslashes($bidName), $type, 'Bid', new \\DateTime(date('Y-m-d h:i:s')), addslashes($userData->getUsername()));\n\n $this->flashMessenger()->addMessage('Bid Successfully Deleted');\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n $this->flashMessenger()->addMessage('Cannot delete or update a parent row while other child values exist');\n }\n\n\n\n return $this->redirect()->toRoute('admin/default', array('controller' => 'bid', 'action' => 'index'));\n }", "public function delete(Entity $entity) {}", "public function delete(Entity $entity) {}", "public function dodelete()\n\t{\n\t\tparent::delete();\n\t}", "public function testRemove()\n {\n $this->setDataInDb([\n 'parent_entities' => [\n ['id' => 1],\n ],\n 'child_entities' => [\n ['id' => 10, 'parent_id' => 1, 'val' => 100],\n ['id' => 11, 'parent_id' => 1, 'val' => 200],\n ['id' => 12, 'parent_id' => 1, 'val' => 300],\n ]\n ]);\n\n $this->repo->removeById(1);\n\n $this->assertDatabaseDataSameAs([\n 'parent_entities' => [],\n 'child_entities' => []\n ]);\n }", "public function delete(BaseEntity $entity)\n {\n $this->em->remove($entity);\n $this->em->flush();\n }", "public function Delete(){\n $dataLayer = DataLayer::Instance();\n $dataLayer->DeleteProductParentData($this, 'productconstituent');\n $dataLayer->DeleteProductParentData($this, 'productsubconstituent');\n objectbase::Delete();\n }", "public function destroy()\n {\n // Delete from the persistence layer.\n $this->getDataSource()->destroy($this->id);\n // Remove from the registry.\n $this->getFactory()->unregisterEntity($this);\n // Done, garbage collection should do the rest.\n }", "public static function delete(Entity $entity) {\n self::getEntityManager()->remove($entity);\n self::getEntityManager()->flush();\n }", "public function delete()\n {\n static::getCollection()\n ->deleteOne([self::INTERNAL_PRIMARY_KEY => $this->_id]);\n }", "function deleteChilds(){\n\t\t$this->db->query('SELECT ID FROM ' . NEWSLETTER_TABLE . ' WHERE ParentID=' . intval($this->ID));\n\t\t$ids = $this->db->getAll(true);\n\t\tforeach($ids as $id){\n\t\t\t$child = new self($id);\n\t\t\t$child->delete();\n\t\t\t$child = new self();\n\t\t}\n\t}", "public function detach(): object\n {\n $sql = \"DELETE FROM `\" . $this->relation_table . \"` WHERE `\" . $this->table . \"_id` = :id\";\n $statement = $this->db->prepare($sql);\n $binds = [];\n $statement->bindValue(\":id\", $this->where_key);\n $binds[$this->primary_key] = $this->where_key;\n $GLOBALS[Codes::SQL_QUERIES][] = [\n Codes::QUERY => $sql,\n Codes::BINDS => $binds\n ];\n\n if ($statement->execute()) {\n $this->offsetUnset($this->relation);\n return $this;\n }\n\n throw new StoragePdoException(\n \"An unknown error has occurred while '\" . explode('\\\\', getModelFromTable($this->table))[2] . \"' model call detach '\" . explode('\\\\', getModelFromTable($this->relation))[2] . \"'\"\n );\n }", "function delete():self {df_abstract($this); return $this;}", "public function delete() {\n if($this->orphan_error()) return false;\n\n //Only call the API if we have an id\n if(!is_null($this->id)) {\n //Determine the service name and arguments\n $svc = $this->get_service('DELETE');\n $args = array($this->id_property => $this->id);\n\n //GOGOGO!!!\n $result = $this->call($svc, $args);\n\n //DELETED!!!\n if($result->result == BinaryBeast::RESULT_SUCCESS) {\n //Clear cache\n $this->clear_id_cache();\n $this->clear_list_cache();\n\n //Reset all local values and errors\n $this->set_id(null);\n $this->data = array();\n $this->new_data = array();\n }\n\n //API request failed - developers should evaluate last_error and last_result for details\n else return $this->set_error($result);\n }\n\n //Now that we've deleted successfully, we can remove ourselves from our parent (if we have one)\n if(!is_null($this->parent)) {\n $this->parent->remove_child($this);\n $this->parent = &$this->bb->ref(null);\n $this->orphan = true;\n }\n\n //Successfully deleted\n return true;\n }", "public function testRemove2(): void\n {\n $parent = new ChildTestObj();\n $child = new ChildChildTestObj();\n $parent->name = 'Parent';\n $parent->id = '/functional/childtest';\n $parent->child = $child;\n $child->name = 'Child';\n\n $this->dm->persist($parent);\n $this->dm->flush();\n $this->dm->clear();\n\n $child = $this->dm->find($this->childType, '/functional/childtest/test');\n\n $this->dm->remove($child);\n $this->dm->flush();\n $this->dm->clear();\n\n $parent = $this->dm->find($this->type, '/functional/childtest');\n\n $this->assertNull($parent->child);\n $this->assertTrue($this->node->hasNode('childtest'));\n $this->assertFalse($this->node->getNode('childtest')->hasNode('test'));\n }", "public function clear() { $this->_em->clear(); }", "public function clear() { $this->_em->clear(); }", "public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }", "public function deleteDrupalEntity() {\n // Loading Drupal Entity, if it wasn't already.\n if (!$this->getDrupalEntity()) {\n $this->toDrupalEntity();\n }\n return $this->getDrupalEntityWrapper()->delete();\n }", "public function afterDelete(Event $event, EntityInterface $entity): void\n {\n @unlink($entity->get('path'));\n\n parent::afterDelete($event, $entity);\n }", "public function test_delete_parent_child_record()\n {\n $this->expectNotToPerformAssertions();\n\n Artisan::call('migrate:fresh', ['--path' => '/database/migrations/task4']);\n\n $category = Category::factory()->create();\n Product::factory()->create();\n $category->delete();\n }", "public function processDeletionQueue(EntityInterface $entity);", "abstract public function delete();", "public abstract function delete();", "public abstract function delete();", "public abstract function delete();", "public abstract function delete();", "public static function geoCart_deleteProcess()\n {\n $cart = geoCart::getInstance();\n\n $parent = $cart->item->getParent();\n if (is_object($parent)) {\n $session_vars = $parent->get('session_variables');\n $session_vars['attention_getter'] = 0;\n $session_vars['attention_getter_choice'] = 0;\n $parent->set('session_variables', $session_vars);\n $parent->save();\n }\n }", "public function delete() { \n\t\t$this->checkDisposed();\n\t\t\t\n\t\t// Delete nodes\n\t\t$result = DataBase::query(\n\t\t\t\"SELECT node.id \".\n\t\t\t\"FROM \".DataBase::formTableName('Premanger', 'Nodes').\" AS node \".\n\t\t\t\"WHERE node.treeID = '$this->_id'\");\n\t\t// Change node type to SIMPLE because otherwise we could not delete \n\t\t// them\n\t\tDataBase::query(\n\t\t\t\"UPDATE \".DataBase::formTableName('Premanger', 'Nodes').\" \".\n\t\t\t\"SET id = 0 \".\n\t\t\t\"WHERE treeID = '$this->_id'\");\n\t\twhile ($result->next()) {\n\t\t\t$node = StructureNode::getFromID($result->get('nodeID'));\n\t\t\t$node->delete();\n\t\t}\n\t\t\t\n\t\tDataBase::query(\n\t\t\t\"DELETE FROM \".DataBase::formTableName('Premanger', 'Trees').\" \".\n\t\t\t\"WHERE tree.id = '$this->_id'\");\n\t\t\t\n\t\tif (self::$_count !== null)\n\t\t\tself::$_count--;\t\n\t\n\t\t$this->_id = null;\n\t}", "public function _destroy(){\n $class_name = get_class($this);\n $id_name = MVCHelper::getIdName($class_name);\n $type = MVCHelper::getDataType($this->$id_name);\n $sql = \"DELETE FROM \" .$class_name . \" WHERE \". $id_name . \" = ? \";\n $data = array(\"{$type}\", \"{$this->$id_name}\");\n DBModel::execute($sql, $data);\n }", "final public function delete() {\n if (method_exists($this, 'onDelete')) {\n $this->onDelete();\n }\n\n $class = get_called_class();\n\n __db()->delete(\n $this->getTableName(),\n array(\n $class::getPrimaryName() => $this->_id\n )\n );\n }", "public function delete()\r\n\t{\r\n\t\tglobal $db;\r\n\r\n\t\t$id = $this->data['id'];\r\n\r\n\t\tif(isset(static::$cache[$id]))\r\n\t\t\tunset(static::$cache[$id]);\r\n\r\n\t\t$db->delete_query(static::$table, \"id='{$id}'\");\r\n\t}", "protected function preRemoveEntity()\n {\n }", "public function detach ()\n {\n $this->parent = null;\n }", "public function testRemove3(): void\n {\n $parent = new ChildTestObj();\n $parent->name = 'Parent';\n $parent->id = '/functional/childtest';\n // Lv1\n $childLv1 = new ChildReferenceableTestObj();\n $childLv1->name = 'Child-Lv1';\n $parent->child = $childLv1;\n // Lv2\n $childLv2 = new ChildChildTestObj();\n $childLv2->name = 'Child-Lv2';\n $childLv1->aChild = $childLv2;\n\n $this->dm->persist($parent);\n $this->dm->flush();\n $this->dm->clear();\n\n $parent = $this->dm->find($this->type, '/functional/childtest');\n $this->assertTrue($this->node->hasNode('childtest'));\n $this->assertTrue($this->node->getNode('childtest')->hasNode('test'));\n $this->assertTrue($this->node->getNode('childtest')->getNode('test')->hasNode('test'));\n\n $this->dm->remove($parent);\n $this->dm->flush();\n $this->dm->clear();\n $parent = $this->dm->find($this->type, '/functional/childtest');\n $this->assertNull($parent);\n }", "protected function _afterEntityDelete(KCommandContext $context)\n\t{\t \n\t\t$total = $this->set->photos->reset()->getTotal();\n\t\t\n\t\tif ( $total > 0 )\n\t\t\t$this->set->setValue('photo_count', $this->set->photos->reset()->getTotal());\n\t\telse\n\t\t\t$this->set->delete();\n\t}", "public function delete()\n {\n parent::delete();\n }", "public function delete() {\n\t\t$this->getRequest()->request($this->getUri().'delete.json', 'DELETE', [\n\t\t\t'id' => $this->getId(),\n\t\t]);\n\n\t\t$this->data = null;\n\t}", "function doDelete()\n\t{\n\t\tglobal $ilDB;\n\t\t// $myID = $this->getId();\n\t\t\n\t}", "public function deleting($entity)\n {\n //\n }", "public function __destruct()\n {\n $this->delete();\n }", "public function clear()\n {\n $this->getEntityManager()->clear();\n }", "abstract function delete();", "private function clear() {\n $this->child = [];\n }", "public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n \n \n $relations->delete(); \n }\n \n DB::commit(); \n }", "public function flushEntities()\n {\n $this->doctrine->flush();\n $this->doctrine->clear();\n $this->n_managed = 0;\n }", "public function Delete($entity) {\r\n }", "public function deleted($entity)\n {\n //\n }", "function doDelete()\n\t{\n\t\tglobal $ilDB;\n\n\t\t$this->deleteMetaData();\n\n\t\t$ilDB->manipulate(\"DELETE FROM rep_robj_xpal_data WHERE \".\n\t\t\t\" id = \".$ilDB->quote($this->getId(), \"integer\")\n\t\t);\n\t}", "private function executeEntityDelete()\n\t{\n\t\t$object = new $this->_resourceConfiguration['retrieveData']['className'](intval($this->_urlSegment[1]));\n\t\tif (!$object->id)\n\t\t\t$this->setStatus(404);\n\t\telse\n\t\t{\n\t\t\tif (isset($this->_resourceConfiguration['objectMethods']) && isset($this->_resourceConfiguration['objectMethods']['delete']))\n\t\t\t\t$result = $object->{$this->_resourceConfiguration['objectMethods']['delete']}();\n\t\t\telse\n\t\t\t\t$result = $object->delete();\n\t\t\tif (!$result)\n\t\t\t\t$this->setStatus(500);\n\t\t}\n\t\t$output = false;\n\t}", "function delete(IEntity $entity);", "abstract protected function removePersistentData($key);", "private function del(){\t\t\n\t\tif(!$this->hasAccessRight())\n\t\t\treturn;\n\t\t$title = $this->getParam('title');\t\t\t\n\t\t$taskId = $this->getParam('delId');\t\t\t\n\t\t$parent = WTTaskUtil::findParenttaskByTaskid($taskId);\n\t\tif($parent != null)\n\t\t\tWTFactsAPI::delFact($parent, 'SubTask', $taskId, null, null);\t\t\t\n\t\t$hasChildren = WTTaskUtil::findChildtasksByTaskid($taskId);\n\t\t$this->delCascade($taskId, $hasChildren, $title);\t\t\n\t\t$this->result['success'] = true;\n\t}", "public function delete() {\n $this->db->delete($this->table, array(\n $this->id => $this->{$this->id}, \n ));\n unset($this->{$this->id});\n }", "public function delete(): self;", "public function delete() {\n if (empty($this->id)) {\n return;\n }\n\n db_begin();\n delete_records('artefact_bookset_component', 'booksetid', $this->id);\n delete_records('artefact_bookset', 'artefact', $this->id);\n\n parent::delete();\n db_commit();\n }", "public function delete($key = NULL){\n if (!is_null($key)) return parent::delete($key);\n \n\t\t//delete children\n\t\t$children_shares = Jelly::select('Client_Share')->where('shareholder', '=', $this->id())->execute();\n\t\tforeach($children_shares as $cs){\n\t\t\t$cs->delete();\n\t\t}\n\n\t\t\n\t\tJelly::delete('Client_Shareholder')->where('_id', '=', $this->id())->execute();\n }", "protected function _delete() {\r\n $category = $this->getParent();\r\n $category->forum_count = new Zend_Db_Expr('forum_count - 1');\r\n $category->save();\r\n\r\n // Delete all child topics\r\n $table = Engine_Api::_()->getItemTable('ynforum_topic');\r\n $select = $table->select()->where('forum_id = ?', $this->getIdentity());\r\n foreach ($table->fetchAll($select) as $topic) {\r\n $topic->delete();\r\n }\r\n \r\n // Delete all child forums\r\n $tableSubForum = Engine_Api::_()->getItemTable('ynforum_forum');\r\n $selectSubForum = $tableSubForum->select()->where('parent_forum_id = ?', $this->getIdentity());\r\n foreach ($tableSubForum->fetchAll($selectSubForum) as $subForum) {\r\n $subForum->delete();\r\n }\r\n\r\n parent::_delete();\r\n }", "public function destroy($entity_id);", "public function gatsbyPrepareDelete(ContentEntityInterface $entity = NULL) {\n $this->gatsbyPrepareData($entity);\n }", "public function delete()\n { \n Database::_beginTransaction();\n $req = \"DELETE FROM 'blog_category';\n WHERE idc_parent = '\".$this->idcParent.\"'; \n AND idc = idcParent\";\n Database::_exec($req);\n $req2 = \"DELETE FROM 'blog_category';\n WHERE idc = '\".$this->idc.\"'\";\n Database::_exec($req2);\n if(!Database::_exec($req)){\n Database::_rollBack();\n }elseif(!Database::_exec($req2)){\n Database::_rollBack();\n }else{\n Database::_commit();\n }\n }", "public function __destruct()\n {\n $this->save();\n }", "public function onPostDelete(StorageEvent $event)\n {\n $this->service->rebuild();\n }", "protected function deleteData() {}", "public function delete()\n\t{\n\t\tif (!$this->exists()) return;\n\t\t$table = $this->table();\n\t\t$table->delete($this->where());\n\t\t$this->_id = null;\n\t}", "public function onBeforeDelete()\n {\n DynamicCache::inst()->clear();\n }", "function onAfterDelete() {\n\t\t$this->flushCache();\n\t\t\n\t\tparent::onAfterDelete();\n\t}", "function destroyObject() {\n\t\t$kids = $this->getChildren();\n\t\tif (count($kids) > 0) {\n\t\t\tforeach ($kids as $id => $details) {\n\t\t\t\t$sp = new StaticPage($id);\n\t\t\t\t$sp->setVars($details);\n\t\t\t\t//assign the child's parent to the value of it's grandparent\n\t\t\t\t$sp->setColumnValue('parent_sp_id', $this->parent_sp_id);\n\t\t\t\t$sp->setColumnValue('sp_rank', '0');\n\t\t\t\t//rank it highest in that category. Note: the kids were delivered in the properly ranked order\n\t\t\t\t$sp->loadVars();\n\t\t\t\t$sp->assignRank(0);\n\t\t\t}\n\t\t}\n\n\t\t//rank it highest in this level\n\t\t$this->assignRank(0);\n\n\t\t//delete this page\n\t\tparent::destroyObject();\n\t}", "public function delete($id)\n {\n return $this->db->update('child', array('deleted' => 1, 'date_upd' => date('Y-m-d H:i:s')), array('id_child' => (int)$id, 'id_domain' => (int)getUserDomain())); \n }", "public function iAttemptToDeleteTheCurrentEntity() {\n $currentUrl = $this->getSession()->getCurrentUrl();\n $destinationUrl = \"{$currentUrl}/delete\";\n $this->getSession()->visit($destinationUrl);\n }", "public function deleteEntity( $id)\n\t{\t\n\t\t$this->getEntityManager()->getConnection()->executeUpdate('update Profs set deleted = 1 where id = :id', array('id' => $id));\t\t\t \n\t\treturn $id;\n\t}", "public function queueDeletion(EntityInterface $entity, EditBufferInterface $buffer);", "function delete() {\n \t//Go through each related person_section row and either delete or detach it.\n \t$class = DB_DataObject::staticAutoloadTable('person_section');\n \t$personSectionObject = new $class;\n \t$personSectionObject->score_packet_id = $this->id;\n \t$personSectionObject->find();\n\n \tif ($personSectionObject) {\n\t\t\twhile ($personSectionObject->fetch()) {\n\t\t\t\t$psCopy = $personSectionObject; //Need to make a copy in order to allow the master to continue to iterate\n\n\t\t\t\tif ($psCopy->reg_type == 'Score Packet') {\n\t\t\t\t\t$psCopy->delete();\n\t\t\t\t} else {\n\t\t\t\t\t$psCopy->score_packet_id = '';\n\t\t\t\t\t$psCopy->update();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn DB_DataObject::delete(); //Call the parent method\n\t}", "public function forceDelete();", "public function Delete($entity) {\n }", "public function Delete($entity) {\n }", "public function delete() {\n $this->record->delete();\n }", "protected function _afterDelete()\n\t{\n\t\t//unset all the data from the object\n\t\t$this->unsData();\n\t\treturn $this;\n\t}", "public function undelete($entity) {\n\t\tunset($entity->deleted);\n\t\treturn is_null($entity->deleted) && $entity->save();\n\t}" ]
[ "0.6658578", "0.6599042", "0.6281374", "0.6278496", "0.6144528", "0.611121", "0.6050953", "0.6048879", "0.602651", "0.5992238", "0.593273", "0.59208465", "0.59027207", "0.5884557", "0.5878731", "0.5875394", "0.5857654", "0.5852168", "0.58514965", "0.5838966", "0.5829514", "0.5814661", "0.581291", "0.581291", "0.57939315", "0.5785627", "0.5760108", "0.57328343", "0.57291484", "0.572167", "0.57210386", "0.57180816", "0.57169026", "0.5708288", "0.5700825", "0.56846285", "0.5672444", "0.5672444", "0.5669907", "0.56698835", "0.56615174", "0.56435245", "0.562646", "0.5623886", "0.5619385", "0.5619385", "0.5619385", "0.5619385", "0.5612319", "0.5607577", "0.5592137", "0.5586781", "0.5580024", "0.55740297", "0.5573399", "0.5572448", "0.5567612", "0.5563338", "0.5543528", "0.55416656", "0.55394936", "0.5538424", "0.5536992", "0.5535353", "0.55350286", "0.5531504", "0.5530158", "0.5524562", "0.55190986", "0.5513134", "0.55112517", "0.5510223", "0.5509393", "0.55070645", "0.55005664", "0.54968816", "0.5487058", "0.54856", "0.54844254", "0.54741967", "0.5465992", "0.5465002", "0.5461543", "0.54578775", "0.54569614", "0.5454025", "0.5451688", "0.5441692", "0.5429526", "0.5427237", "0.54260224", "0.5422537", "0.54206955", "0.541972", "0.5415292", "0.54088885", "0.54088885", "0.5404007", "0.54037344", "0.5403681" ]
0.7007755
0
Creates a form to edit a Team entity.
Создает форму для редактирования сущности Team.
protected function createEditForm($entity) { return parent::createBaseEditForm( $entity, new TeamType(), $this->generateUrl('admin_teams.update', array('id' => $entity->getId())) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createEditForm(Team $entity)\n {\n $form = $this->createForm(new TeamType(), $entity, array(\n 'action' => $this->generateUrl('zimzim_bundles_app_adminteam_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'button.update'));\n\n return $form;\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ZIMZIMBundlesAppBundle:Team')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Team entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ZIMZIMBundlesAppBundle:Team:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createEditForm(Team $team)\n {\n $form = $this->createForm(\n new TeamType(),\n $team,\n [\n 'action' => $this->generateUrl('teams_update', ['id' => $team->getId()]),\n 'method' => 'PUT',\n ]\n );\n\n $form->add(\n 'submit',\n 'submit',\n ['label' => 'Atnaujinti', 'attr' => ['class' => 'btn btn-success btn-lg btn-block']]\n );\n\n return $form;\n }", "public function edit(Team $team)\n {\n //\n }", "public function edit(Team $team)\n {\n //\n }", "public function edit(Team $team)\n {\n //\n }", "public function edit(Team $team)\n {\n //\n }", "public function edit(ProjectTeam $projectTeam)\n {\n //\n }", "public function newTeamAction() {\n $form = new Form_Admin_Client_Team();\n // Check for post to create new team.\n if ($this->_request->isPost()) {\n $params = $this->_request->getPost();\n if ($form->isValid($params)) {\n // Create a new team\n $tId = Repo_Team::getInstance()->addNew(\n $form->getValue('client'), $form->getValue('name'), $form->getValue('status'), $form->getValue('description')\n );\n // Redirect to package detail page\n $this->_redirect('/admin/client/team-detail/id/' . $tId);\n } else {\n $form->populate($params);\n }\n } else {\n // Set client context\n if ($this->_currentClientId) {\n $form->getElement('client')->setValue($this->_currentClientId);\n }\n }\n\n $this->view->form = $form;\n }", "public function editAction($id)\n {\n $em = $this->get('doctrine.orm.default_entity_manager');\n\n $team = $em->getRepository('LiuksUserBundle:Team')->find($id);\n\n if (!$team) {\n throw $this->createNotFoundException('Unable to find Team.');\n }\n\n if (false === $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')\n && $this->getUser() != $team->getCaptain()\n ) {\n throw $this->createAccessDeniedException('Unable to access this page!');\n }\n\n $editForm = $this->createEditForm($team);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render(\n 'LiuksUserBundle:Team:edit.html.twig',\n [\n 'team' => $team,\n 'form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ]\n );\n }", "public function action_edit() {\n\t\t$id = $this->request->param();\n\t\tif(!$id) {\n\t\t\t$this->request->redirect('/team');\n\t\t} else {\n\t\t\t$view = View::factory('team_edit');\n\t\t\t$team = DB::select()->from('teams')->where('teams_id','=',$id)->execute()->current();\n\t\t\tif($this->user == $team['captain']) {\n\t\t\t\t$view->mods = $team['mods'];\n\t\t\t\t$view->name = $team['name'];\n\t\t\t\t$view->description = $team['description'];\n\t\t\t\tif($_POST) {\n\t\t\t\t\t$mods = $_POST['mods'];\n\t\t\t\t\t$name = $_POST['name'];\n\t\t\t\t\t$description = $_POST['description'];\n\t\t\t\t\tif(DB::update('teams')->set(array('mods' => $mods,'name' => $name, 'description' => $description))->where('teams_id','=',$team['teams_id'])->execute())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->request->redirect(\"/team?editwin\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->request->redirect(\"/team?editfail\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->template->content = $view;\n\t\t\t} else {\n\t\t\t\t$this->request->redirect(\"/?accessdenied\");\n\t\t\t}\n\t\t}\n\t}", "public function newAction()\n {\n $entity = new Team();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ZIMZIMBundlesAppBundle:Team:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t$project = Project::find($id);\n\t\t$managers = Member::where('memberType', '=',1)->get();\n\t\t$developers = Member::where('memberType', '=',2)->get();\n\t\t$designers = Member::where('memberType','=',3)->get();\n\t\t$clients = Member::where('memberType','=',4)->get();\n\t\t$members = ProjectTeam::where('projectId','=',$id)->first()->get();\n\t\tforeach ($members as $member) {\n\t\t\t\t\t$team[] = $member->memberId;\n\t\t\t\t}\t\n\t\t\t\t\n\t\treturn View::make('admin.teams.create')\n\t\t\t\t\t\t->with('project',$project)\n\t\t\t\t\t\t->with('managers',$managers)\n\t\t\t\t\t\t->with('developers',$developers)\n\t\t\t\t\t\t->with('designers',$designers)\n\t\t\t\t\t\t->with('clients',$clients)\n\t\t\t\t\t\t->with('teams',$team);\n\t}", "public function edit(Team $team)\n {\n $team = Team::where('id',$team->id)->first(); \n\n return view('admin.team.edit',compact(['team']));\n }", "public function edit($id)\n {\n $team = Team::find($id);\n return view('company.team.edit',compact('team'));\n }", "public function edit($id)\n {\n $row = Team::find($id);\n return view('teams.edit', ['team'=>$row]);\n }", "public function edit(Team $team)\n {\n\t\tabort_if(Gate::denies('team_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $users = User::all()->pluck('name', 'id');\n\n $team->load('users');\n\t\t\n return view('admin.teams.edit', compact('users','team'));\n }", "public function edit(Team $team)\n {\n $locales = Language::all();\n return view('admin.team.edit', compact('locales', 'team'));\n }", "public function edit($id)\n {\n // get the Team\n $team = Team::find($id);\n $users = User::all();\n\n // show the edit form and pass the Team\n return view('teams.edit', ['team' => $team, 'users' => $users]);\n }", "public function edit($id)\n\t{\n\t\t$team = Team::find($id);\n\n\t\treturn View::make('teams.edit', compact('team'));\n\t}", "protected function form()\n {\n return Admin::form(Teams::class, function (Form $form) {\n\n $form->display('id', '编号');\n\n //图片上传\n $form->image('img', '图片');\n\n $form->text('name', '姓名');\n\n $form->text('zhicheng', '职称');\n \n $form->text('work_time', '年限');\n\n //开关\n $states = [\n 'on' => ['value' => 1, 'text' => '展示', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '不展示', 'color' => 'danger'],\n ];\n $form->switch('is_show', '展示')->states($states);\n\n $form->editor('jianjie', '简介');\n\n $form->editor('fenge', '风格');\n\n $form->editor('exper', '经验');\n \n // 去掉重置按钮\n $form->disableReset();\n\n });\n }", "public function edit($id)\n {\n $DBTeam = Team::all();\n $edit = Team::find($id);\n return view(\"pages.edit.updateteam\", compact(\"edit\", \"DBTeam\"));\n }", "public function edit(CmorghTeam $cmorghTeam)\n {\n //\n }", "private function createEditForm(Turno $entity)\n {\n $form = $this->createForm(new TurnoType(), $entity, array(\n 'action' => $this->generateUrl('turno_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Organismo $entity)\n {\n $form = $this->createForm(new OrganismoType(), $entity, array(\n 'action' => $this->generateUrl('organismo_update', array('id' => $entity->getcodOrganismo())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Team $team)\n {\n $user = Auth::user();\n return view('teams.edit',compact('team','user'));\n }", "public function newAction()\n {\n $team = new Team();\n $form = $this->createCreateForm($team);\n\n return $this->render(\n 'LiuksUserBundle:Team:new.html.twig',\n [\n 'team' => $team,\n 'form' => $form->createView(),\n ]\n );\n }", "public function edit(Team $team)\n {\n return view('teams.edit', ['team' => $team, 'games' => Game::all()]);\n }", "private function createEditForm(Labs $entity)\n {\n $form = $this->createForm(new LabsType(), $entity, array(\n 'action' => $this->generateUrl('labs_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Team $team)\n {\n return view('teams.editteam', compact('team'));\n }", "protected function createEditForm()\n {\n $optionsForm = [\n 'action' => $this->generateUrl($this->configArray['update'], array('id' => $this->entity->getId())),\n 'method' => 'PUT',\n ];\n if (is_array($this->optionsForm)) {\n foreach ($this->optionsForm as $key => $value) {\n $optionsForm[$key] = $value;\n }\n }\n $form = $this->createForm($this->configArray['editType'], $this->entity, $optionsForm);\n\n $form\n ->add('save', SubmitType::class, array(\n 'translation_domain' => 'MWSimpleAdminCrudBundle',\n 'label' => 'views.new.save',\n 'attr' => array(\n 'class' => 'form-control btn-success',\n 'col' => 'col-lg-2 col-md-4',\n )\n ))\n ;\n\n if ($this->configArray['saveAndAdd']) {\n $form\n ->add('saveAndAdd', SubmitType::class, array(\n 'translation_domain' => 'MWSimpleAdminCrudBundle',\n 'label' => 'views.new.saveAndAdd',\n 'attr' => array(\n 'class' => 'form-control btn-primary',\n 'col' => 'col-lg-3 col-md-4',\n )\n ))\n ;\n }\n\n return $form;\n }", "public function edit(Team $team)\n {\n return view('teams.edit', compact('team'));\n }", "private function createEditForm(Terceros $entity)\r\n {\r\n $form = $this->createForm(new TercerosType(), $entity, array(\r\n 'action' => $this->generateUrl('terceros_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "public function edit($id)\n {\n $team = $this->teamModel->find($id);\n\n return view('team.edit',compact('team'));\n }", "public function edit(Team $team)\n {\n return view('admin.pages.team.edit', compact('team'));\n }", "public function edit(TeamManagement $team)\n {\n return view('employer-dashboard.edit-team', compact('team'));\n }", "public function edit($id)\n {\n $team = Team::find($id);\n $name = $team->name;\n $title = $team->title;\n $desc = $team->desc;\n $facebook = $team->facebook;\n $twitter = $team->twitter;\n $google = $team->google;\n $linkedin = $team->linkedin;\n return view('admin.team.edit',compact('name','title','desc','facebook','twitter','google','linkedin','id'));\n }", "public function edit($id)\n {\n $team = Team::findOrFail($id);\n return view('team.edit', compact('team'));\n }", "private function createCreateForm(Team $entity)\n {\n $form = $this->createForm(new TeamType(), $entity, array(\n 'action' => $this->generateUrl('zimzim_bundles_app_adminteam_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'button.create'));\n\n return $form;\n }", "protected function createComponentRegisterTeam()\n\t{\n\t\t$form = new Form();\n\t \n\t\t$form->addSelect('teamId', 'Tým: ', $this->model->getTeams()->order('name ASC')->fetchPairs('id', 'name'))\n\t\t\t->setRequired();\n\t \n\t\t$form->addSelect('competitionId', 'Soutěž: ', $this->model->getCompetitions()->order('id ASC')->fetchPairs('id', 'name'))\n\t\t\t->setRequired();\n\t \n\t\t$form->addSelect('seasonId', 'Sezona: ', $this->model->getSeasons()->order('start_date DESC')->fetchPairs('id', 'name'))\n\t\t\t->setRequired();\n\t \n\t\t$form->addSubmit('save', 'Uložit');\n\t \n\t\t$form->onSuccess[] = callback($this, 'registerTeamSubmitted');\n\t \n\t\treturn $form;\n\t}", "public function edit($id)\n {\n $team = Team::find($id);\n if ($team) {\n return view('backend.teams.edit',compact('team'));\n } else {\n return abort(404);\n }\n\n }", "private function createEditForm(SLA $entity)\n {\n $form = $this->createForm(new SLAType(), $entity, array(\n 'action' => $this->generateUrl('backend_sla_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Clubes $entity)\n {\n $form = $this->createForm( ClubesType::class, $entity, array(\n //'action' => $this->generateUrl('proyectosescolares_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Actualizar'));\n\n return $form;\n }", "public function edit($id)\n {\n $team = Team::findOrFail($id);\n return view('team.update')->with('team', $team); \n }", "private function createEditForm(Alumno $entity)\n {\n $form = $this->createForm(new AlumnoType(), $entity, array(\n 'action' => $this->generateUrl('alumno_update', array('id' => $entity->getIdAlumno())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr' => array('class' => 'btn btn-primary square-btn-adjust',\n )));\n return $form;\n }", "public function edit($id)\n { \n $teammember = Team::where('id', $id)->first();\n return view('admin.team.edit' , compact('teammember'));\n }", "public function edit(Team $team, $id)\n {\n $teams = DB::table('teams')\n ->select('id','user_id','nama_team', 'nama_tugas')\n ->where('id', '=', $id)\n ->first();\n $users = DB::table('users')\n ->select('name', 'id')\n ->get(); \n return view('team.edit',compact('teams', 'users' ));\n }", "public function edit(Tournament $tournament)\n {\n //\n }", "public function edit($id)\n {\n $team = Team::findOrFail($id);\n $admin = Auth::user()->admin()->get();\n $username = User::findOrFail($team->user_id)->username;\n return view('admin.teams.edit')->with(array('admin' => $admin, 'team' => $team, 'username' => $username));\n }", "private function createEditForm(Experience $entity) {\n $form = $this->createForm(new ExperienceType(), $entity, array(\n 'action' => $this->generateUrl('experience_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function showEditForm($id)\n {\n $pageTitle = 'Edit mentor';\n $language = \"en\";\n $mentor = $this->mentorManager->getMentor($id);\n\n $loggedInUser = Auth::user();\n $enableSpecialtiesInsertion = !empty($loggedInUser);\n\n // when it is not a public form, get all specialties, else get only public specialties\n if (!empty($loggedInUser)) {\n $specialties = $this->specialtyManager->getAllSpecialties();\n } else {\n $specialties = $this->specialtyManager->getPublicSpecialties();\n }\n\n $industries = $this->industryManager->getAllIndustries();\n $residences = $this->residenceManager->getAllResidences();\n $references = $this->referenceManager->getAllReferences();\n $mentorSpecialtiesIds = $this->specialtyManager->getMentorSpecialtiesIds($mentor);\n $mentorIndustriesIds = $this->industryManager->getMentorIndustriesIds($mentor);\n $companies = $this->companyManager->getAllCompanies();\n $universities = $this->universityManager->getAllUniversities();\n $educationLevels = $this->educationLevelManager->getAllEducationLevels();\n $mentorStatuses = $this->mentorStatusManager->getAllMentorStatuses();\n\n $formTitle = 'Edit mentor';\n return view('mentors.forms.create_edit', ['mentor' => $mentor,\n 'formTitle' => $formTitle,\n 'residences' => $residences, 'references' => $references,\n 'specialties' => $specialties, 'industries' => $industries,\n 'mentorSpecialtiesIds' => $mentorSpecialtiesIds,\n 'mentorIndustriesIds' => $mentorIndustriesIds, 'loggedInUser' => $loggedInUser,\n 'universities' => $universities, 'educationLevels' => $educationLevels,\n 'companies' => $companies,\n 'mentorStatuses' => $mentorStatuses, 'pageTitle' => $pageTitle, 'publicForm' => false,\n 'language' => $language, 'enableSpecialtiesInsertion' => $enableSpecialtiesInsertion\n ]);\n }", "protected function createCreateForm($entity)\n {\n return parent::createBaseCreateForm(\n $entity,\n new TeamType(),\n $this->generateUrl('admin_teams.create')\n );\n }", "public function edit($id)\n {\n $team = Team::findOrFail($id);\n $factions = Faction::All();\n return View::make('dashboard.teams.edit', [\n 'team' => $team,\n 'factions' => $factions\n ]);\n }", "public function edit($id)\n {\n $team = $this->teamRepository->find($id);\n\n if (empty($team)) {\n Flash::error('Jamoa topilmadi');\n\n return redirect(route('teams.index'));\n }\n\n return view('teams.edit')->with('team', $team);\n }", "public function teamDetailAction() {\n $id = $this->_request->getParam('id');\n $team = new Object_Team($id);\n $teamId = $team->getId();\n if (empty($teamId)) {\n // No team defined, redirect to list.\n $this->_redirect('/admin/client/team');\n return false;\n }\n $form = new Form_Admin_Client_Team(false, array('team' => $team));\n\n // Check for team update\n if ($this->_request->isPost()) {\n $params = $this->_request->getPost();\n if ($form->isValid($params)) {\n // Update team if necessary\n $form->updateTeam($team);\n $form->setTeam($team);\n } else {\n $form->populate($params);\n }\n }\n\n $this->view->team = $team;\n $this->view->client = new Object_Client($team->client_id);\n $this->view->form = $form;\n\n // Team packages and users\n $this->view->teamPackages = Repo_TeamPackage::getInstance()->getTeamPackages($teamId);\n $this->view->teamUsers = Repo_TeamUser::getInstance()->getTeamUsers($teamId);\n $this->view->teamTeams = Repo_TeamTeam::getInstance()->getTeamChildren($teamId);\n }", "function tourney_league_edit($league) {\n drupal_set_title(t('Edit League: @title', array('@title' => $league->label)));\n return drupal_get_form('tourney_league_form', $league);\n}", "private function createEditForm(Clock $entity)\n {\n $form = $this->createForm(new ClockType(), $entity, array(\n 'action' => $this->generateUrl('clock_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier', 'attr' => array('class' => 'btn btn-default')));\n\n return $form;\n }", "private function createEditForm(TipoServicio $entity)\n {\n $form = $this->createForm(\n new TipoServicioType(),\n $entity,\n array(\n 'action' => $this->generateUrl('administracion_tiposervicio_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n )\n );\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Registered_team $registered_team)\n {\n //\n }", "public function create()\n {\n return view('admin.team.create');\n }", "public function create()\n {\n return view('admin.team.create');\n }", "public function create()\n {\n return view('admin.team.create');\n }", "private function createEditForm(Activo $entity) {\n $form = $this->createForm(new ActivoType(), $entity, array(\n 'action' => $this->generateUrl('activo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "public function create()\n {\n return view('admin.team.create');\n }", "public function edit($id)\n {\n $teams=Team::where('id',$id)->first();\n $data=[\n 'teams'=>$teams\n ];\n return view('Backend.teams.edit',$data);\n }", "public function edit(TeamMember $teamMember)\n {\n //\n }", "public function edit(TeamMember $teamMember)\n {\n //\n }", "public function edit(TeamMember $teamMember)\n {\n //\n }", "private function createEditForm(Live $entity)\n {\n $form = $this->createForm(LiveType::class, $entity, array(\n 'action' => $this->generateUrl('live_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit($id) {\n $league = League::withTrashed()->where('id', $id)->first();\n if (empty($league)) {\n abort(404);\n }\n\n $form = new AdministrationForm();\n $form->route(Administration::route('leagues.update', $league->id));\n $form->form(LeaguesForm::class);\n $form->model($league);\n $form->method('PUT');\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('leagues::admin.module_name'), Administration::route('leagues.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('leagues::admin.league') . ' - ' . trans('administration::admin.edit') . ' #' . $league->id);\n\n return $form->generate();\n }", "private function createEditForm( Tip $entity ) {\n\t\t$form = $this->createForm( new TipType(),\n\t\t\t$entity,\n\t\t\tarray(\n\t\t\t\t'action' => $this->generateUrl( 'tips_update', array( 'id' => $entity->getId() ) ),\n\t\t\t\t'method' => 'PUT',\n\t\t\t\t'attr' => array( 'class' => 'box-body' )\n\t\t\t) );\n\n\t\t$form->add(\n\t\t\t'submit',\n\t\t\t'submit',\n\t\t\tarray(\n\t\t\t\t'label' => 'Actualizar',\n\t\t\t\t'attr' => array( 'class' => 'btn btn-primary pull-right' ),\n\t\t\t)\n\t\t);\n\n\t\treturn $form;\n\t}", "private function createEditForm(Users $entity)\n {\n\n $ut = new RoleController();\n $em = $this->getDoctrine()->getManager();\n $role = $ut->allRoleAction($em);\n $roles = array();\n foreach ($role as $value ) {\n $arr = (array)($value);\n $roleId = array_shift($arr);\n $roleName = array_shift($arr);\n $roles += [$roleId => $roleName];\n }\n//var_dump($roles);\n\n\n $form = $this->createForm(new UsersType(), $entity, array(\n 'action' => $this->generateUrl('users_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('roless', 'choice', array('label' => 'Выберите роль',\n 'multiple' => false,\n 'choices' => $roles,\n 'mapped'=>false,\n 'data'=> $entity->getDbRole()\n ));\n\n $form->add('passwort','text',array(\n 'label' => 'Новый пароль',\n 'mapped'=>false,\n 'required'=>false\n ));\n $form->add('reiting');\n $form->add('enabled');\n $form->add('locked');\n\n\n $form->add('submit', 'submit', array('label' => 'Обновить'));\n\n return $form;\n }", "function edit()\n {\n\t\t$args = new safe_args();\n\t\t$args->set( 'key', NOTSET, 'any');\n\t\tforeach( describeColumns('sales_teams') as $fieldName => $fieldValue )\n\t\t\t$args->set( $fieldName, NOTSET, 'any');\t\n\t\t$args = $args->get(func_get_args()); \n\t\t\n \t\tswitch($args['key'])\n\t\t{\n\t\t\tcase 'Save':\n\t\n\t\t\t\tif ( $args['team_id'] != \"\") \t\t\t// UPDATE an existing team\n\t\t\t\t\tupdateRow( 'sales_teams', 'team_id', $args);\n\t\t\t\telse \t\t\t\t\t\t\t// New team so we build an INSERT\n\t\t\t\t\t$args['team_id'] = insertRow( 'sales_teams', 'team_id', $args);\n\t\t\t\t// use to reload main window after some change\n\t\t\t\t$result['save'] = 'true';\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t// NO Break for 'Save' case\t\t\n\t\t\tdefault:\n\t\t\t\t$GLOBALS['appshore_data']['layout'] = 'popup';\t\n\t\t\t\t$result['action']['sales'] = 'edit';\n\t\t\t\tif ( $args['team_id']) \t// Edit existing team\n\t\t\t\t\t$result['team'] = $this->buildTeamView( $args['team_id'] );\n\t\t\t\t\t\n\t\t\t\t$result['users'] = getManyAssocArrays( 'select user_id, user_name, full_name from users where is_salespeople = \"Y\" order by last_name');\n\t\t\t\t$result['teams'] = $this->getTeams( $args['team_id'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t} \n\n return $result;\n }", "private function createCreateForm(Team $team)\n {\n $form = $this->createForm(\n new TeamType(),\n $team,\n [\n 'action' => $this->generateUrl('teams_create'),\n 'method' => 'POST',\n ]\n );\n\n $form->add(\n 'submit',\n 'submit',\n ['label' => 'Sukurti', 'attr' => ['class' => 'btn btn-success btn-lg btn-block']]\n );\n\n return $form;\n }", "private function createEditForm(Proyecto $entity)\n {\n $form = $this->createForm(new ProyectoType(), $entity, array(\n 'action' => $this->generateUrl('proyecto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Project $entity)\n {\n $form = $this->createForm(new ProjectType(), $entity, array(\n 'action' => $this->generateUrl('project_edit', array('project' => $entity->getCode())),\n 'method' => 'POST'\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit($id)\n {\n $data['departments'] = Department::orderBy('id','desc')->get();\n $data['team'] = Team::with('members.user.department.users')->find($id);\n return view('team.edit')->with($data);\n }", "private function createEditForm(Vehicule $entity) {\n $form = $this->createForm(new VehiculeType(), $entity, array(\n 'action' => $this->generateUrl('vehicule_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n //--\n $form->add('submit', 'submit', array('label' => 'Modifier', 'attr' => array('class' => 'btn-primary span2 offset5')));\n //--\n return $form;\n }", "public function editAction($id) {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entity = $em->getRepository('GestionEmploisBundle:PlanEtude')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find PlanEtude entity.');\r\n }\r\n\r\n $editForm = $this->createForm(new PlanEtudeType(), $entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('GestionEmploisBundle:PlanEtude:edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "private function createEditForm(Project $entity)\n {\n $form = $this->createForm(ProjectType::class, $entity, array(\n 'action' => $this->generateUrl('project_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Update', 'validation_groups' => 'Edit'));\n\n return $form;\n }", "public function editAction()\n {\n $entity = $this->_getCredentialObject();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "private function createEditForm(Individu $entity) {\n//dump($entity);die;\n\t\t\t$form = $this->createForm(new IndividuType(),\n\t\t\t $entity,\n\t\t\t array(\n\t\t\t\t 'action' => $this->generateUrl('individu_update',\n\t\t\t\t array('id' => $entity->getId())),\n\t\t\t\t 'method' => 'PUT',\n\t\t\t ));\n\n\t\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n//\n//\t\t\treturn $form;\n\n\n\t\t\treturn $this->render('DomiAdresseBundle:Individu:edit.html.twig',\n\t\t\t array(\n\t\t\t\t 'form' => $form->createView(),\n\t\t\t ));\n\n\t\t\treturn $form;\n\t\t}", "private function createEditForm(TipoEmpresa $entity)\n {\n $form = $this->createForm(new TipoEmpresaType(), $entity, array(\n 'action' => $this->generateUrl('tiposempresa_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Project $entity)\n {\n $form = $this->createForm(new ProjectType(), $entity, array(\n 'action' => $this->generateUrl('admin_projects_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "private function createEditForm(Hora $entity)\n {\n $form = $this->createForm(new HoraType(), $entity, array(\n 'action' => $this->generateUrl('hora_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Casa $entity)\n {\n $form = $this->createForm(new CasaType(), $entity, array(\n 'action' => $this->generateUrl('casa_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Proyecto $entity)\n {\n $form = $this->createForm(new ProyectoType(), $entity, array(\n 'action' => $this->generateUrl('usuario_proyecto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "private function createEditForm(Recurso $entity)\n {\n $form = $this->createForm(new RecursoType(), $entity, array(\n 'action' => $this->generateUrl('aulas_recurso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr'=>array('class'=>'btn btn-default botonTabla')));\n $form->add('button', 'submit', array('label' => 'Volver a la lista','attr'=>array('formaction'=>'../../recurso','formnovalidate'=>'formnovalidate','class'=>'btn btn-default botonTabla')));\n\n return $form;\n }", "public function create()\n {\n return view('company.team.create');\n }", "public function Edit() {\n\n\t\t/* PARAMETER CHECK */\n\t\tif (!$this->parameter_check) { $this->Errors(\"Parameter check failed.\"); return False; }\n\t\t/* ENSURE THE TEAM NAME IS NOT EMPTY */\n\t\tif (EMPTY($this->team_name)) { $this->Errors(\"Team name can't be empty.\"); return False; }\n\t\t/* TEAM NAMES MUST BE CHARACTERS OR LETTERS */\n\t\tif (!IsAlphaNumeric($this->team_name)) { $this->Errors(\"Invalid team name. Use only alpha-numeric characters!\"); return False; }\n\t\t/* TEAM NAMES CAN'T BE DUPLICATED */\n\t\tif (RowExists(\"team_master\",\"team_name\",$this->team_name,\"\")) { $this->Errors(\"Team exists!\"); return False; }\n\n\t\t/* ADD */\n\t\t$db=$GLOBALS['db'];\n\t\t$sql=\"UPDATE \".$GLOBALS['database_ref'].\"team_master\n\t\t\t\t\tSET team_name = '\".$this->team_name.\"'\n\t\t\t\t\tWHERE player_id = \".$this->player_id.\"\n\t\t\t\t\t\";\n\t\t//echo $sql;\n\t\t$result=$db->Query($sql);\n\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\tLogHistory($this->team_name.\" edited\");\n\t\t\treturn True;\n\t\t}\n\t\telse {\n\t\t\treturn False;\n\t\t}\n\t}", "private function createEditForm(Instance $entity)\r\n {\r\n $form = $this->createForm(new InstanceType(), $entity, array(\r\n\t 'action' => $this->generateUrl('modifier_instance', array('id' => $entity->getId())),\r\n\t 'method' => 'PUT',\r\n\t ));\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n return $form;\r\n }", "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "protected function createComponentEditUserForm(): Form {\n $userId = $this->getParameter('id');\n $user = isset($userId) ? $this->userModel->getById($userId) : null;\n $teachers = $this->teacherModel->getAll();\n\n $form = new Form;\n $form->addEmail('email', 'Email')\n ->setRequired('Prosím vyplňte email.')\n ->setHtmlAttribute('autocomplete', 'off')\n ->setDefaultValue($user ? $user['email'] : '')\n ->setMaxLength(255);\n\n $pass1 = $form->addPassword('password', $user ? 'Nové heslo' : 'Heslo');\n\n $pass2 = $form->addPassword('passwordAgain', $user ? 'Nové heslo znovu' : 'Heslo znovu');\n\n if ($user === null) {\n $pass1->setRequired('Prosím vyplňte heslo');\n $pass2->setRequired('Prosím vyplňte heslo znovu');\n }\n\n if ($this->user->isInRole('admin')) {\n $form->addSelect('teacher', 'Učitel', array_reduce($teachers, function ($result, $teacher) {\n $result[$teacher['id']] = $teacher['dlouhe_jmeno'];\n return $result;\n }))\n ->setPrompt('Bez učitele')\n ->setDefaultValue($user['ucitel_id']);\n\n $form->addCheckbox('admin', 'Uživatel je admin')\n ->setDefaultValue($user ? $user['admin'] === '1' : false);\n } else {\n $form->addHidden('teacher', $user['ucitel_id']);\n $form->addHidden('admin', $user['admin']);\n }\n\n $form->addSubmit('send', $user ? 'Upravit' : 'Přidat');\n\n $form->onSuccess[] = [$this, 'onEdit'];\n return $form;\n }", "private function createEditForm(Colegiado $entity) {\n $form = $this->createForm(new ColegiadoType(), $entity, array(\n 'action' => $this->generateUrl('colegiado_update', array('id' => $entity->getId())),\n// 'method' => 'PUT',\n 'attr' => array('class' => 'box-body')\n ));\n\n $form->add(\n 'submit', 'submit', array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn btn-primary pull-right'),\n )\n );\n\n return $form;\n }", "public function edit($id)\n {\n // Retrieving models\n $team = TeamSection::find($id);\n $site_info = SiteInfo::first();\n\n return view('admin-panel.team-section.edit', compact('team', 'site_info'));\n }", "private function createEditForm(Plaisir $entity)\r\n {\r\n $form = $this->createForm(new PlaisirType(), $entity, array(\r\n 'action' => $this->generateUrl('plaisir_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "private function createEditForm(Seteo $entity)\n {\n $form = $this->createForm(new SeteoType(), $entity, array(\n 'action' => $this->generateUrl('seteo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm($entity)\n {\n $form = $this->createForm(new RucherType(), $entity, array(\n 'action' => $this->generateUrl('rucher_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n \n return $form;\n }", "private function createEditForm($projectId, UserProject $entity)\n {\n $form = $this->createForm(new UserProjectEditType(), $entity, array(\n 'action' => $this->generateUrl('collaborator_update', array(\n 'id' => $entity->getId(),\n 'projectId' => $projectId,\n )),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Vendedor $entity)\n {\n $form = $this->createForm(new VendedorType(), $entity, array(\n 'action' => $this->generateUrl('admin_vendedor_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }" ]
[ "0.7699607", "0.7262385", "0.7194452", "0.7190026", "0.7190026", "0.7190026", "0.7190026", "0.7061192", "0.69281936", "0.69189084", "0.6890762", "0.6871034", "0.6739284", "0.670017", "0.66660446", "0.6631659", "0.6630035", "0.66099226", "0.6581928", "0.65753186", "0.6566948", "0.6565515", "0.65569574", "0.65548235", "0.6547621", "0.6537241", "0.6521425", "0.65116", "0.6476852", "0.64508873", "0.644906", "0.64383984", "0.6433814", "0.64253634", "0.6422402", "0.6412287", "0.64031225", "0.6380553", "0.63548183", "0.6351235", "0.6343319", "0.6336403", "0.62908447", "0.6276467", "0.62751955", "0.6250817", "0.62140185", "0.62094754", "0.6207124", "0.6206115", "0.6203072", "0.61942524", "0.6194082", "0.618345", "0.6179337", "0.61665046", "0.61482227", "0.61438185", "0.61377865", "0.6129531", "0.6129531", "0.6129531", "0.61288744", "0.61286", "0.61254", "0.61249554", "0.61249554", "0.61249554", "0.6120152", "0.609325", "0.60839957", "0.6083285", "0.6078691", "0.6074729", "0.6068724", "0.6064773", "0.6044712", "0.6040119", "0.60397494", "0.6033174", "0.6030957", "0.6022881", "0.60162693", "0.60140806", "0.60134786", "0.59959793", "0.5993795", "0.59905785", "0.5973957", "0.5971704", "0.59691066", "0.59672856", "0.59642714", "0.5963571", "0.5957302", "0.5956878", "0.59559757", "0.5945478", "0.59392554", "0.5936187" ]
0.749754
1
Creates a form to delete a Team entity by id.
Создает форму для удаления сущности Team по идентификатору.
protected function createDeleteForm($id) { return parent::baseCreateDeleteForm( $this->generateUrl('admin_teams.delete', array('id' => $id)) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('teams_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', 'submit', ['label' => 'Ištrinti', 'attr' => ['class' => 'btn btn-danger btn-block']])\n ->getForm();\n }", "public function teamDeleteAction()\n { $id = $this->params()->fromRoute('id');\n if (! $id){\n return $this->redirect()->toRoute('admin');\n }\n\n //does a team have that id\n try {\n $team = $this->api()->search('team', ['id'=>$id]);\n } catch (InvalidArgumentException $exception) {\n return $this->redirect()->toRoute('admin');\n }\n\n $criteria = ['id' => $id];\n\n $qb = $this->entityManager->createQueryBuilder();\n $entityClass = 'Teams\\Entity\\Team';\n\n $qb->select('omeka_root')->from($entityClass, 'omeka_root');\n foreach ($criteria as $field => $value) {\n $qb->andWhere($qb->expr()->eq(\n \"omeka_root.$field\",\n $this->createNamedParameter($qb, $value)\n ));\n }\n $qb->setMaxResults(1);\n\n $entity = $qb->getQuery()->getOneOrNullResult();\n\n\n $request = new Request('delete','team');\n $event = new Event('api.hydrate.pre', $this, [\n 'entity' => $entity,\n 'request' => $request,\n ]);\n $this->getEventManager()->triggerEvent($event);\n\n\n //is it a post request?\n $request = $this->getRequest();\n if (! $request->isPost()) {\n return new ViewModel(['team'=>$team]);\n }\n\n //is it the right id and did they say confirm?\n// if ($id != $request->getPost('id')\n// || 'Delete' != $request->getPost('confirm')\n// ) {\n// return $this->redirect()->toRoute('admin/teams');\n// }\n if ($request->getPost('confirm') == 'Delete'){\n $this->api()->delete('team', ['id'=>$id]);\n return $this->redirect()->toRoute('admin/teams');\n }\n\n\n return $this->redirect()->toRoute('admin/teams');\n\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('organismo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('grhemployes_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tutorias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => \"Eliminar\", 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->get('doctrine.orm.default_entity_manager');\n $team = $em->getRepository('LiuksUserBundle:Team')->find($id);\n\n if (!$team) {\n throw $this->createNotFoundException('Unable to find Team team.');\n }\n\n if (false === $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')\n && $this->getUser() != $team->getCaptain()\n ) {\n throw $this->createAccessDeniedException('Unable to access this page!');\n }\n\n $em->remove($team);\n $em->flush($team);\n }\n\n return $this->redirect($this->generateUrl('teams'));\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sites_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('experience_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n\t\t\treturn $this->createFormBuilder()\n\t\t\t ->setAction($this->generateUrl('voie_delete', array('id' => $id)))\n\t\t\t ->setMethod('DELETE')\n\t\t\t ->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t ->getForm();\n\t\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('project_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reservaciones_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('organizer_event_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Löschen ', 'attr' => array('class' => 'btn btn-danger pull-right deleteEvent')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('schedule_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('terceros_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('festivos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('activo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('lead_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('turno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n $team = Team::findOrFail($id);\n $team->delete();\n\n return redirect('admin/teams');\n }", "public function delete_team($id)\n {\n DB::table('users')\n ->where('users_team_id', '=', $id)\n ->update(['users_team_id' => 0]);\n\n DB::table('teams')->where('id', '=', $id)->delete();\n\n return redirect('/team/all');\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('ZIMZIMBundlesAppBundle:Team')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Team entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->deleteSuccess();\n }\n\n return $this->redirect($this->generateUrl('zimzim_bundles_app_adminteam'));\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('plaisir_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tariff_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n $projet = $this->getDoctrine()->getManager()->getRepository(Projets::class)->find($id);\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fixit_construction_project_delete', array('id' => $projet->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_vendedor_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('supprimer_instance', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm();\r\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('typetable_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('alumno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modelo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('config_project_type_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', 'submit', ['label' => 'Delete'])\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zz_app_usersmoke_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('labs_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vehicule_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('supprimer', 'submit', array('label' => 'S', 'attr' => array('class' => 'btn-supp btn-danger', 'title' => 'Supprimer')))\n //--\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n\t\t\treturn $this->createFormBuilder()\n\t\t\t ->setAction($this->generateUrl('individu_delete', array('id' => $id)))\n\t\t\t ->setMethod('DELETE')\n\t\t\t ->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t ->getForm();\n\t\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('curso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('termofuse_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zastepstwo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Skasuj zastępstwo','attr' => array('class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('actividades_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hora_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userroles_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visita_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n /* return $this->createFormBuilder()\n ->setAction($this->generateUrl('encargadoproyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;*/\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('supplier_campaign_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_object_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить номер'))\n ->getForm();\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administradores_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tache_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function deleteTeam_post() {\r\n $this->form_validation->set_rules('TeamGUID', 'TeamGUID', 'trim|required|callback_validateEntityGUID[Teams,TeamID]');\r\n $this->form_validation->validation($this); /* Run validation */\r\n\r\n /* Delete Team Data */\r\n $this->Football_model->deleteTeam($this->TeamID);\r\n $this->Return['Message'] = \"Team deleted successfully.\";\r\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('causencias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_projects_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('corporation_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-primary btn-small'\n )\n ))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('fiscalizacion_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('secteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('submit', 'submit', array('label' => ' ','attr'=>array('class'=>'btn-supp','title'=>'Supprimer')))\n //--\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => ' Eliminar', 'attr' => array('icon' => 'remove' )))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuariointerno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_tiposervicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('komentarz_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Skasuj Komentarz','attr' => array('class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnico_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cdeudas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyectosescolares_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_shipmentZone_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clientes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('antecedentepenal_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr'=>array('class'=>'btn btn-primary')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('colegiado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('busstop_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vitrine_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'title.sim', 'translation_domain' => 'messagesCommonBundle', 'attr' => array('class' => 'btn btn-success btn-lg bt-delete-foto')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tiposempresa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('group_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solicitud_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('profissao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Obrazki_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_ModuleStage_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('abstract_video_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('main_user2_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('service_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', 'attr'=> array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n $icon = '<i class=\"icon icon-remove\"></i>';\r\n //$icon = html_ ($icon);\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('article_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer l\\'article courant'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zimzim_opinion_opinion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'button.delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cuestionarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ctrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_video_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('precios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comptecomptable_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('cr_backend_fininstitut_delete', array('id' => $id)))\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('grhcontrats_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Supprimer'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('campodocumento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sidplaactividad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('absensi_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comentarioproyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reservecalendar_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('masdocumentos_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('naf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sermon_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_recurso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('costo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registro_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr' => array('class' => 'btn btn-danger btn-sm')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('live_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyecto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }" ]
[ "0.7677506", "0.6891556", "0.6834711", "0.68207765", "0.6813052", "0.6793817", "0.6748436", "0.6726233", "0.6672635", "0.66701204", "0.6670108", "0.6667128", "0.66669333", "0.6654682", "0.6652604", "0.6652385", "0.66489923", "0.6648336", "0.6648105", "0.6644232", "0.66433465", "0.66417617", "0.66399205", "0.66337246", "0.6631225", "0.6628814", "0.6626679", "0.66203445", "0.66169214", "0.6615608", "0.6615258", "0.66104597", "0.66101915", "0.6608604", "0.6602233", "0.6601389", "0.65963864", "0.65827143", "0.65826184", "0.6581541", "0.65796226", "0.65757257", "0.6574788", "0.65728676", "0.65721446", "0.65720767", "0.6571918", "0.65707004", "0.6568095", "0.6558631", "0.65500814", "0.65413445", "0.65412164", "0.6539539", "0.6537244", "0.6536048", "0.6535606", "0.6534237", "0.65308374", "0.65267736", "0.65234524", "0.65220726", "0.6516353", "0.65160704", "0.6515028", "0.651478", "0.6514631", "0.6514471", "0.65119547", "0.6511042", "0.65103006", "0.6507471", "0.65066797", "0.6504957", "0.6501971", "0.6499813", "0.649786", "0.6497196", "0.6496884", "0.64955753", "0.64930016", "0.6492184", "0.6490864", "0.64908487", "0.6488815", "0.6488706", "0.648833", "0.6486748", "0.64820725", "0.6479023", "0.6474967", "0.64743686", "0.64727134", "0.64717317", "0.64715606", "0.6469676", "0.6469246", "0.646872", "0.6466036", "0.64653903" ]
0.76213104
1
Validate that user is a copyeditor in the selected journal. Redirects to user index page if not properly authenticated.
Проверьте, является ли пользователь редактором копий в выбранном журнале. Перенаправляет на страницу индекса пользователей, если не прошел проверку подлинности.
function validate() { parent::validate(); $journal = &Request::getJournal(); if (!isset($journal) || !Validation::isCopyeditor($journal->getJournalId())) { Validation::redirectLogin(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate() {\n\t\tparent::validate();\n\t\t$journal = &Request::getJournal();\n\t\t// FIXME This is kind of evil\n\t\t$page = Request::getRequestedPage();\n\t\tif (!isset($journal) || ($page == 'sectionEditor' && !Validation::isSectionEditor($journal->getJournalId())) || ($page == 'editor' && !Validation::isEditor($journal->getJournalId()))) {\n\t\t\tValidation::redirectLogin();\n\t\t}\n\t}", "public function index() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n redirect(ADMIN_ENC_URL.'/documents/display_documents_list');\n }\n }", "public static function protect_pages(){\n global $post;\n if($post->ID == 1599 || $post->ID ==1597 || $post->ID ==1591 || $post->ID ==1458 || $post->ID ==1516 || $post->ID ==1315 || $post->ID ==1345 || $post->ID ==1344 || $post->ID ==1343){\n if(! is_user_logged_in()){\n wp_redirect(home_url() . '/wp-admin');\n }\n }\n }", "function my_login_redirect( $redirect_to, $request, $user ){ global $user;\n if( isset( $user->roles ) && is_array( $user->roles ) ) {\n //check for admins\n if( in_array( \"customer\", $user->roles ) ) {\n // redirect them to the default place\n return admin_url('admin.php?page=bp_documents_overview');\n } elseif( in_array( \"administrator\", $user->roles ) || in_array( \"editor\", $user->roles ) ) {\n return $redirect_to;\n }\n }\n else {\n return $redirect_to;\n }\n}", "function admin_protect(){\r\n\t\tglobal $user_data;\r\n\t\tif(has_access($user_data['user_id'], 3) === false){\r\n\t\t\theader('Location: index.php');\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "private function _check_user()\n {\n /* if already login */\n if($this->kulkul_auth->user())\n {\n $user = (object) $this->kulkul_auth->user();\n if($user->is_admin != 1)\n {\n show_error('You do not have sufficient permissions to access this page', \n '403',\n 'Access Forbidden');\n exit();\n }elseif($user->is_admin == 1){\n redirect('admin');\n }\n }\n }", "public function admin_can_view() {\n\n // Editors and above can preview documents\n // TODO: Should authors be able to preview their own docs?\n //current_user_can('edit_pages') &&\n\n $esig_preview = isset($_GET['esigpreview']) ? $this->validation->esig_clean($_GET['esigpreview']) : NULL;\n\n $allow = apply_filters(\"can_view_preview_document\", false);\n\n if ($allow) {\n return $allow;\n }\n\n if (isset($esig_preview) && $esig_preview == \"1\") {\n if (!is_user_logged_in()) {\n $redirect = home_url() . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']);\n wp_redirect($redirect);\n exit;\n } else {\n\n $esigrole = new WP_E_Esigrole();\n $doc_id = $this->validation->esig_valid_int($_GET['document_id']);\n if ($esigrole->user_can_view_document($doc_id)) {\n return true;\n } else {\n return false;\n }\n }\n } else {\n\n return false;\n }\n }", "public function i4_restrict_admin() {\n\n if (!current_user_can('edit_pages') && !(defined('DOING_AJAX') && DOING_AJAX)) {\n wp_safe_redirect(site_url());\n exit;\n }\n }", "function checkAccessHistory() {\n\t\t$mainframe = & JFactory::getApplication() ;\n\t\t$Itemid = JRequest::getInt('Itemid');\t\t\n\t\t$user = & JFactory::getUser();\n\t\tif (!$user->get('id')) {\n\t\t\t$mainframe->redirect('index.php?option=com_eventbooking&Itemid='.$Itemid, JText::_('NOT_AUTHORIZED'));\n\t\t}\n\t}", "protected function checkRedirect() {}", "public function validateAfterLogin(){\n\t\t$adminSessionId = $this->Session->read('Auth.Admin.Admin.id');\n\t\tif($adminSessionId != '')\n\t\t\t$this->redirect('/admin/admins/dashboard/');\n\t}", "protected function is_login()\n {\n if (!(ab_is_admin() || ab_is_editor())) {\n redirect($this->path.'auth/login');\n }\n }", "function initiateCopyedit() {\n\t\t$monographId = Request::getUserVar('monographId');\n\t\t$this->validate($monographId, SERIES_EDITOR_ACCESS_EDIT);\n\t\t$submission =& $this->submission;\n\n\n\t\tSeriesEditorAction::initiateCopyedit($submission);\n\t\tRequest::redirect(null, null, 'submissionEditing', $monographId);\n\t}", "function restrict(){\n if($this->is_logged_in() == false)\n {\n redirect('_admin/test');\n }\n }", "protected function _checkIfUserIsAdmin()\n {\n if(!Core_Model_Session::get('admin_status')) {\n $this->_dangerFlash('Admins Only');\n $this->headerRedirect('schedule','calendar','index');\n }\n }", "public function admin_protect() {\n global $user_data; \n \n if($this->is_admin($user_data['user_id']) == 0) {\n header(\"Location: index.php\");\n exit();\n }\n }", "public function authorize()\n {\n // get the document from the URL parameter\n /** @var Document $document */\n $document = $this->route('document');\n\n // only authorize if the document is owned by the current authenticated user\n return (int)$this->user()->id === (int)$document->user_id;\n }", "function edit_document_perm_check( $user, $post ) {\n\n\t\tif ( !$this->check_permission( $post->ID, 'edit' ) )\t\t\n\t\t\treturn false;\n\t\t\n\t\treturn $user;\n\t\t\t\t\t\n\t}", "function adminLoginCheck() {\n\t\tif($this->isAdminLoggedIn() === false) {\n\t\t\t$this->setFlashMessage('You must be logged in to view that page.', false);\n\t\t\t$this->loginRedirect();\n\t\t}\n\t}", "public function redirectIfNotAdmin()\n {\n // Redirect to login page, if isLoggedIn() method returns false\n if (!$this->isLoggedIn() || $this->getUserRole() !== 'admin') {\n $this->msg->error('You are now allowed to access this page.', '/admin');\n die();\n }\n }", "function redirect_non_authorized_user() {\n if ( is_user_logged_in() && ! current_user_can( 'manage_options' ) ) {\n wp_redirect( home_url( '/espace-presse' ) );\n exit();\n }\n}", "private function isAllowed(){\n\t\tif($this->currentUserType != self::FACULTY){\n\t\t\tredirect('/home');\n\t\t}\n\t}", "private function checkUser(){\r\n\t\tif (!$this->user_model->is_logged_in() ) {\r\n\t\t\tredirect('user/login');\r\n\t\t}elseif ($this->session->userdata('role') == ('clerk')) {\r\n\t\t\tredirect('booking/all');\r\n\t\t}\r\n\t}", "function adminOnly()\n{\n if (!isAdmin()) {\n redirect('../');\n }\n}", "public function checklogin()\n {\n /*************** check admin identity ************/\n if(!$_SESSION['User']['session']) \n { \n $this->_redirect('index'); \n } \n }", "protected function outputLoginFormIfNotAuthorized() {}", "function cne_ac_block_users_admin_area() {\n if ( is_admin() && ( current_user_can( 'subscriber' ) && !current_user_can( 'bbp_keymaster' ) ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) :\n wp_redirect( home_url() );\n exit;\n endif;\n}", "function admin_access() {\r\n if(!is_admin()) {\r\n redirect_to();\r\n }\r\n }", "function getUserPermViewDraft($userId, $articleId, &$journal, $fileName) {\n\t\t$journalId = $journal->getId();\n\n\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t$roles =& $roleDao->getRolesByUserId($userId);\n\t\tforeach ($roles as $role) {\n\t\t\t$roleType = $role->getRoleId();\n\t\t\tif ($roleType == ROLE_ID_SITE_ADMIN) return ROLE_ID_SITE_ADMIN;\n\n\t\t\tif ($role->getJournalId() == $journalId) {\n\t\t\t\tswitch ($roleType) {\n\t\t\t\t\t// These users get global access\n\t\t\t\t\tcase ROLE_ID_JOURNAL_MANAGER :\n\t\t\t\t\tcase ROLE_ID_EDITOR :\n\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_SECTION_EDITOR :\n\t\t\t\t\t\t$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');\n\t\t\t\t\t\t$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($articleId);\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t$sectionEditorSubmission != null &&\n\t\t\t\t\t\t\t$sectionEditorSubmission->getJournalId() == $journalId &&\n\t\t\t\t\t\t\t$sectionEditorSubmission->getDateSubmitted() != null\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// If this user isn't the submission's editor, they don't have access.\n\t\t\t\t\t\t\t$editAssignments =& $sectionEditorSubmission->getEditAssignments();\n\n\t\t\t\t\t\t\tforeach ($editAssignments as $editAssignment) {\n\t\t\t\t\t\t\t\tif ($editAssignment->getEditorId() == $userId) {\n\t\t\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_LAYOUT_EDITOR :\n\t\t\t\t\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO');\n\t\t\t\t\t\tif ($signoffDao->signoffExists('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId, $userId)) {\n\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_PROOFREADER :\n\t\t\t\t\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO');\n\t\t\t\t\t\tif ($signoffDao->signoffExists('SIGNOFF_PROOFING', ASSOC_TYPE_ARTICLE, $articleId, $userId)) {\n\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_COPYEDITOR:\n\t\t\t\t\t\t$sesDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');\n\t\t\t\t\t\tif ($sesDao->copyeditorExists($articleId, $userId))\n\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_AUTHOR:\n\t\t\t\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t\t\t\t$article =& $articleDao->getArticle($articleId, $journalId);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t$article &&\n\t\t\t\t\t\t\t$article->getUserId() == $userId &&\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t$article->getStatus() == STATUS_QUEUED ||\n\t\t\t\t\t\t\t\t$article->getStatus() == STATUS_PUBLISHED\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ROLE_ID_REVIEWER:\n\t\t\t\t\t\t// Find out if article currently has this reviewer.\n\t\t\t\t\t\t$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');\n\t\t\t\t\t\t$reviewAssignments = $reviewAssignmentDao->getBySubmissionId($articleId);\n\t\t\t\t\t\tforeach ($reviewAssignments as $assignment) {\n\t\t\t\t\t\t\tif ($assignment->getReviewerId() == $userId) {\n\t\t\t\t\t\t\t\t// REVIEWER ACCESS: If reviewers are not supposed\n\t\t\t\t\t\t\t\t// to see list of authors, REVIEWER ONLY GETS TO\n\t\t\t\t\t\t\t\t// SEE document-review.pdf version, which has\n\t\t\t\t\t\t\t\t// all author information stripped.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t$this->getSetting($journalId, 'reviewVersion') != true ||\n\t\t\t\t\t\t\t\t\t$fileName == 'document-review.pdf'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn $roleType;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }", "public function redirectIfNotAdmin(){\n if ( !isset($_SESSION['user']['role']) || $_SESSION['user']['role'] !== 'admin') {\n header('Location:index.php');\n exit();\n }\n }", "public function allowEdit()\n {\n $current_user = Context::getInstance()->getUser();\n return $current_user->getId() === $this->getIdUser();\n }", "private function _checkValidUser()\n\t{\n\t\t$user = $this->getUser();\n\t\tif(empty($user)) throw new AccessDeniedException();\n\t\t$this->user_id = $user->getId();\n\t\t$this->em = $this->getDoctrine()->getManager();\n\t\t\n\t\tif(NULL == $user->getFirstname()) return $this->redirect('/logout');\n\t\tif(NULL <> $user->getEmployerId()) return $this->redirect('/admin');\n\t}", "function protect_admin_page($conn, $coder_id, $target='index.php') {\n if (!is_admin($conn, $coder_id)) {\n // Redirect back to the login page\n $host = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]\";\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n $message = urlencode(\"Page is reserved for admins only.\");\n header(\"Location: $host$uri/$target?message=$message\");\n exit;\n }\n}", "public function hookAdminHead()\n {\n $user = current_user();\n // If we're logged in, then prevent access to the dashboard for researcher users\n if ($user && $user->role == 'researcher') {\n // $request = Zend_Controller_Front::getInstance()->getRequest();\n $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n $redirector->gotoUrl(WEB_ROOT);\n }\n }", "function AdminBodyMain()\n\t{\tif ($this->user->CanUserAccess(\"news\") || $this->user->CanUserAccess(\"web content\"))\n\t\t{\t$this->doc->UploadForm();\n\t\t}\n\t}", "public function loginCheckAction()\n {\n throw new AccessDeniedException(\"Vous n'avez pas les droits pour accéder a cette page\");\n }", "public function checkIsAdmin()\n {\n $this->checkIsLogin();\n\n $user = new User($this->di->get(\"db\"));\n $user = $user->getUser($this->di->get(\"session\")->get(\"user\"));\n\n if ($user->authority != \"admin\") {\n $views = [\n [\"comment/admin/fail\", [], \"main\"]\n ];\n $this->di->get(\"pageRenderComment\")->renderPage([\n \"views\" => $views,\n \"title\" => \"Not authorized\"\n ]);\n }\n }", "public function checklogin() {\n if (($this->admin_type == \"superadmin\") || ($this->admin_type == \"admin\")) {\n $auth = Zend_Auth::getInstance();\n $hasIdentity = $auth->hasIdentity();\n /* * ************* check admin identity *********** */\n if (!$hasIdentity) {\n $this->_redirect('admin/index/index');\n }\n } else {\n $this->_redirect('admin/index/index');\n }\n }", "public function check_login()\n\t{\n\t\tif(!UID)\n\t\t\tredirect(\"login\");\n\t}", "function blockUserAccess()\n\t{\n\t\t$document \t=& JFactory::getDocument();\n\t\t$document->setTitle(JText::_('CC ACCESS FORBIDDEN'));\n\t\techo JText::_('CC ACCESS FORBIDDEN');\n\t\treturn true;\n\n\t}", "function CheckIfUserIsJournalAuthor($pUid, $pJournalId) {\n\t\t// Checks if the user has any documents in the specified journal\n\t\t$lSql = \"\n\t\tSELECT d.id\n\t\tFROM pjs.documents d JOIN\n\t\t\t pjs.document_users du on du.document_id = d.id\n\t\tWHERE d.journal_id = $pJournalId \n\t\t AND du.uid = $pUid\n\t\t AND du.role_id = \" . AUTHOR_ROLE . \"\n\t\tLIMIT 1\";\n\t\treturn $this->m_con->Execute($lSql) && $this->m_con->mRs['id'];\t\t\t\n\t}", "private function user_permissions_check() {\n\t\tif ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {\n\t\t\tdie( 'You don\\'t have permission to edit this template.' );\n\t\t}\n\t\treturn true;\n\t}", "public function authorize() {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::user()->can($action['as'], 'edit');\n $own_edit = Auth::user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->blogs->created_by == Auth::user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "public static function checkAdminUser(){\n\t\t// Check if we are a user\n\t\tself::checkLoggedIn();\n\t\tif( !Atom_Group::inGroup( Atom_User::getUser(), 'admin' )){\n\t\t\theader( 'Location: '.Atom_Helper::linkTo( '', 'index.php' , true));\n\t\t\texit();\n\t\t}\n\t}", "public function authorize()\n {\n return $this->user()->isAdmin() || $this->user()->hasKey('post-import');\n }", "public function check_login()\n {\n if(!UID)\n redirect(\"login\");\n }", "function validateUser()\n{\n if(isUser('scoutmaster'))\n {\n\t\t\treturn 1;\n }\n return 0;\n}", "public function before()\n {\n parent::before();\n if (!$this->user->checkAccess(array(Model_User::ROLE_ADMIN)))\n $this->redirect('/');\n }", "function restrict($logged_out = FALSE)\n\t{\n\t\t// If the user is logged in and he's trying to access a page\n\t\t// he's not allowed to see when logged in,\n\t\t// redirect him to the index!\n\t\tif ($logged_out && $this->logged_in())\n\t\t{\n\t\t\tredirect('admin');\n\t\t}\n\t\t\n\t\t// If the user isn' logged in and he's trying to access a page\n\t\t// he's not allowed to see when logged out,\n\t\t// redirect him to the login page!\n\t\tif ( ! $this->_check_session() || ! $logged_out && ! $this->logged_in()) \n\t\t{\n\t\t\t$this->CI->session->set_userdata('redirected_from', $this->CI->uri->uri_string()); // We'll use this in our redirect method.\n\t\t\tredirect('admin/kb/login');\n\t\t}\n\t}", "function index()\n {\n $is_admin = get_one(\"SELECT is_admin FROM person WHERE person_id = \" . $_SESSION['person_id']);\n if ($is_admin) {\n header('Location: ' . BASE_URL . 'user');\n } else {\n header('Location: ' . BASE_URL);\n }\n }", "function ww_redirect_admin(){\n if ( ! defined('DOING_AJAX') && ! current_user_can('edit_posts') ) {\n wp_redirect( site_url() );\n exit;\n }\n}", "function validAdminAccess() {\n $validAccess = true;\n $options = get_option('pediodosonline_option_name');\n if (!isset($options['email']) || !isset($options['password'])) {\n $validAccess = false;\n } elseif (!$this->login($options['email'], $options['password'], false, true)) {\n $validAccess = false;\n }\n\n if (isset($_SERVER['QUERY_STRING'])) {\n $array = explode(\"&\", $_SERVER['QUERY_STRING']);\n $page = $array[0]; //page always firts.\n $pos = strpos($page, $this->suffixPages);\n $pageNumber = substr($page, $pos);\n if ($pos && isset($this->pages[$pageNumber]) && $pageNumber != 'config_error') {\n if (!$validAccess) {\n wp_redirect(site_url() . '?' . $this->suffixPages . 'config_error');\n die();\n }\n }\n }\n\n if (isset($options['login_page']) && !empty($options['login_page'])) {\n $id = $options['login_page'];\n if (is_page($id)) {\n if (!$validAccess) {\n wp_redirect(site_url() . '?' . $this->suffixPages . 'config_error');\n die();\n }\n }\n }\n return;\n }", "protected function redirectIfNotAdmin() {\n\t\tif ($this->Auth->user('role') != 'admin' and $this->Auth->user('role') != 'super-admin' ) { // if not admin\n\t\t\t$this->redirect($this->Auth->redirect('/users/dashboard'));\n\t\t}\n\t}", "function is_valid_admin_access()\n\t{\n\t\t$ci_ins =& get_instance();\n\t\tif(!($ci_ins->session->userdata(SESSION_PREPEND.\"user_type\") === SUPER_ADMIN_USER))\n\t\t\tif(!($ci_ins->session->userdata(SESSION_PREPEND.\"user_type\") === ADMIN_USER) && !($ci_ins->session->userdata(SESSION_PREPEND.\"user_type\") === CALL_CENTER_STAFF))\n\t\t\t\tredirect(\"login\");\n\t\t\t\t\n\t}", "static function loginRedirectCheck()\n\t{\n\t\tif(isset($_SESSION['user']))\n\t\t{\n \tUtil::redirect(\"/\");\n \tdie();\n \t}\n }", "static function checkAccessToForm()\n {\n if(sfConfig::get('app_vjCommentPlugin_restricted'))\n {\n return vjComment::isUserBoundAndAuthenticated();\n }\n else\n {\n return true;\n }\n }", "function beforeFilter() {\r\n\t\t$admin = $this->Session->read('Admin');\t\t\r\n\t\tif (!$this->data && is_null($admin)) {\r\n\t\t\t$this->Session->setFlash('Solo usuarios privilegiados pueden acceder a esta secci&oacute;n.');\r\n\t\t\t$this->redirect(\"/admin/admins/login\");\r\n }\t\t\r\n }", "function getUserPermViewPublished($user, $articleId, $journal, $fileName) {\n\t\t$journalId = $journal->getId();\n\t\t$articleId = $articleId;\n\t\t$userId = $user ? $user->getId() : 0;\n\n\t\t$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');\n\t\tif ($journal->getSetting('enablePublicArticleId')) {\n\t\t\t$publishedArticle =& $publishedArticleDao->getPublishedArticleByBestArticleId($journalId, $articleId, true);\n\t\t} else {\n\t\t\t$publishedArticle =& $publishedArticleDao->getPublishedArticleByArticleId($articleId, $journalId, true);\n\t\t}\n\n\t\t$issue = null;\n\t\t$article = null;\n\t\t$issueDao =& DAORegistry::getDAO('IssueDAO');\n\t\tif (isset($publishedArticle)) {\n\t\t\t$issue =& $issueDao->getIssueById($publishedArticle->getIssueId(), $publishedArticle->getJournalId(), true);\n\t\t} else {\n\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t$article =& $articleDao->getArticle($articleId, $journalId, true);\n\t\t}\n\n\t\t// If this is an editorial user who can view unpublished/unscheduled\n\t\t// articles, bypass further validation. Likewise for its author.\n\t\tif (\n\t\t\t($article || $publishedArticle) &&\n\t\t\t(\n\t\t\t\t$article && IssueAction::allowedPrePublicationAccess($journal, $article) ||\n\t\t\t\t$publishedArticle && IssueAction::allowedPrePublicationAccess($journal, $publishedArticle)\n\t\t\t)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure the reader has rights to view the article/issue.\n\t\tif (!($issue && $issue->getPublished() && $publishedArticle->getStatus() == STATUS_PUBLISHED)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$subscriptionRequired = IssueAction::subscriptionRequired($issue);\n\t\t$isSubscribedDomain = IssueAction::subscribedDomain($journal, $issue->getId(), $publishedArticle->getId());\n\n\t\t// Check if login is required for viewing.\n\t\t// TODO: this never worked $galleyId hasn't been set at this point this also influences the sections below\n\t\tif (\n\t\t\t!$isSubscribedDomain &&\n\t\t\t!Validation::isLoggedIn() &&\n\t\t\t$journal->getSetting('restrictArticleAccess') &&\n\t\t\tisset($galleyId) && $galleyId\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Bypass all validation if subscription based on domain or ip is valid\n\t\t// or if the user is just requesting the abstract\n\t\tif (\n\t\t\t(!$isSubscribedDomain && $subscriptionRequired) &&\n\t\t\t(isset($galleyId) && $galleyId)\n\t\t) {\n\t\t\t// Subscription Access\n\t\t\t$subscribedUser = IssueAction::subscribedUser($journal, $issue->getId(), $publishedArticle->getId());\n\n\t\t\tif (\n\t\t\t\t!(\n\t\t\t\t\t!$subscriptionRequired ||\n\t\t\t\t\t$publishedArticle->getAccessStatus() == ARTICLE_ACCESS_OPEN ||\n\t\t\t\t\t$subscribedUser\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// If payment information is enabled\n\t\t\t\timport('classes.payment.ojs.OJSPaymentManager');\n\t\t\t\t$paymentManager = new OJSPaymentManager($request);\n\n\t\t\t\tif ($paymentManager->purchaseArticleEnabled() || $paymentManager->membershipEnabled()) {\n\t\t\t\t\t// If only pdf files are being restricted, then approve all\n\t\t\t\t\t// non-pdf galleys and continue checking if it is a pdf galley\n\t\t\t\t\tif ($paymentManager->onlyPdfEnabled()) {\n\t\t\t\t\t\t$fileManager = new FileManager();\n\t\t\t\t\t\tif (strtoupper($fileManager->parseFileExtension($fileName)) == 'PDF') return true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!Validation::isLoggedIn()) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the article has been paid for then forget about everything else\n\t\t\t\t\t// and just let them access the article\n\t\t\t\t\t$completedPaymentDao =& DAORegistry::getDAO('OJSCompletedPaymentDAO');\n\t\t\t\t\t$dateEndMembership = $user->getSetting('dateEndMembership', 0);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t$completedPaymentDao->hasPaidPurchaseArticle($userId, $publishedArticle->getId()) ||\n\t\t\t\t\t\t$completedPaymentDao->hasPaidPurchaseIssue($userId, $issue->getId()) ||\n\t\t\t\t\t\t(!is_null($dateEndMembership) && $dateEndMembership > time())\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!isset($galleyId) || $galleyId) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function authorize()\n {\n $this->messageAuthorization = 'Você não tem autorização para editar este registro.';\n if(isset($this->data['id']) && !empty($this->data['id'])) {\n $result = Types::where('id', $this->data['id'])->where('journalist_id', auth()->user()->id)->get()->first();\n if($result) {\n return true;\n } else {\n return false;\n }\n }\n return true;\n }", "function check_auth()\r\n {\r\n global $app;\r\n if (!$app->is_admin())\r\n $app->redirect('/admin/login.php');\r\n }", "function maybe_redirect_edit()\n {\n }", "function maintenance_redirect() {\n if(!ceicom_is_wplogin() && !is_admin() && !current_user_can('administrator')){\n wp_redirect(home_url(\"maintenance.html\"));\n exit;\n }\n }", "public function disable_author_page() {\n if (is_author()) {\n wp_redirect(home_url(), 301);\n exit;\n }\n }", "public function isEditor(){\n return $this->checkPermissions(2);\n }", "public function actionIndex() {\n if (!empty(Yii::app()->user)) {\n $user = User::model()->findByPk(Yii::app()->user->id); \n }\n if(empty($user) OR empty($user->admin_role)){\n $this->redirect(Yii::app()->request->getBaseUrl(true));\n }\n $this->render('ckfinder');\n }", "public function view(User $user, Copy $copy)\n {\n return true;\n }", "public\n function draft(Document $document)\n {\n $this->authorize('view-draft', $document);\n\n $draft = $document->draftRevision();\n if (!$draft) {\n return Redirect::to($this->linkMaker->url($document))\n ->withErrors(\"This document does not currently have a draft revision.\");\n }\n return Redirect::to($this->linkMaker->url($draft));\n }", "function check_is_admin(){\n\t\t$user_id = $this->session->userdata('user_id');\n\t\tif(!isset($user_id)){\n\t\t\tredirect('Users/login');\n\t\t}\n\t}", "function redirect_dashboard() {\n if ( !current_user_can('manage_options') && ($_SERVER['REQUEST_URI'] == '/cms/wp-admin/index.php' || $_SERVER['REQUEST_URI'] == '/cms/wp-admin/' ) ) {\n wp_redirect(get_option('siteurl') . '/wp-admin/edit.php?post_type=page');\n exit(0);\n }\n}", "public function isAuthorized($user) {\n if (in_array($this->action, array('edit', 'delete')) && isset($this->request->params['pass'][1])) {\n $reviewId = (int) $this->request->params['pass'][1];\n\n if ($this->User->isEditor($user) || $this->Review->isOwnedBy($reviewId, $user['id'])) {\n return true;\n }\n else {\n $this->Session->setFlash(__('Not Review Owner'));\n return false;\n }\n }\n\n // Just in case the base controller has something to add\n return parent::isAuthorized($user);\n }", "public function action_index()\n {\n $user = Auth::instance()->get_user();\n \n // if a user is not logged in, redirect to login page\n if (!$user)\n {\n Request::current()->redirect('user/login');\n }else{\n\t\t\tRequest::current()->redirect('contribute');\n\t\t}\n }", "function abortIfUserNotAllowedEditor($usuario)\n {\n if (!isUserAllowedEditor($usuario)) {\n abort(403);\n }\n }", "public function checkLoggedAdmin() {\n if (!(isset($_SESSION['ADMIN']) && $_SESSION['ADMIN']==1)) { // SI NO SOS ADMIN\n header('Location: ' . verJugadores);\n die();\n } \n }", "public function prevent_admin_access() {\r\n if ( is_user_logged_in() ) {\r\n\r\n if ( strpos( strtolower( $_SERVER['REQUEST_URI'] ), '/wp-admin' ) !== false && (current_user_can( 'cs_employer' ) || current_user_can( 'cs_candidate' )) ) {\r\n wp_redirect( get_option( 'siteurl' ) );\r\n add_filter( 'show_admin_bar', '__return_false' );\r\n }\r\n }\r\n }", "public function filters()\n {\n if (Yii::app()->user->isGuest) {\n $this->redirect(Yii::app()->getBaseUrl() . \"/auth/user/login\");\n }\n }", "public static function area_requires_login() {\n\t\n\t\tif ( !isset($_SESSION['user_id']) ) {\n\t\t\theader(\"Location: please_login.php\");\n\t\t\texit(); // prevents further html data from this page from being sent.\n\t\t}\n\t\t\n\t}", "function selectCopyeditor($sectionEditorSubmission, $copyeditorId, $request) {\n\t\t$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');\n\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO');\n\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\t\t$user =& $request->getUser();\n\n\t\t// Check to see if the requested copyeditor is not already\n\t\t// assigned to copyedit this article.\n\t\t$assigned = $sectionEditorSubmissionDao->copyeditorExists($sectionEditorSubmission->getId(), $copyeditorId);\n\n\t\t// Only add the copyeditor if he has not already\n\t\t// been assigned to review this article.\n\t\tif (!$assigned && !HookRegistry::call('SectionEditorAction::selectCopyeditor', array(&$sectionEditorSubmission, &$copyeditorId))) {\n\t\t\t$copyeditInitialSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $sectionEditorSubmission->getId());\n\t\t\t$copyeditInitialSignoff->setUserId($copyeditorId);\n\t\t\t$signoffDao->updateObject($copyeditInitialSignoff);\n\n\t\t\t$copyeditor =& $userDao->getById($copyeditorId);\n\n\t\t\t// Add log\n\t\t\timport('classes.article.log.ArticleLog');\n\t\t\tArticleLog::logEvent($request, $sectionEditorSubmission, ARTICLE_LOG_COPYEDIT_ASSIGN, 'log.copyedit.copyeditorAssigned', array('copyeditorName' => $copyeditor->getFullName()));\n\t\t}\n\t}", "public function prepareForCopy()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\t// Get the previous edit id (if any) and the current edit id.\n\t\t$editId = $app->input->getInt('id', 0);\n\t\t$clusterId = $app->input->getInt('cluster_id', 0);\n\n\t\t// Set the user id for the user to edit in the session.\n\t\t$app->setUserState('com_tjucm.edit.item.id', $editId);\n\t\t$app->setUserState('com_tjucm.edit.itemform.data.copy_id', $editId);\n\n\t\t$cluster = '';\n\n\t\t// Check cluster exist\n\t\tif ($clusterId)\n\t\t{\n\t\t\t$cluster = '&cluster_id=' . $clusterId;\n\t\t}\n\n\t\t$tjUcmFrontendHelper = new TjucmHelpersTjucm;\n\t\t$link = 'index.php?option=com_tjucm&view=itemform&client=' . $this->client;\n\t\t$itemId = $tjUcmFrontendHelper->getItemId($link);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(Route::_($link . '&Itemid=' . $itemId . $cluster . $this->getRedirectToItemAppend(), false));\n\t}", "function wppb_redirect_default_wp_author_archive() {\r\n\tif( PROFILE_BUILDER == 'Profile Builder Pro' ) {\r\n\t\tif( ! is_admin() ) {\r\n\t\t\t$wppb_module_settings = get_option( 'wppb_module_settings' );\r\n\r\n\t\t\tif( isset( $wppb_module_settings['wppb_customRedirect'] ) && $wppb_module_settings['wppb_customRedirect'] == 'show' && function_exists( 'wppb_custom_redirect_url' ) ) {\r\n\t\t\t\tif( is_author() ) {\r\n\t\t\t\t\t$redirect_url = wppb_custom_redirect_url( 'authorarchive' );\r\n\r\n\t\t\t\t\tif( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\t\t\t$redirect_url = apply_filters( 'wppb_wp_default_author_archive_redirect_url', $redirect_url );\r\n\r\n\t\t\t\t\t\tif( isset( $redirect_url ) && ! empty( $redirect_url ) ) {\r\n\t\t\t\t\t\t\twp_redirect( $redirect_url );\r\n\r\n\t\t\t\t\t\t\texit;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function staff_required($path) {\n $user = session_get('user');\n if ($user == null || !$user['is_staff']) redirect($path);\n}", "public function pageIsNotLockedForEditors() {}", "public function testAccessEditor()\n {\n $unPublished = $this->_makeContentEntry();\n\n // ensure un-published content is accessible to editors\n $this->utility->impersonate('editor');\n $acl = P4Cms_Site::fetchActive()->getAcl();\n $this->assertTrue(P4Cms_Content::exists($unPublished->getId()));\n }", "public function isAuthorized($user) {\n if ($this->action === 'add') {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('edit', 'delete'))) {\n $postId = (int) $this->request->params['pass'][0];\n if ($this->Post->isOwnedBy($postId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "public function authorize()\n {\n if ($this->path() == 'book')\n {\n return true;\n }else{\n return false;\n }\n }", "function restrict_admin() {\n if ( ! current_user_can( 'manage_options' ) ) {\n wp_redirect( home_url() );\n exit;\n }\n }", "public function checkCanSeeJournal(User $objUser=null){\n\n\t \t$boolLoggedUser = false;\n\t \t\n\t \tif($objUser != null && is_object($objUser) && $objUser->exists()){\n\t \t\t$boolLoggedUser = true;\n\t \t}\n\n\t \tif($boolLoggedUser){\n\t \t\tif($this->checkIfIsTheOwner($objUser)){\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}\n\t \t\n \t\tif($this->isJournalPrivate()){\n \t\t\treturn false;\n \t\t}\n \t\tif($this->isJournalGlobal()){\n \t\t\treturn true;\n \t\t}else{\n \t\t\tif($boolLoggedUser){\n \t\t\t\tif($this->checkCanSeeFriendSection($objUser)){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t\treturn false;\n \t\t}\n\t \t\n\t }", "function check_access_inside_learndash_course() {\n global $post;\n $cpt = get_post_type(); // Get the current post type\n\n if ( $cpt == 'sfwd-lessons' || $cpt == 'sfwd-topic' || $cpt == 'sfwd-quiz' || $cpt == 'sfwd-certificate' ) {\n\n if ( !is_user_logged_in() ) {\n auth_redirect();\n exit;\n }\n\n $roles = get_post_meta( learndash_get_course_id($post->ID), '_members_access_role', false );\n $user_has_access = false;\n\n if ( !empty( $roles ) && is_array( $roles ) ) {\n foreach( $roles as $role ) {\n if ( !is_feed() && ( current_user_can( $role ) || current_user_can( 'restrict_content' ) ) ) {\n $user_has_access = true;\n break;\n }\n }\n } else {\n $user_has_access = true;\n }\n\n if (!$user_has_access) {\n $redirect_url = get_permalink(learndash_get_course_id($post->ID));\n if($redirect_url) wp_redirect(clean_url($redirect_url), 301);\n get_header();\n }\n\n }\n\n}", "public function onBeforeInit()\n\t{\n\t\tif (Member::CurrentUser())\n\t\t{\n\t\t\t// check duo authentication\n\t\t\t$controller = singleton('DuoAuthPage_Controller');\n\t\t\tif (!$controller->DuoAuthenticated() && DuoAuthPage_Controller::DuoEnabled())\n\t\t\t{\n\t\t\t\treturn $this->owner->redirect('/DuoAdminSecurity');\n\t\t\t}\n\t\t}\n\t}", "public function checkIsAdmin()\n {\n $this->checkIsLogin();\n\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n $user = $user->find(\"name\", $this->di->get(\"session\")->get(\"user\"));\n\n if ($user->authority != \"admin\") {\n $views = [\n [\"admin/fail\", [], \"main\"]\n ];\n $this->renderPage($views, \"Not authorized\");\n }\n }", "function exit_user_edit_action($user_id = 0){\n if (!empty($user_id)){ $location = 'admin/edit-users/editor/user_id='.$user_id; }\n else { $location = 'admin/edit-users/search/'; }\n redirect_form_action($location);\n }", "public function render_documents()\n {\n $user = User::find(JWTAuth::user()->id);\n\n $is_admin = Document::where('id_user', '=', $user['id'])->get();\n }", "public function checkIfUserIsAdministrator()\n\t\t{\n\t\t\t// Admin?\n\t\t\tif($this->isAdministrator())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\theader(\"Location: /Home/Seiten/KeineRechte.php\");\n\t\t}", "function onlyForAdmin() {\n if (!\\Ease\\Shared::user()->getSettingValue('admin')) {\n $this->addStatusMessage(_('Only for admin'), 'warning');\n $this->redirect('login.php');\n exit();\n }\n }", "public function check_for_admin_privileges(){\n\t\tif(!Yii::app()->user->isAdmin){\n\t\t\t$this->redirect(Yii::app()->request->baseUrl.'/site/PermissionError');\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "public function protect_page() {\n if($this->logged_in() === false)\n {\n header(\"Location: protected.php\");\n exit();\n }\n }", "private function check_user_is_admin()\n\t{\n\t\tif ($this->data['user']->admin != 1)\n\t\t{\n\t\t\t// User not supposed to be here, put them to the dashboard.\n\t\t\t$this->session->set_flashdata('error', 'You are not an admin, don\\'t be silly.');\n\t\t\tredirect('/dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function edit() {\n\t\t$this->require_role('chapter_admin');\n\t\t\n\t\t$id = $this->params['id'];\n\t\t$user = User::find($this->params['id']);\n\t\tif (!$id || !$user)\n\t\t\t$error = 'not_found';\n\t\t\n\t\tif (!$error && (!$this->user->capable_of('national_admin') && $user->chapter_id != $this->user->chapter_id))\n\t\t\t$error = 'forbidden';\n\t\t\n\t\tif (!$error && $_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\t// submitting a form here\n\t\t\t$username = trim($_POST['username']);\n\t\t\t$password = $_POST['password'];\n\t\t\t$retype_password = $_POST['retype_password'];\n\t\t\t$email = trim($_POST['email']);\n\t\t\t\n\t\t\t$proc = new FormProcessor;\n\t\t\t$proc->associate($user);\n\t\t\t$proc->add_uneditables('role');\n\n\t\t\t// validate username, password and email.\n\t\t\t$validate = array();\n\n\t\t\tif (!isset($username, $email))\n\t\t\t\t$error = 'incomplete';\n\n\t\t\tif (!$error && strtolower($username) != strtolower($user->username)) {\n\t\t\t\t$username_check = (bool) User::find(array('username' => $username))->first();\n\t\t\t\tif ($username_check)\n\t\t\t\t\t$error = 'username_availability';\n\t\t\t}\n\n\t\t\tif (!$error) {\n\t\t\t\t// username validation\n\t\t\t\t// username can only contain letters, numbers and underscore. min. 3 chars.\n\t\t\t\t$username_pattern = \"/^[a-z0-9_\\-]{4,}$/i\";\n\t\t\t\tif (!preg_match($username_pattern, $username))\n\t\t\t\t\t$error = 'username_format';\n\t\t\t}\n\n\t\t\t$role = $_POST['role'];\n\t\t\tif (!$error && ($role > $this->user->role))\n\t\t\t\t$error = 'role';\n\n\t\t\t// validate email\n\t\t\tif (!$error && !filter_var($email, FILTER_VALIDATE_EMAIL))\n\t\t\t\t$error = 'email';\n\n\t\t\tif (!$error && $password) {\n\t\t\t\t// validate retype password\n\t\t\t\tif (!$error && $password != $retype_password)\n\t\t\t\t\t$error = 'retype_password';\n\n\t\t\t\tif (!$error && strlen($password) < 8)\n\t\t\t\t\t$error = 'password';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$proc->add_uneditables('password_hash', 'role');\n\t\t\t}\n\n\t\t\tif (!$error && $this->user->capable_of('national_admin')) {\n\t\t\t\t// Chapter validation\n\t\t\t\t$chapter_id = $_POST['chapter_id'];\n\t\t\t\t$chapter = Chapter::find($chapter_id);\n\t\t\t\tif (!$chapter)\n\t\t\t\t\t$error = 'chapter_not_found';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$proc->add_uneditables('chapter_id');\n\n\t\t\tif (!$error) {\n\t\t\t\t$proc->commit();\n\t\t\t\t\n\t\t\t\tif ($password)\n\t\t\t\t\t$user->set_password($password);\n\n\t\t\t\t$user->save();\n\n\t\t\t\t$this->session['message'] = 'user_edited';\n\t\t\t\t$this->session['user_edited_id'] = $id;\n\n\t\t\t\tif (!$_POST['return']) {\n\t\t\t\t\tif ($user->role == 1)\n\t\t\t\t\t\t$this->http_redirect(array('controller' => 'applicant', 'action' => 'view', 'id' => Helium::db()->get_var(\"SELECT applicants.id FROM applicants INNER JOIN users ON users.id=applicants.user_id WHERE users.id='$user->id'\")));\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->http_redirect(array('controller' => 'user', 'action' => 'index'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$message = $this->session->flash['message'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this['error'] = $error;\n\t\t\t}\n\t\t}\n\n\t\tif ($user) {\n\t\t\t$form = new FormDisplay;\n\t\t\t$form->associate($user);\n\t\t\t$this['form'] = $form;\n\t\t\t$this['user'] = $user;\n\n\t\t\t$roles = $this->role_names;\n\t\t\tforeach ($roles as $k => $v) {\n\t\t\t\tif ($v > $this->user->role)\n\t\t\t\t\tunset($roles[$k]);\n\t\t\t}\n\t\t\t$this['roles'] = $roles;\n\n\t\t\t$chapters = Chapter::find('all');\n\t\t\t$chapters_a = array();\n\t\t\tforeach ($chapters as $c) {\n\t\t\t\t$chapters_a[$c->id] = $c->chapter_name;\n\t\t\t}\n\t\t\t$this['chapters'] = $chapters_a;\n\n\t\t\t$this['national'] = $this->user->capable_of('national_admin');\n\t\t\t\n\t\t\t$this['show_form'] = true;\n\t\t}\n\t\telse {\n\t\t\t$this['error'] = $error;\n\t\t}\n\t}", "public function redirectIfNotLoggedIn()\n {\n // Redirect to login page, if isLoggedIn() method returns false\n if (!$this->isLoggedIn()) {\n $this->msg->error('You must login, before you can access this page!', '/admin/login.php');\n die();\n }\n }", "public function filter()\n\t{\n\t\tif (Auth::check())\n\t\t{\n\t\t\treturn Redirect::to('/');\n\t\t}\n\t}" ]
[ "0.68724483", "0.57759565", "0.5687687", "0.56293017", "0.56076384", "0.5593008", "0.5584441", "0.5576081", "0.5515364", "0.5482398", "0.54817", "0.5468252", "0.54657274", "0.54449815", "0.5420287", "0.54195076", "0.5410241", "0.5404488", "0.54003423", "0.5350949", "0.53441954", "0.53427815", "0.53264016", "0.5320387", "0.5318743", "0.5315729", "0.5290637", "0.52800715", "0.5270558", "0.52604544", "0.52589405", "0.52586293", "0.52433264", "0.5238388", "0.5232382", "0.523031", "0.5223761", "0.522324", "0.5218841", "0.5212395", "0.52028465", "0.51886106", "0.51857436", "0.51810783", "0.51797706", "0.51628107", "0.51624376", "0.51618505", "0.5161508", "0.51559645", "0.51534975", "0.51474565", "0.5145231", "0.5143966", "0.5134654", "0.51301616", "0.51246136", "0.5120494", "0.5112359", "0.5110968", "0.510937", "0.5105073", "0.50994265", "0.5097583", "0.50949645", "0.5093267", "0.50915504", "0.50864565", "0.50841266", "0.50828975", "0.5081133", "0.50747454", "0.5067918", "0.5066116", "0.5063137", "0.50542545", "0.5052344", "0.5052245", "0.50516313", "0.50457174", "0.50451535", "0.50444055", "0.503871", "0.50375175", "0.50321853", "0.503122", "0.5029468", "0.50231713", "0.5022309", "0.5016534", "0.5011359", "0.5009861", "0.5002735", "0.49982986", "0.49935034", "0.499287", "0.49849525", "0.49779978", "0.4976638", "0.49765188" ]
0.763175
0
/ all tasks IDs of the project
/ все идентификаторы задач проекта
private function projectTasksIDs() { $tasks_q = mysql_query("SELECT ID FROM ".$this->getTablePrefix()."tasks WHERE project='{$this->projectID()}'"); $tasks = array(); while($task = mysql_fetch_assoc($tasks_q)) $tasks[] = $task["ID"]; return $tasks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function projectTasks() {\n\t\t$tasks = array();\n\t\t$tasks_q = mysql_query(\"SELECT * FROM \".$this->getTablePrefix().\"tasks WHERE project='{$this->projectID()}'\");\n\t\twhile($task = mysql_fetch_assoc($tasks_q)) {\n\t\t\t$task[\"actual\"] = $this->taskActual(array($task[\"ID\"]));\n\t\t\t$tasks[] = $task;\n\t\t}\n\t\t\n\t\treturn $tasks;\n\t}", "public function tasksOfProject( $projectId );", "function getAllTasks($projectID)\n {\n $tasks = API::call('projects/' . $projectID . '/tasks/');\n return $tasks;\n }", "public function get_my_tasks(){\n if($this->ID != NULL){\n $sql = \"SELECT ID FROM task WHERE Project=\".$this->ID.\";\";\n $myTaskIDs = $this->get_by_query($sql);\n $myTaskList = array();\n foreach ($myTaskIDs as &$tID) {\n $myTask = new Task();\n $myTask = $myTask->get_by_ID($tID['ID']);\n array_push($myTaskList, $myTask);\n }\n return $myTaskList;\n }\n }", "private function workpackageTasksIDs($workpackage_id) {\n\t\t$tasks_q = mysql_query(\"SELECT ID FROM \".$this->getTablePrefix().\"tasks WHERE workpackage='$workpackage_id'\");\n\t\t$tasks = array();\n\t\twhile($task = mysql_fetch_assoc($tasks_q))\n\t\t\t$tasks[] = $task[\"ID\"];\n\t\treturn $tasks;\n\t}", "function getProjectsTasksAssigned($projectid)\n\t{\n\t\t$ret = array();\n\t\t$project = new Projects($projectid);\n\t\t$team_tasks = $this->getTaskList();\n\n\t\t//for each tasks if the developer's tasks and the task have the ID push it into the list\n\t\tforeach($team_tasks as $team_task)\n\t\t\tforeach($project->getTaskList() as $task)\n\t\t\t\tif($team_task->getTaskID() == $task->getTaskID())\n\t\t\t\t\tarray_push($ret, $task);\n\n\t\treturn $ret;\n\t}", "function getProjectIds() {\n return $this->getAdditionalProperty('project_ids');\n }", "public function index()\n {\n $partisipantIds = $this->auth->user()->assignedTasks()->distinct('project_id')->pluck('project_id')->toArray();\n\n return $this->auth->user()->projects()->orWhereIn('id', $partisipantIds)->get();\n }", "public function availableTasksOfProject( $projectId );", "public function getTaskList();", "public function get_project_tasks($project_id)\n {\n $tasks = Task::where('project_id', '=', $project_id)\n ->with(['Project', 'client'])\n ->get();\n $i = 0;\n\n foreach ($tasks as $task) {\n\n $user = User::where('id', '=', $task->assign_to)->first();\n if (isset($user)) {\n $user_name = $user->name;\n } else {\n $user_name = '';\n }\n\n $tasksRes[$i]['user_name'] = $user_name;\n $tasksRes[$i]['id'] = $task->id;\n $tasksRes[$i]['title'] = $task->task_titly;\n $tasksRes[$i]['type'] = $task->task_type;\n $tasksRes[$i]['assign_to'] = $task->assign_to;\n $tasksRes[$i]['alloceted_hours'] = $task->alloceted_hours;\n $tasksRes[$i]['task_description'] = $task->task_description;\n $tasksRes[$i]['billable'] = $task->billable;\n $tasksRes[$i]['created_at'] = $task->created_at;\n $tasksRes[$i]['company'] = $task->client['company_name'];\n $tasksRes[$i]['project_name'] = $task->project['project_name'];\n $i++;\n }\n\n $project = DB::table('Project')\n ->where('Project.id', '=', $project_id)\n ->leftJoin('users', 'Project.lead_id', '=', 'users.id')\n ->join('Clients', 'Project.client_id', '=', 'Clients.id')\n ->select('Project.project_name',\n 'Project.id',\n 'Project.hourly_rate',\n 'Project.notes',\n 'Project.created_at',\n 'users.name', 'Clients.company_name')\n ->first();\n\n $tasksForProject = true;\n\n return view('time_manage.tasks', compact('tasksRes', 'tasksForProject', 'project'));\n }", "function get_projects()\n\t{\n\t$sql =\"SELECT Task.name, numberOfAvailableTasks, numberOfRemainingTasks,\n pk, status\n\t FROM Task, ProjectInfo\n\t\t WHERE Task.persistentIdentifier = ProjectInfo.pk\n\t\t AND ProjectInfo.status IN ( 'active' , 'inactive')\n\t\t ORDER BY name\";\n\n\treturn $this->query($sql);\n\t}", "public function return_all_project_ids() {\n $results = $this->db_wrapper->select($this->table_name, 'project_id');\n \n if($results === false) {\n throw new Exception('No project ids were found');\n } else {\n $ids = array();\n foreach($results as $project) {\n $ids[] = $project['project_id'];\n }\n return $ids;\n }\n \n }", "public function tasks($id);", "public function getIdProjectTask()\n {\n return $this->idProjectTask;\n }", "public function tasks() {\n // get the company entity id\n $id = $this->id();\n\n // if there is no entity id, return out\n if (is_null($id)) {\n return array();\n }\n\n // construct the url to get all the tasks\n $url = 'companies/' . $id . '/' . \\Weblab\\Highrise\\Task::NAME .'.xml';\n\n // done, return the tasks\n return $this->allForUrl('\\Weblab\\Highrise\\Task', $url);\n }", "protected static function get_tasks($projectid) {\n global $DB;\n\n $query = \"\n SELECT\n t.id,\n t.assignee,\n t.abstract,\n t.description,\n t.projectid,\n t.groupid,\n t.owner as userid,\n u.firstname,\n u.lastname,\n 'task' as entry_type\n FROM\n {techproject_task} AS t\n LEFT JOIN\n {user} AS u\n ON\n t.owner = u.id\n WHERE\n t.projectid = '{$projectid}'\n ORDER BY\n t.taskstart ASC\n \";\n return $DB->get_records_sql($query);\n }", "function getProjectTasks($pid)\n{\n if (is_null($pid)) {\n return array();\n }\n\n $pid = intval($pid);\n global $DB;\n\n $deals = array();\n $selectDealProject = 'select * from m_deal_project where PROJECT_ID=\"'.$DB->ForSQL($pid).'\"';\n $result = $DB->Query($selectDealProject);\n while ($row = $result->Fetch()) {\n $row['DEAL_ID'] = intval($row['DEAL_ID']);\n if (!in_array($row['DEAL_ID'], $deals)) {\n $deals[] = $row['DEAL_ID'];\n }\n }\n \n $in = array();\n foreach ($deals as $did) {\n $in[] = '\"D_'.$did.'\"';\n }\n $selectUtmTask = 'select butt.*, bt.XML_ID from b_utm_tasks_task butt join b_tasks bt on bt.ID=butt.VALUE_ID where butt.VALUE IN ('.implode(',', $in).') and bt.ZOMBIE=\"N\" order by bt.ID asc';\n $result = $DB->Query($selectUtmTask);\n while ($row = $result->Fetch()) {\n $tasks[] = $row;\n }\n\n return $tasks;\n}", "function getProjectList() {\n\t$database = new Database();\n\t$query = \"SELECT `id` FROM `project`\";\n\t$results = $database->query($query);\n\t$projID = array();\n\t\n\twhile ($result = $results->fetch_array()) {\n\t\tarray_push($projID, $result['id']);\n\t}\n\treturn $projID;\n}", "function getProjectList() {\n\t$database = new Database();\n\t$query = \"SELECT `id` FROM `project`\";\n\t$results = $database->query($query);\n\t$projID = array();\n\t\n\twhile ($result = $results->fetch_array()) {\n\t\tarray_push($projID, $result['id']);\n\t}\n\treturn $projID;\n}", "function get_tasks()\n{\n\t$url = SD_HOST . '/api/task?filterid=2814&fields=Id,StatusId,Changed';\n\treturn curl_auth_send($url, SD_USER);\n}", "public function getAll()\n {\n return $this->tasks;\n }", "private function getTasks($project_id)\n {\n return $this->db\n ->table(TaskModel::TABLE)\n ->columns('id', 'date_completed', 'date_moved', 'column_id')\n ->eq('project_id', $project_id)\n ->desc('id')\n ->limit(1000)\n ->findAll();\n }", "public function getProjectTasks($id) {\n $project = Project::with('tasks')->findOrFail($id);\n $tasks = $project->tasks;\n return response($tasks, 200);\n }", "public static function getAllTasks()\n {\n $db = Db::getConnection();\n $sql = \"SELECT * FROM tasks\";\n\n $result = $db->query($sql);\n $i = 0;\n\t\t$taskList = array();\n while ($row = $result->fetch()) {\n $taskList[$i] = $row;\n\n $i++;\n }\n return $taskList;\n }", "public function get_task_list()\n {\n }", "function getTaskIDs($completed = 0) {\n $query = \"SELECT id\n FROM tasklist\n WHERE completed = $completed\n ORDER BY id;\";\n \n $result = mysqli_query($this->connect, $query);\n \n // the array of ids to return later\n $idArray = array();\n \n while ($row = mysqli_fetch_assoc($result)) {\n $row['id'] = (int) $row['id'];\n array_push($idArray, $row['id']);\n }\n \n return $idArray;\n }", "public function getList()\r\n {\r\n $taskMapper = new Project_Model_Mapper_Task();\r\n return $taskMapper->getList();\r\n }", "public function tasks() {\n return $this->hasMany('App\\Task', 'id_project');\n }", "function getTasks()\r\n\t{\r\n\t\treturn $this->tasks;\r\n\t}", "public function getTasks()\n {\n // pull them from the config file and make them classes\n $tasks = Config::getOption('project.tasks');\n $project = Config::getOption('project');\n $taskObjects = array();\n\n foreach ($tasks as $index => $task) {\n\n $typeParts = explode('.', $task->type);\n $typePath = '';\n foreach ($typeParts as $part) {\n $typePath .= ucwords(strtolower($part)).'\\\\';\n }\n $typePath = substr($typePath, 0, strlen($typePath)-1);\n \n //$taskName = '\\Usher\\\\Lib\\\\Task\\\\'.$typePath;\n $taskName = '\\\\Lib\\\\Task\\\\'.$typePath;\n $className = $taskName.'Task';\n $taskObject = new $className($project);\n $task->id = $index;\n $taskObject->configure($task);\n\n $taskObjects[] = $taskObject;\n }\n return $taskObjects;\n }", "public function getAllTasks()\n {\n $sql = 'SELECT * FROM Task';\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function getAllTasks(): array\n {\n return $this->list();\n }", "public function getAllTasks($projectId,$task_ids='')\n\t{\n\t\t$cond = '';\n\t\tif($task_ids!='')\n\t\t{\n\t\t\t$cond = ' AND pt.task_id ='.$task_ids.'';\n\t\t}\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\t\t$select = $this->select()\n\t\t->setIntegrityCheck(false)\n\t\t->from(array('pt'=>'tm_project_tasks'))\n\t\t->joinInner(array('t'=>'tm_tasks'),\"t.id = pt.task_id \",array('t.task'))\n\t\t->where('pt.is_active = 1 AND pt.project_id = '.$projectId.$cond.'');\n\t\treturn $this->fetchAll($select)->toArray();\n\t}", "public function getTasks(): array\n {\n return $this->tasks;\n }", "public function getTasks(): array\n {\n return $this->tasks;\n }", "public function tasks($id) {\n\t\t// get task list w/ tasks w/ phonebooks\n\t\t$this->loadModel('Tasks.Task');\n\t\t$taskList = $this->Task->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Task.id' => $id\n\t\t\t),\n\t\t\t'contain' => array('ChildTask')\n\t\t));\n\t}", "public function tasks_listUids()\n {\n return $this->_registry->tasks->listUids();\n }", "public function deleteAllTasks() {}", "public function getTasks()\n {\n return $this->tasks;\n }", "public function getTasks()\n {\n return $this->tasks;\n }", "public function getAllTasks()\n {\n $sql = \"SELECT id, name, email, ztext FROM task\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function Tasks(){\n\t\t\t\treturn $this->tasks;\n\t\t\t}", "public function getassignedTasks($project_id,$employee_id)\n\t{\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\n \t$select = $this->select()\n\t\t->setIntegrityCheck(false)\n\t\t->from(array('pt'=>'tm_project_tasks'),array('pt.task_id'))\n\t\t->joinInner(array('pte'=>'tm_project_task_employees'),\"pt.task_id = pte.task_id and pte.project_id = \".$project_id.\" \",array('pte.id','pte.project_task_id','projectTaskCount'=>'(SELECT count(*) FROM tm_emp_timesheets et WHERE et.project_task_id = pte.project_task_id AND et.is_active = 1 AND et.emp_id ='. $employee_id.')'))\n\t\t->joinInner(array('t'=>'tm_tasks'),\"t.id = pt.task_id \",array('t.task'))\n\t\t->where('pt.is_active = 1 AND pt.project_id = '.$project_id.' and pte.is_active = 1 and pte.emp_id = '.$employee_id);\n\t\treturn $this->fetchAll($select)->toArray();\n\t}", "public function get_all(){\n $myProjects = array();\n $sql = \"SELECT ID FROM project\";\n $myProjectIDs = $this->get_by_query($sql);\n $myProjects = array();\n foreach ($myProjectIDs as &$myProjectID){\n $myProject = new Project();\n $myProject = $myProject->get_by_ID($myProjectID['ID']);\n array_push($myProjects, $myProject);\n }\n return $myProjects;\n }", "public function getParallelTasksList(){\n return $this->_get(1);\n }", "public function tasklist( $projectid ) {\n\n // dd($projectid);\n $user = Auth::user();\n $users = User::all() ;\n $p_name = Project::find($projectid) ;\n // ->get() will return a collection\n $task_list = Task::where('project_id','=' , $projectid)->get();\n return view('admin.task.list')->with('users', $users) \n ->with('p_name', $p_name)\n ->with('task_list', $task_list) \n ->with('user', $user) ;\n }", "public function tasks()\n {\n return $this->tasks;\n }", "public static function getUserTasksGroupedByProjects()\n {\n $tasks = Auth::user()->tasks;\n $projects = [];\n foreach ($tasks as $task) {\n if ($task->status === static::OPEN) {\n $projects[static::OPEN][$task->project->id][] = $task;\n if (!isset($projects[static::OPEN][$task->project->id]['project_name'])) {\n $projects[static::OPEN][$task->project->id]['project_name'] = $task->project->name;\n }\n }\n if ($task->status === static::FINISHED) {\n $projects[static::FINISHED][$task->project->id][] = $task;\n if (!isset($projects[static::FINISHED][$task->project->id]['project_name'])) {\n $projects[static::FINISHED][$task->project->id]['project_name'] = $task->project->name;\n }\n }\n }\n\n return $projects;\n }", "public static function getTasksDTOByProjectId(int $id) : array {\n $ret = array();\n //$projects = ProjectQuery::create()->joinWithTeamProject()->findById($id);\n $tasks = TaskQuery::create()->findByProjectId($id);\n //findByProjectId($id)\n foreach( $tasks as $task){\n $t = TaskDTO::create($task);\n array_push($ret, $t);\n }\n\n return $ret;\n }", "public function projectTask(int $idProject)\n\t{\n\t}", "public function viewProjectTasks() {\n\n return $this->render('enterprise/task/project_tasks.html.twig');\n }", "function createProjects() {\n $t_project_ids = array();\n $t_project_ids[] = $this->ensure_project_exists( 'MantisBT', 'Mantis Bug Tracker' );\n $t_project_ids[] = $this->ensure_project_exists( 'MantisHub', 'MantisBT as a Service' );\n return $t_project_ids;\n }", "public function getIds();", "public function tasksName()\n {\n $tasksName = new Collection();\n foreach ($this->tasks()->where('done', False)->get() as $task)\n {\n $tasksName->push($task->name);\n }\n return $tasksName;\n }", "function cpm_url_tasklist_index( $project_id ) {\n $url = sprintf( '%s?page=cpm_projects&tab=task&action=index&pid=%d', admin_url( 'admin.php' ), $project_id );\n\n return apply_filters( 'cpm_url_tasklist_index', $url, $project_id );\n}", "function aDBc_get_all_scheduled_tasks() {\n\t$aDBc_all_tasks = array();\n\tif(function_exists('is_multisite') && is_multisite()){\n\t\tglobal $wpdb;\n\t\t$blogs_ids = $wpdb->get_col(\"SELECT blog_id FROM $wpdb->blogs\");\n\t\tforeach($blogs_ids as $blog_id){\n\t\t\tswitch_to_blog($blog_id);\n\t\t\t\taDBc_add_scheduled_tasks($aDBc_all_tasks, $blog_id);\n\t\t\trestore_current_blog();\n\t\t}\n\t}else{\n\t\taDBc_add_scheduled_tasks($aDBc_all_tasks, \"1\");\n\t}\n\treturn $aDBc_all_tasks;\n}", "function getIdList()\n{\n $ret='';\n foreach ($this->tasklist as $tasktime){\n if(isset($tasktime['id']) && $tasktime['id']>0){\n $ret.=(empty($ret)?'':',').$tasktime['id'];\n } \n }\n return $ret;\n}", "public function getTaskList()\n {\n $tasks = $this->loader->loadTasks();\n\n return array_map(function (Task $task) {\n return $task->getName();\n }, $tasks);\n }", "function getTasks(){\n $str_query = \"Select * from task\";\n return $this->query ($str_query);\n }", "public function tasks($project = null)\n {\n return $this->hasMany(Task::class);\n }", "public function getTasks() {\n\t\t\treturn $this->tasks;\n\t\t}", "public static function getTaskList() {\n\n\n\t\t$db = Db::getConnection();\n\t\t$taskList = array();\n\n\t\t$result = $db->query(\"SELECT * FROM task ORDER BY id DESC\");\n\n\t\t$i = 0;\n\t\twhile($row = $result->fetch()) {\n\t\t\t$taskList[$i]['id'] = $row['id'];\n\t\t\t$taskList[$i]['title'] = $row['title'];\n\t\t\t$taskList[$i]['text'] = $row['text'];\n\t\t\t$taskList[$i]['status'] = $row['status'];\n $taskList[$i]['user'] = $row['user'];\n\t\t\t$taskList[$i]['tdate'] = $row['tdate'];\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $taskList;\n\t\n}", "public function get_all_assignments(){\n if($this->ID != NULL){\n $myTaskList = $this->get_my_tasks();\n $myAssignmentList = array();\n foreach ($myTaskList as &$myTask) {\n $myAssignmentList = array_merge($myAssignmentList, $myTask->get_assignments());\n }\n return $myAssignmentList;\n }\n\n }", "public function getTaskIdentifier() {}", "function getOpenProjectList() {\n\t$database = new Database();\n\t$query = \"SELECT `id` FROM `project` AS a WHERE a.private=0\";\n\t$results = $database->query($query);\n\t$projID = array();\n\t\n\twhile ($result = $results->fetch_array()) {\n\t\tarray_push($projID, $result['id']);\n\t}\n\treturn $projID;\n}", "public function getIDs();", "public function index($projectId) {\n return $this->projectTaskRepository->findWhere(['project_id' => $projectId]);\n }", "function getProjectIdByTask($idTask)\n{\n $query = \"SELECT projects.id AS project_id,works.state AS work_state\tFROM projects\nINNER join \tworks ON\tprojects.id = works.project_id\nINNER\tjoin tasks ON works.id = tasks.work_id\nWHERE\ttasks.id = :id;\";\n $params = [\"id\" => $idTask];\n $result = Query($query, $params, false);\n return $result['project_id'];\n}", "protected function getRegisteredTaskGroups() {}", "public function getList($project_id)\n\t{\n\t\t// Get all of the tasks related to the project\n\t\t$task_list = DB::table('task')\n\t\t\t->where('project_id', '=', $project_id)\n\t\t\t->orderBy('task.created_at', 'desc')\n\t\t\t->get();\n\n\t\tforeach ($task_list as & $task)\n\t\t{\n\t\t\t$related_users = $this->getTaskInvoice($task->id);\n\t\t\t$task->total_task_price = $this->calculateTaskUserRoles($related_users);\n\t\t\t$task->related_users = $related_users;\n\n\t\t\t// Get users information (in our case only fname, lname)\n\t\t\tforeach ($task->related_users as & $user)\n\t\t\t{\n\t\t\t\t$local_user = User::find($user->user_id);\n\t\t\t\t$redmine_user = RedmineUser::getRedmineUser($local_user->email);\n\n\t\t\t\t$user->firstname = $redmine_user->firstname;\n\t\t\t\t$user->lastname = $redmine_user->lastname;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $task_list;\n\t}", "abstract public function getIds();", "public function getSubTasksByTaskId_get()\n {\n $taskId = $this->get('taskId');\n if (!$taskId) {\n $response = array('results' => false, 'code' => 404, 'message' => 'Sub Task ID is missing');\n log_message(\"Debug\", \"getSubTasksByTaskId =\" . json_encode($response));\n $this->response($response, 404);\n exit();\n } else {\n $result = $this->subtasks_m->getSubTasksByTaskId($taskId);\n if ($result) {\n $response = array('results' => $result, 'code' => 200, 'message' => 'Success');\n log_message(\"DEBUG\", \"getSubTasksByTaskId = \" . json_encode($response));\n $this->response($response, 200);\n exit;\n } else {\n $response = array('results' => FALSE, 'code' => 404, 'message' => 'No data found');\n log_message(\"DEBUG\", \"getSubTasksByTaskId = \" . json_encode($response));\n $this->response($response, 404);\n exit;\n }\n }\n }", "public function getIncludeProjectIds()\n {\n return $this->include_project_ids;\n }", "public function getTask($project_id){\n $task = Task::where('project_id',$project_id)->where('availability',1)->get();\n foreach ($task as $value) {\n echo \"<option value='\".$value->id.\"'>\".$value->taskname.\"</option>\";\n }\n }", "public function getAllTasks()\r\n {\r\n $cursor = $this->collection->find([], [ 'limit' => $this->limit, 'skip' => $this->skip ]);\r\n $total = $this->collection->count();\r\n $args = array();\r\n foreach ($cursor as $document) {\r\n $temp = array(\r\n \"id\" => $document[\"_id\"],\r\n \"title\" => $document[\"title\"],\r\n \"description\" => $document[\"description\"],\r\n \"due_date\" => $document[\"due_date\"],\r\n \"completed\" => $document[\"completed\"],\r\n \"created_at\" => $document[\"created_at\"],\r\n \"updated_at\" => $document[\"updated_at\"]\r\n );\r\n array_push($args,$temp);\r\n }\r\n\r\n $args['filter'] = array( 'filter' => 1);\r\n array_push($args,self::pagination($total));\r\n\r\n return $args;\r\n }", "public function getAllIds(): array;", "function get_all_tasks() {\n\t$conn = open_db();\n\n\t$stmt = $conn->prepare('SELECT * FROM tasks');\n\n\t$stmt->execute();\n\n\t$arr_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\tclose_db($conn);\n\treturn $arr_rows;\n\n}", "private function _getAllTasks() {\n\t\t$tasks = TaskModel::where('userID',$this->getAuthenticatedUser()->id)\n\t\t\t->where('done',0)\n\t\t\t->orderBy(\\DB::raw('ISNULL(duedate)'), 'ASC')\n\t\t\t->orderBy('duedate','asc')\n\t\t\t->get();\n\t\t\n\t\tforeach($tasks as $i=>$task) {\n\t\t\tif($task->duedate) {\n\t\t\t\t$tasks[$i]['duedate'] = date('Y-m-d\\TH:i:s',strtotime($task->duedate));\n\t\t\t}\n\t\t}\n\t\treturn $tasks;\n\t}", "public function retrieveAllIds();", "function getIds() {\n return array();\n}", "public function getTask_id()\n {\n return $this->task_id;\n }", "function getAllUsersIdInsideAProject($projectid)\n{\n $query = \"SELECT distinct users.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND projects.id = :id AND users.state != 0\nORDER BY users.id\";\n\n $params = [\"id\" => $projectid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "function getSelectedProjectIds() {\n return $this->getAdditionalProperty('selected_project_ids', array());\n }", "public function getTasks($ids, $domains = null) { }", "public static function getTasks($id)\n {\n $sql = 'SELECT * FROM tasks\n WHERE todo_list_id = :id';\n \n $db = static::getDB(); \n \n $stmt = $db->prepare($sql);\n $stmt->bindValue(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function ids();", "public function getTasks()\n {\n $sql = 'SELECT DISTINCT `task` FROM time ORDER BY `task`';\n return $this->db->fetchAll( $sql ) ;\n }", "public function tasks();", "public function tasks();", "function task_id()\n\t{\n\t\treturn Kernel::taskId();\n\t}", "public function getIndex($id)\n\t{\n\t\t//\n\t\tif(Sentry::getUser()->hasAnyAccess(array('task.create', 'task.edit', 'task.delete'))){\n\t\t\t$project = Project::find($id);\n\n\t\t\t$tasks = $project->tasks();\n\t\t\tif(! Input::has('showInCompleted')){\n\t\t\t\t$showCompleted = true;\n\t\t\t\t$tasks->whereNotNull('is_complete');\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$showCompleted = false;\n\t\t\t\t$tasks->whereNull('is_complete');\n\t\t\t}\n\n\t\t\t// User can not see all tasks\n\t\t\tif(! Sentry::getUser()->hasAccess('admin')){\n\t\t\t\t$tasks->where('user_id', '=', Sentry::getUser()->id);\n\t\t\t}\n\n\t\t\t$tasks = $tasks->get();\n\n\t\t\t$timeFields = array();\n\t\t\tif(count($tasks) > 0){\n\t\t\t\tforeach($tasks[0]->time as $key => $value){\n\t\t\t\t\t$timeFields[] = $key;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn View::make('frontend.tasks.index')\n\t\t\t\t->with('project', $project)\n\t\t\t\t->with('tasks', $tasks)\n\t\t\t\t->with('timeFields', $timeFields)\n\t\t\t\t->with('showCompleted', $showCompleted);\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::back()->with('error', 'You do not have permission.');\n\t\t}\n\t}", "public function run()\n {\n \tDB::table('tasks')->delete();\n \n $tasks = array(\n ['id' => 1, 'name' => 'Sub-Task 1', 'project_id' => 1, 'completed' => false, 'description' => 'Sample task 1 for project 1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'name' => 'Sub-Task 2', 'project_id' => 1, 'completed' => false, 'description' => 'Sample task 2 for project 1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 3, 'name' => 'Sub-Task 3', 'project_id' => 2, 'completed' => false, 'description' => 'Sample task 1 for project 2', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 4, 'name' => 'Sub-Task 4', 'project_id' => 2, 'completed' => true, 'description' => 'Sample task 2 for project 2', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 5, 'name' => 'Sub-Task 5', 'project_id' => 2, 'completed' => true, 'description' => 'Sample task 3 for project 2', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 6, 'name' => 'Sub-Task 6', 'project_id' => 3, 'completed' => true, 'description' => 'Sample task 1 for project 3', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 7, 'name' => 'Sub-Task 7', 'project_id' => 3, 'completed' => false, 'description' => 'Sample task 2 for project 3', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n \n // Uncomment the below to run the seeder\n DB::table('tasks')->insert($tasks);\n }", "public function getSubTasksById_get()\n {\n $subTaskId = $this->get('subTaskId');\n if (!$subTaskId) {\n $response = array('results' => false, 'code' => 404, 'message' => 'Sub Task ID is missing');\n log_message(\"Debug\", \"getSubTasksById =\" . json_encode($response));\n $this->response($response, 404);\n exit();\n } else {\n $result = $this->subtasks_m->getSubTasksById($subTaskId);\n if ($result) {\n $response = array('results' => $result, 'code' => 200, 'message' => 'Success');\n log_message(\"DEBUG\", \"getSubTasksById = \" . json_encode($response));\n $this->response($response, 200);\n exit;\n } else {\n $response = array('results' => FALSE, 'code' => 404, 'message' => 'No data found');\n log_message(\"DEBUG\", \"getSubTasksById = \" . json_encode($response));\n $this->response($response, 404);\n exit;\n }\n }\n }", "function getId() {\n\t\n\t\treturn $this->taskId;\n\t\n\t}", "public function getAll() : array\n {\n return $this->read('SELECT id, text FROM tasks', [], self::VALUE_TYPE_ARRAY);\n }", "public function getTasks($token, $id) {\n\t\t$key = env('TODOIST_API_KEY');\n\t\t// create guzzle client\n\t\t$client = new Client([\n\t\t\t'base_uri' => 'https://api.todoist.com/rest/v1/'\n\t\t]);\n\t\t// prepare auth headers\n\t\t$headers = ['Authorization' => 'Bearer '.$token];\n\t\t// try guzzle call\n\t\ttry {\n\t\t\t$response = $client->request('GET', 'tasks?project_id='.$id, ['headers' => $headers]);\n\t\t\t$json = json_decode($response->getBody(), true);\n\t\t\tif ($json === false) {\n\t\t\t\t$ret = json_decode('{\"status\":\"FAIL\",\"tasks\":[]', true);\n\t\t\t} else {\n\t\t\t\t$temp = '{\"status\":\"OK\",\"tasks\":[';\n\t\t\t\tforeach ($json as $task) {\n\t\t\t\t\t$temp = $temp.'\"'.$task['content'].'\",';\n\t\t\t\t}\n $temp = substr($temp,0,-1).']}';\n\t\t\t\t$ret = json_decode($temp, true);\n\t\t\t}\n\t\t\treturn $ret;\n\t\t} catch (RequestException $e) {\n\t\t\techo Psr7\\Message::toString($e->getRequest());\n\t\t\tif ($e->hasResponse()) {\n\t\t\t\techo Psr7\\Message::toString($e->getResponse());\n\t\t\t}\n\t\t}\n\t}", "public function getTasks()\n\t{\n\t\treturn json_decode(self::getClient()->getTasks($this->getDomain()));\n\t}", "public static function allIds()\n {\n return array_keys(self::_configById());\n }", "public function run()\n {\n DB::table('tasks')->delete();\n\n $tasks = array(\n ['id' => 1, 'name' => 'Task 1', 'slug' => 'task-1', 'project_id' => 1, 'completed' => false, 'description' => 'My first task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'name' => 'Task 2', 'slug' => 'task-2', 'project_id' => 1, 'completed' => false, 'description' => 'My first task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 3, 'name' => 'Task 3', 'slug' => 'task-3', 'project_id' => 1, 'completed' => false, 'description' => 'My first task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 4, 'name' => 'Task 4', 'slug' => 'task-4', 'project_id' => 1, 'completed' => true, 'description' => 'My second task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 5, 'name' => 'Task 5', 'slug' => 'task-5', 'project_id' => 1, 'completed' => true, 'description' => 'My third task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 6, 'name' => 'Task 6', 'slug' => 'task-6', 'project_id' => 2, 'completed' => true, 'description' => 'My fourth task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 7, 'name' => 'Task 7', 'slug' => 'task-7', 'project_id' => 2, 'completed' => false, 'description' => 'My fifth task', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n\n //// Uncomment the below to run the seeder\n DB::table('tasks')->insert($tasks);\n }" ]
[ "0.7349041", "0.7268452", "0.7144303", "0.7090488", "0.68606055", "0.68480045", "0.6777868", "0.675146", "0.6652753", "0.66396725", "0.66233706", "0.6583851", "0.6581184", "0.65701395", "0.6569184", "0.6548549", "0.65426576", "0.6538949", "0.65371144", "0.65371144", "0.6515668", "0.6477169", "0.646039", "0.6447951", "0.64345586", "0.6398475", "0.6393566", "0.6379948", "0.63613594", "0.6355402", "0.6353425", "0.6350717", "0.6306867", "0.6255852", "0.6242588", "0.6242588", "0.6238915", "0.62350905", "0.6226145", "0.62212616", "0.62212616", "0.6185759", "0.61854625", "0.6184398", "0.61819345", "0.61798865", "0.6168571", "0.6167034", "0.6152007", "0.61389774", "0.6132999", "0.6127985", "0.6120545", "0.61205417", "0.6096437", "0.60939234", "0.60928404", "0.60804754", "0.6067688", "0.6062935", "0.606181", "0.6054135", "0.60360754", "0.6033877", "0.60300416", "0.6029195", "0.6015752", "0.60120124", "0.6000165", "0.5991462", "0.5991046", "0.5983754", "0.59816927", "0.5979816", "0.59784985", "0.5957223", "0.5955823", "0.5953004", "0.59508187", "0.5947206", "0.5944051", "0.5942852", "0.59409493", "0.59396", "0.5933491", "0.59302026", "0.59253716", "0.5924953", "0.5921582", "0.5921582", "0.5920661", "0.59167224", "0.59151334", "0.59091175", "0.58951604", "0.58881974", "0.58821464", "0.58814675", "0.58750945", "0.5863324" ]
0.82237864
0
/ get milestone ID by uuid
/ получить ID майстоне по uuid
public function milestoneIDByUuid($uuid) { $uuid = mysql_real_escape_string($uuid); $milestone = mysql_fetch_assoc(mysql_query("SELECT ID FROM ".$this->getTablePrefix()."milestones WHERE uuid='$uuid'")); return (int) $milestone["ID"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cpm_url_single_milestone( $project_id, $milestone_id ) {\n $url = sprintf( '%s?page=cpm_projects&tab=milestone&action=single&pid=%d&ml_id=%d', admin_url( 'admin.php' ), $project_id, $milestone_id );\n\n return apply_filters( 'cpm_url_single_milestone', $url, $project_id, $milestone_id );\n}", "public function workpackageIDByUuid($uuid) {\n\t\t$uuid = mysql_real_escape_string($uuid);\n\t\t$workpackage = mysql_fetch_assoc(mysql_query(\"SELECT ID FROM \".$this->getTablePrefix().\"workpackage WHERE uuid='$uuid'\"));\n\t\treturn (int) $workpackage[\"ID\"];\n\t}", "function getMilestoneInfo($m_id)\n\t\t {\n\t\t \t//get the value from the database\n\t\t \t$milestones = $this->manage_content->getValue_where('milestone_info','*','milestone_id',$m_id);\n\t\t\t\n\t\t\treturn $milestones[0];\n\t\t }", "public function findId($event)\n {\n if (empty($this->jobId)) {\n $scenario = $event instanceof ScenarioEvent ? $event->getScenario() : $event->getOutline();\n $context = $event->getContext();\n $url = $context->getSession()->getDriver()->getWebDriverSession()->getUrl();\n $parts = explode('/', $url);\n $this->jobId = array_pop($parts);\n }\n }", "public function milestone()\n {\n return Milestone::i();\n }", "public function fetch_the_id() {}", "abstract public function getMasheryObjectId();", "function project_id($project) {\n\t\treturn MintVine::project_id($project); \n\t}", "private function get_id()\n\t{\n\t\treturn $this->m_id;\n\t}", "function cpm_url_milestone_index( $project_id ) {\n $url = sprintf( '%s?page=cpm_projects&tab=milestone&action=index&pid=%d', admin_url( 'admin.php' ), $project_id );\n\n return apply_filters( 'cpm_url_milestone_index', $url, $project_id );\n}", "public function find_changeset_post_id($uuid)\n {\n }", "public function get_id();", "public function get_id();", "public function get_id();", "public function get_id();", "function getId() {\n\t\n\t\treturn $this->taskId;\n\t\n\t}", "function mc_issue_get_id_from_summary($p_username, $p_password, $p_summary) {\n global $g_project_override;\n\n $t_user_id = mci_check_login($p_username, $p_password);\n if ($t_user_id === false) {\n return mci_soap_fault_login_failed();\n }\n\n $t_query = 'SELECT id FROM {bug} WHERE summary = ' . db_param();\n\n $t_result = db_query($t_query, array($p_summary), 1);\n\n if (db_num_rows($t_result) == 0) {\n return 0;\n } else {\n while (( $t_row = db_fetch_array($t_result) ) !== false) {\n $t_issue_id = (int) $t_row['id'];\n $t_project_id = bug_get_field($t_issue_id, 'project_id');\n $g_project_override = $t_project_id;\n\n if (mci_has_readonly_access($t_user_id, $t_project_id) &&\n access_has_bug_level(config_get('view_bug_threshold', null, null, $t_project_id), $t_issue_id, $t_user_id)) {\n return $t_issue_id;\n }\n }\n\n # no issue found that belongs to a project that the user has read access to.\n return 0;\n }\n}", "public function determineId() {}", "public function getId()\n {\n return $this->get('uuid');\n }", "public function getIdByUuid($uuid)\n {\n $sql = \"SELECT * FROM `modules` WHERE `uuid` = :uuid\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':uuid', $uuid, PDO::PARAM_STR);\n try {\n $ret = $stmt->execute();\n if (!$ret) {\n return false;\n }\n } catch (PDOException $e) {\n return false;\n }\n $res = $stmt->fetch(PDO::FETCH_ASSOC);\n return $res['id'];\n }", "public function get_id() : string;", "public static function findByMilestoneId($proj_id=\"\") {\n global $database;\n\t\t$sql = \"SELECT * FROM milestones \";\n\t\t$sql .= \"WHERE id = '{$proj_id}' \";\n\t\t$sql .= \"LIMIT 1\";\n\t\t$result_array = self::findBySql($sql); // $result_array is an object\n\t\t\n\t\treturn !empty($result_array) ? array_shift($result_array) : false;\n\t\t\t\n\t}", "public function getId() {\n\t\treturn $this->uuid;\n\t}", "function getId() ;", "public static function getID(): string;", "public function getCurrentMilestone()\n {\n $this->load->model('campaign_model', 'campaign');\n $milestones = $this->campaign->milestones_model();\n $milestone = $this->campaign->milestone_filter(\"\", $milestones);\n return $milestone->current;\n }", "function get_by_id($id)\r\n {\r\n $sql=\" SELECT M.id, M.name, M.a AS high_percentage, \" .\r\n \" M.b AS medium_percentage, M.c AS low_percentage, \" .\r\n \" M.target_date, M.start_date, \" .\r\n \" M.testplan_id, NH_TPLAN.name AS testplan_name \" .\r\n // \" M.build_id, B.name AS build_name, \" . \r\n // \" M.platform_id, P.name AS platform_name \" . \r\n// \" FROM {$this->tables['milestones']} M \" .\r\n// \" JOIN {$this->tables['nodes_hierarchy']} NH_TPLAN \" .\r\n \" FROM \".$this->db->get_table('milestones').\" M \" .\r\n \" JOIN \".$this->db->get_table('nodes_hierarchy').\" NH_TPLAN \" .\r\n \" ON NH_TPLAN.id=M.testplan_id \" .\r\n // \" LEFT OUTER JOIN {$this->tables['builds']} B \" .\r\n // \" ON B.id=M.build_id \" .\r\n // \" LEFT OUTER JOIN {$this->tables['platforms']} P \" .\r\n // \" ON P.id=M.platform_id \" .\r\n \" WHERE M.id = \" . $this->db->prepare_int($id);\r\n \r\n $row = $this->db->fetchRowsIntoMap($sql,'id');\r\n return $row;\r\n }", "public static function getProjectInstanceID();", "public function fetchProjectID(): string {\n return $this->source->fetchProjectID();\n }", "protected abstract function getTaskrunnerId() : string;", "abstract protected function get_uuid();", "public function getID();", "public function getID();", "public function getID();", "public function getIssueId()\n {\n return $this->issue_id;\n }", "function getCurrentReleaseId($project_id)\n {\n $releases = $this->executeQuery(\"\n SELECT id, start_date, end_date\n FROM release\n WHERE project_id = {$project_id}\n AND start_date <= NOW()\n ORDER BY start_date DESC\n LIMIT 1 \n \");\n \n return empty($releases[0]['id']) ? '0' : $releases[0]['id'];\n }", "public function uuid_to_campaignlog_id($uuid, $meta_key)\n {\n global $wpdb;\n $table = $wpdb->prefix . Core::campaign_log_meta_table_name;\n\n return $wpdb->get_var(\n $wpdb->prepare(\n \"SELECT campaign_log_id from $table WHERE meta_key = '%s' AND meta_value = %s\",\n $meta_key,\n $uuid\n )\n );\n }", "function mci_get_project_id( $p_project ) {\n\tif( is_object( $p_project ) ) {\n\t\t$p_project = get_object_vars( $p_project );\n\t}\n\n\tif( isset( $p_project['id'] ) && (int)$p_project['id'] != 0 ) {\n\t\t$t_project_id = (int)$p_project['id'];\n\t} else if( isset( $p_project['name'] ) && !is_blank( $p_project['name'] ) ) {\n\t\t$t_project_id = project_get_id_by_name( $p_project['name'] );\n\t} else {\n\t\t$t_project_id = ALL_PROJECTS;\n\t}\n\n\treturn $t_project_id;\n}", "abstract public function getID();", "abstract public function getID();", "abstract public function getID();", "public function milestone()\n {\n if (!isset($this->_milestone)) {\n $this->_milestone = Milestone::find($this->owner_id);\n }\n return $this->_milestone;\n }", "public function fetchId();", "public function forLevelId($level)\n {\n $matId = $this->level->where('slug', $level)->first();\n return $matId->id;\n }", "public function getUniqueId(): string;", "public function getUniqueId(): string;", "public function getID(): string;", "public function getID(): string;", "function get_unique_id() {\n\t\treturn ($this->unique_id);\n\t}", "public function getRequestedId() {}", "public function getTaskUid() {}", "function get_id() {\n\t\treturn $this->get_mapped_property( 'id' );\n\t}", "public function getTaskIdentifier() {}", "function getId();", "function getId();", "function getId();", "function getId();", "abstract protected function getProjectId();", "function getUniqueID()\n{\n\t$CI = get_instance();\n\t$now = gmdate('Ymd', time() + (7 * 60 * 60));\n\n\t$CI->db->select_max('id', 'id');\n\t$x = $CI->db->get_where('history', ['LEFT(id,8)' => $now])->row_array();\n\n\t$id = sprintf(\n\t\t\"%04s\",\n\t\tintval(\n\t\t\tsubstr($x['id'], 8)\n\t\t) + 1\n\t);\n\treturn $now . $id;\n}", "function getID() {\n\t\treturn $this->get(\"id\");\n\t}", "public function getIssueNumberID()\n {\n return $this->issueNumberID;\n }", "public function createIssueIdentifier() {\n\t\treturn md5($this->extensionName . '/' . $this->filePath . '-' . $this->lineNumber);\n\t}", "public function extractID(): string\n {\n $idColumn = $this->qb->getIdColumn($this->request, new MetaData());\n if ('rec_id' === $idColumn) {\n return $this->records['recordId'];\n }\n\n $uri = $this->qb->getUri() . '/' . $this->records['recordId'];\n try {\n $record = $this->conn->performFMRequest('GET', $uri, $this->qb->getOptions());\n return $record[0]['fieldData'][$idColumn];\n } catch (Exception $e) {\n throw new FMException('Unable to locate record primary key with error ' . $e->getMessage());\n }\n\n }", "public function get_id()\n {\n }", "function ajan_activity_item_id() {\n\techo ajan_get_activity_item_id();\n}", "public abstract function getPlanId();", "public function get_id() {\n\t\treturn apply_filters( 'socialchef_entity_id', $this->post ? $this->id : null, $this );\n\t}", "protected function getID() {\r\n\t\treturn $this->getFirstUID();\r\n\t}", "public function get_project_id(): string {\n\t\treturn $this->get_prop( 'project_id' );\n\t}", "function getPostId();", "protected function id()\n {\n return $this->get('id');\n }", "public function getUniqueId();", "public function getUniqueId();", "public function find($uuid);", "function id(): string { return $this->id; }", "function fetch_project_ownerid($projectid = 0)\n{\n global $ilance, $myapi;\n $sql = $ilance->db->query(\"SELECT user_id FROM \" . DB_PREFIX . \"projects WHERE project_id = '\".intval($projectid).\"' LIMIT 1\", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return $res['user_id'];\n }\n return 0;\n}", "public function getJobId()\n {\n return Arr::get($this->payload, 'uuid') ?: Arr::get($this->payload, $this->stompQueue::HEADERS_KEY . '.message-id') ?: Str::uuid();\n }", "function get_id() {\r\n\t\treturn $this->id_ma;\r\n\t}", "public function id(): int;", "public function id(): int;", "private function prismGetLatestId() {\n\t\treturn $this->prismDatabase->get_field(\"SELECT `id` FROM `prism_data` ORDER BY `id` DESC LIMIT 1\");\n\t}", "public static function getCurrentMilestone($project) {\n $currentDate = new DateTime(date('Y/m/d'));\n\n $currentMilestone = Milestone::where([['id_project', $project->id], ['deadline', '>=', $currentDate]])->orderBy('deadline', 'asc')->first();\n \n if(is_object($currentMilestone)) {\n $currentMilestone['timeLeft'] = $currentDate->diff(new DateTime($currentMilestone->deadline))->format('%a');\n $currentMilestone['tasks'] = Task::information(Task::where([['id_milestone', $currentMilestone->id], ['progress', '<', 100]])->get());\n \n return $currentMilestone;\n }\n else\n return null;\n }", "function getMonographId() {\r\n\t\treturn $this->getData('monograph_id');\r\n\t}", "public function get_id() { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Base->get_id() function\n\t\t\treturn $this->id;\n\t\t}", "public function getId() { return $this->mId; }", "public function getId()\n {\n $entityId = null;\n $entityId = $this->context->getRequest()->getParam('st_id'); \n \n return $entityId;\n }", "protected abstract function _obtener_id();", "protected function findMilestoneNumber($title)\n {\n $milestone_list = $this->listMilestones( );\n foreach ($milestone_list as $key => $milestone) {\n if ( strtoupper($title) === strtoupper($milestone[\"title\"]) ){\n return $milestone[\"number\"];\n }\n }\n\n return null;\n }", "public function get_id() : string\n {\n }", "public function get_id() : string\n {\n }", "function getReleaseId() {\n\n return $this->getRelease()->getReleaseID();\n\n }", "function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function getId() : int;", "public function getJobId()\n {\n return $this->decoded['id'] ?? null;\n }", "public function getJobId()\n {\n return $this->decoded['id'] ?? null;\n }", "public function id() {\n\t\treturn $this->id ? $this->id : $this->name;\n\t}", "public function getRevisionId();", "public function getId() {}", "public function getId() {}", "public function getId() {}" ]
[ "0.6355104", "0.6251783", "0.6142316", "0.6039435", "0.5930211", "0.5899746", "0.58554435", "0.5853146", "0.5820669", "0.5813077", "0.5750523", "0.5746787", "0.5746787", "0.5746787", "0.5746787", "0.57061166", "0.56989473", "0.56323427", "0.5614754", "0.5609337", "0.5590069", "0.55705875", "0.5567454", "0.5531752", "0.5529163", "0.5516219", "0.5495237", "0.5489854", "0.5479586", "0.5469961", "0.5464889", "0.54646665", "0.54646665", "0.54646665", "0.5454479", "0.5454379", "0.5441779", "0.54385746", "0.5427865", "0.5427865", "0.5427865", "0.54178804", "0.540898", "0.54046965", "0.5399771", "0.5399771", "0.5399188", "0.5399188", "0.5380381", "0.53689516", "0.5343023", "0.53315943", "0.5326872", "0.5321556", "0.5321556", "0.5321556", "0.5321556", "0.53165597", "0.5306593", "0.530182", "0.53002614", "0.52918154", "0.52827895", "0.52748376", "0.5271086", "0.5266025", "0.52592224", "0.52535385", "0.525222", "0.52359253", "0.52307177", "0.5227366", "0.5227366", "0.52234155", "0.52232414", "0.52125317", "0.5210008", "0.52029914", "0.5198166", "0.5198166", "0.51949275", "0.51678467", "0.5165262", "0.51638883", "0.5163862", "0.5159603", "0.51543057", "0.5153319", "0.51508737", "0.51508737", "0.51508355", "0.5150164", "0.51403767", "0.5138329", "0.5138329", "0.5132151", "0.51299864", "0.512791", "0.512742", "0.512742" ]
0.79266995
0
/ get workpackage ID by uuid
/ получить идентификатор workpackage по uuid
public function workpackageIDByUuid($uuid) { $uuid = mysql_real_escape_string($uuid); $workpackage = mysql_fetch_assoc(mysql_query("SELECT ID FROM ".$this->getTablePrefix()."workpackage WHERE uuid='$uuid'")); return (int) $workpackage["ID"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function existWorkpackage($uuid, $workpackage_id) {\n\t\t$uuid = (int) $uuid;\n\t\t$workpackage_id = (int) $workpackage_id;\n\t\t\n\t\t$workpackage = mysql_fetch_assoc(mysql_query(\"SELECT ID FROM \".$this->getTablePrefix().\"workpackage WHERE (uuid='$uuid' OR ID='$workpackage_id') AND project='{$this->project->ID}' LIMIT 1\"));\n\t\t\n\t\tif(!$workpackage)\n\t\t\tResponse::error(\"Workpackage doesn't exist\");\n\t\telse\n\t\t\treturn (int) $workpackage[\"ID\"];\n\t}", "public function getPackageId(): int;", "public function getId() {\n\t\treturn $this->uuid;\n\t}", "function GetID()\n\t{\n\t\tif ($this->package === null)\n\t\t\treturn \"\";\n\t\treturn $this->package->GetID();\n\t}", "public function getId()\n {\n return $this->get('uuid');\n }", "public function getUniqueId(): string;", "public function getUniqueId(): string;", "protected function _getPackageId()\n {\n return $this->_package_name . '-' . $this->_getPackageVersion();\n }", "public function getUniqueId();", "public function getUniqueId();", "abstract protected function get_uuid();", "public static function getID(): string;", "public function get_id();", "public function get_id();", "public function get_id();", "public function get_id();", "public function determineId() {}", "public function getUniqueIdentifier() : string {}", "public function getUniqueIdentifier() : string {}", "public function getUniqueIdentifier() : string {}", "function sw_get_main_id() {\n\treturn 'some-id';\n}", "public function fetch_the_id() {}", "public static function getProjectInstanceID();", "private function getUniqueId () {\n return Config::get('incut.uniquePrefix').$this->processData['id'];\n }", "public function get_id() : string;", "protected abstract function getTaskrunnerId() : string;", "public function getId()\n {\n if (is_null($this->id))\n $this->id = 'wgtid_'.BuizCore::uniqid();\n\n return $this->id;\n\n }", "function getUniqueIdentifier() : string ;", "public function getTaskIdentifier() {}", "public function getID();", "public function getID();", "public function getID();", "public function getUniqueId()\n {\n }", "public function getIdByUuid($uuid)\n {\n $sql = \"SELECT * FROM `modules` WHERE `uuid` = :uuid\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':uuid', $uuid, PDO::PARAM_STR);\n try {\n $ret = $stmt->execute();\n if (!$ret) {\n return false;\n }\n } catch (PDOException $e) {\n return false;\n }\n $res = $stmt->fetch(PDO::FETCH_ASSOC);\n return $res['id'];\n }", "abstract public function getID();", "abstract public function getID();", "abstract public function getID();", "public function getUniqueId()\n {\n return $this->module ? ltrim($this->module->getUniqueId() . '/' . $this->id, '/') : $this->id;\n }", "public function getId(): string {\n\t\treturn ($this->namespace ? $this->namespace . '/' : '') . $this->getName();\n\t}", "public static function customId(): string;", "function project_id($project) {\n\t\treturn MintVine::project_id($project); \n\t}", "abstract protected function getProgramID();", "public function getId(): string\n {\n return \\uniqid();\n }", "public abstract function getApplicationId();", "public function getPackageId()\n {\n return $this->getParameter('packageId');\n }", "public static function getModId(){\n return AMI_Registry::get('modId', false);\n }", "function getId() ;", "function getUUID($path) {\n\t\ttry{\n\t\t\t$uuid = $this->soap_folder->findByPath(array('sid' => $this->token, 'path' => $path));\n\t\t\treturn $uuid->folder->id;\n\t\t} catch (Exception $e) {\n\t\t\techo format_exception($e);\n\t\t}\n\t}", "public function id() : int\n\t\t{\n\t\t$parts = \\explode('_', static::class);\n\n\t\treturn (int)$parts[1];\n\t\t}", "public function getPackagingId(): string\n {\n $packagingId = $this->request->getParam(PackagingInterface::PACKAGING_ID);\n return preg_replace('/[^\\w0-9-_]/', '', $packagingId);\n }", "public function getIdentifier(): string\n {\n return $this->getId();\n }", "public function getID(): string;", "public function getID(): string;", "public function getPackageId()\n {\n if (array_key_exists(\"packageId\", $this->_propDict)) {\n return $this->_propDict[\"packageId\"];\n } else {\n return null;\n }\n }", "private function getId()\n {\n //Store locally\n if (isset($this->data['id']) && !empty($this->data['id'])) {\n $id = (string) $this->data['id'];\n } else {\n $id = uniqid();\n }\n\n return (string) strtolower($id);\n }", "public function get_id() { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Base->get_id() function\n\t\t\treturn $this->id;\n\t\t}", "public function getId()\n {\n//\n// $request = new IdRequest();\n// /** @var IdResponse $response */\n// list($response,) = $grpc->request(\"/helper.Helper/GetDistributeId\", $request, IdResponse::class);\n//\n// return [\"id\" => $response->getResult()];\n return [\"id\" => IdGenerator::getId()];\n }", "private function getPackageId($package)\n\t{\n\t\t$this->packageId = $this->db->setQuery(\n\t\t\t$this->db->getQuery(true)\n\t\t\t\t->select($this->db->quoteName('id'))\n\t\t\t\t->from($this->db->quoteName('#__packages'))\n\t\t\t\t->where($this->db->quoteName('package') . ' = ' . $this->db->quote($package))\n\t\t\t\t->where($this->db->quoteName('version') . ' = ' . $this->db->quote($this->packages[$package]['version']))\n\t\t)->loadResult();\n\t}", "public static function getGUIDProperty()\n {\n return 'PayRunID';\n }", "abstract protected function getUuidFromStore();", "protected function getInstanceIdentifier()\n {\n return $this->testSystem->getSystemIdentifier();\n }", "public function getId() {\n\t\t$id = $this->getIdBySnowflakeService ();\n\t\tif (! $id) {\n\t\t\t$id = $this->getIdByLocalSnowflake ();\n\t\t}\n\t\t\n\t\treturn $id;\n\t}", "public function getIdentifier()\n {\n return $this->getId();\n }", "public function getPackageId()\n {\n return $this->packageId;\n }", "public function getID(): string {\n return $this->appName;\n }", "public function getId()\n\t{\n\t\treturn \\App\\Module::getModuleId($this->getName());\n\t}", "public function getUuid(): string;", "public function obtenerID();", "abstract public function getBehatIdentifier();", "function get_unique_id() {\n\t\treturn ($this->unique_id);\n\t}", "public function getTaskUid() {}", "public function getId() : string\n {\n return $this->workflow->id;\n }", "public function getIdentifier() {\n return $this->_group->getIdentifier().'/'.$this->name;\n }", "public function getID(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n\t\treturn $this->id ?: self::DEFAULT_ID;\n\t}", "public function mb_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "function getId();", "function getId();", "function getId();", "function getId();", "public function getId(): string\n {\n return $this->_id;\n }", "public function getId(): string\n {\n return $this->_id;\n }", "static function getId()\n {\n self::$id += 0x1;\n \n return \"idg_\".dechex(self::$id);\n }", "function WorkItemCodeFromWorkItemName($table, $irr_workitemid)\n{\n $db_conn = db_open();\n $res_wi = pg_exec($db_conn, \"SELECT * FROM $table WHERE work_item_name = '$irr_workitemid'\");\n $arr_wi = pg_fetch_array($res_wi, 0);\n $wi_id = trim($arr_wi[work_item_id]);\n return $wi_id;\n}", "protected abstract function _obtener_id();", "public function getUniqueId()\n {\n return str_replace('\\\\', '', ClassLookup::getClass($this)) . $this->id; // TODO\n }", "public function getId(): string\n {\n\t\treturn $this->id;\n\t}", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();" ]
[ "0.68009037", "0.6682209", "0.66582006", "0.6645016", "0.6584819", "0.6551691", "0.6551691", "0.6470802", "0.64253986", "0.64253986", "0.6407713", "0.6353033", "0.6302575", "0.6302575", "0.6302575", "0.6302575", "0.63001484", "0.62629145", "0.62629145", "0.62629145", "0.62589556", "0.6250171", "0.622852", "0.6220043", "0.6212504", "0.619175", "0.6189799", "0.6186183", "0.61829966", "0.61607444", "0.61607444", "0.61607444", "0.6154733", "0.60998183", "0.6087788", "0.6087788", "0.6087788", "0.6085557", "0.6075367", "0.6073737", "0.6072442", "0.6068822", "0.6063812", "0.6052242", "0.6050647", "0.604467", "0.6029026", "0.6016935", "0.6007418", "0.60051405", "0.5982028", "0.59819525", "0.59819525", "0.59814423", "0.5964759", "0.59592265", "0.5951664", "0.59516615", "0.5935032", "0.5934366", "0.5934131", "0.5932675", "0.59318495", "0.5922423", "0.59169763", "0.5911509", "0.59048676", "0.5897925", "0.58824205", "0.5870581", "0.5869552", "0.5866854", "0.5865985", "0.5865766", "0.58625954", "0.5862342", "0.5851502", "0.5851502", "0.5851502", "0.5851502", "0.58476734", "0.58476734", "0.5844513", "0.5844187", "0.58440506", "0.58423597", "0.5833088", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469", "0.5830469" ]
0.80613476
0
/ all tasks IDs of the workpackage
/ все идентификаторы задач работы с пакетом
private function workpackageTasksIDs($workpackage_id) { $tasks_q = mysql_query("SELECT ID FROM ".$this->getTablePrefix()."tasks WHERE workpackage='$workpackage_id'"); $tasks = array(); while($task = mysql_fetch_assoc($tasks_q)) $tasks[] = $task["ID"]; return $tasks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function projectTasksIDs() {\n\t\t$tasks_q = mysql_query(\"SELECT ID FROM \".$this->getTablePrefix().\"tasks WHERE project='{$this->projectID()}'\");\n\t\t$tasks = array();\n\t\twhile($task = mysql_fetch_assoc($tasks_q))\n\t\t\t$tasks[] = $task[\"ID\"];\n\t\treturn $tasks;\n\t}", "public function workpackageTasks($workpackage_id) {\n\t\t$workpackage_id = (int) $workpackage_id;\n\t\t\n\t\t$tasks = array();\n\t\t$tasks_q = mysql_query(\"SELECT * FROM \".$this->getTablePrefix().\"tasks WHERE workpackage='$workpackage_id'\");\n\t\twhile($task = mysql_fetch_assoc($tasks_q)) {\n\t\t\t$task[\"actual\"] = $this->taskActual(array($task[\"ID\"]));\n\t\t\t$tasks[] = $task;\n\t\t}\n\t\treturn $tasks;\n\t}", "public function get_my_tasks(){\n if($this->ID != NULL){\n $sql = \"SELECT ID FROM task WHERE Project=\".$this->ID.\";\";\n $myTaskIDs = $this->get_by_query($sql);\n $myTaskList = array();\n foreach ($myTaskIDs as &$tID) {\n $myTask = new Task();\n $myTask = $myTask->get_by_ID($tID['ID']);\n array_push($myTaskList, $myTask);\n }\n return $myTaskList;\n }\n }", "public function getTaskList();", "public function get_task_list()\n {\n }", "public function projectTasks() {\n\t\t$tasks = array();\n\t\t$tasks_q = mysql_query(\"SELECT * FROM \".$this->getTablePrefix().\"tasks WHERE project='{$this->projectID()}'\");\n\t\twhile($task = mysql_fetch_assoc($tasks_q)) {\n\t\t\t$task[\"actual\"] = $this->taskActual(array($task[\"ID\"]));\n\t\t\t$tasks[] = $task;\n\t\t}\n\t\t\n\t\treturn $tasks;\n\t}", "public function getParallelTasksList(){\n return $this->_get(1);\n }", "function task_id()\n\t{\n\t\treturn Kernel::taskId();\n\t}", "public function tasks($id);", "public function getTaskIdentifier() {}", "public function tasks() {\n // get the company entity id\n $id = $this->id();\n\n // if there is no entity id, return out\n if (is_null($id)) {\n return array();\n }\n\n // construct the url to get all the tasks\n $url = 'companies/' . $id . '/' . \\Weblab\\Highrise\\Task::NAME .'.xml';\n\n // done, return the tasks\n return $this->allForUrl('\\Weblab\\Highrise\\Task', $url);\n }", "public static function getAllTasks()\n {\n $db = Db::getConnection();\n $sql = \"SELECT * FROM tasks\";\n\n $result = $db->query($sql);\n $i = 0;\n\t\t$taskList = array();\n while ($row = $result->fetch()) {\n $taskList[$i] = $row;\n\n $i++;\n }\n return $taskList;\n }", "function getTasks()\r\n\t{\r\n\t\treturn $this->tasks;\r\n\t}", "public function deleteAllTasks() {}", "public function tasks_listUids()\n {\n return $this->_registry->tasks->listUids();\n }", "public function getTasks(): array\n {\n return $this->tasks;\n }", "public function getTasks(): array\n {\n return $this->tasks;\n }", "public function getSerialTasksList(){\n return $this->_get(2);\n }", "function get_tasks()\n{\n\t$url = SD_HOST . '/api/task?filterid=2814&fields=Id,StatusId,Changed';\n\treturn curl_auth_send($url, SD_USER);\n}", "public function getAllTasks(): array\n {\n return $this->list();\n }", "public function getAllTasks()\n {\n $sql = 'SELECT * FROM Task';\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function ids() {\n return array(\n 'nid' => $this->node->nid,\n 'sid' => $this->submission->sid,\n );\n }", "function getTaskIDs($completed = 0) {\n $query = \"SELECT id\n FROM tasklist\n WHERE completed = $completed\n ORDER BY id;\";\n \n $result = mysqli_query($this->connect, $query);\n \n // the array of ids to return later\n $idArray = array();\n \n while ($row = mysqli_fetch_assoc($result)) {\n $row['id'] = (int) $row['id'];\n array_push($idArray, $row['id']);\n }\n \n return $idArray;\n }", "public function getAll()\n {\n return $this->tasks;\n }", "public function tasks();", "public function tasks();", "public function tasks()\n {\n return $this->tasks;\n }", "function Tasks(){\n\t\t\t\treturn $this->tasks;\n\t\t\t}", "function getAllTasks($projectID)\n {\n $tasks = API::call('projects/' . $projectID . '/tasks/');\n return $tasks;\n }", "protected function getRegisteredTaskGroups() {}", "public function getTasks()\n {\n return $this->tasks;\n }", "public function getTasks()\n {\n return $this->tasks;\n }", "public function getTaskList()\n {\n $tasks = $this->loader->loadTasks();\n\n return array_map(function (Task $task) {\n return $task->getName();\n }, $tasks);\n }", "public function get_all_assignments(){\n if($this->ID != NULL){\n $myTaskList = $this->get_my_tasks();\n $myAssignmentList = array();\n foreach ($myTaskList as &$myTask) {\n $myAssignmentList = array_merge($myAssignmentList, $myTask->get_assignments());\n }\n return $myAssignmentList;\n }\n\n }", "function tasks_pending_training_tasks1 (){\n\t\tglobal $db;\n\t\t\n\t\t$stm = $db->prepare(\"SELECT DISTINCT `orderId` FROM `mod_foxycart_training_tasks` WHERE `task` = 1 AND `status` = 0\");\n\t\t$stm->execute();\n\t\t$pendingTasks = $stm->rowCount();\n\n\t\treturn $pendingTasks;\t\n\t}", "public function getTask_id()\n {\n return $this->task_id;\n }", "function tasks_pending_training_tasks2 (){\n\t\tglobal $db;\n\t\t\n\t\t$stm = $db->prepare(\"SELECT DISTINCT `orderId` FROM `mod_foxycart_training_tasks` WHERE `task` = 2 AND `status` = 0\");\n\t\t$stm->execute();\n\t\t$pendingTasks = $stm->rowCount();\n\n\t\treturn $pendingTasks;\t\n\t\n\t}", "function getId() {\n\t\n\t\treturn $this->taskId;\n\t\n\t}", "public function getTasks() {\n\t\t\treturn $this->tasks;\n\t\t}", "public function getIDs();", "public function tasksOfProject( $projectId );", "public function getAllTasks()\n {\n $sql = \"SELECT id, name, email, ztext FROM task\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function getTasks(){\n $str_query = \"Select * from task\";\n return $this->query ($str_query);\n }", "function getTaskClasses ()\n {\n return $this->taskClasses;\n }", "public function getList()\r\n {\r\n $taskMapper = new Project_Model_Mapper_Task();\r\n return $taskMapper->getList();\r\n }", "abstract public function getIds();", "public function Tasks_listing(){\t\n\t\t$result = user_tasks();\t\t\n\t}", "public function getTasks()\n {\n $sql = 'SELECT DISTINCT `task` FROM time ORDER BY `task`';\n return $this->db->fetchAll( $sql ) ;\n }", "function getProjectTasks($pid)\n{\n if (is_null($pid)) {\n return array();\n }\n\n $pid = intval($pid);\n global $DB;\n\n $deals = array();\n $selectDealProject = 'select * from m_deal_project where PROJECT_ID=\"'.$DB->ForSQL($pid).'\"';\n $result = $DB->Query($selectDealProject);\n while ($row = $result->Fetch()) {\n $row['DEAL_ID'] = intval($row['DEAL_ID']);\n if (!in_array($row['DEAL_ID'], $deals)) {\n $deals[] = $row['DEAL_ID'];\n }\n }\n \n $in = array();\n foreach ($deals as $did) {\n $in[] = '\"D_'.$did.'\"';\n }\n $selectUtmTask = 'select butt.*, bt.XML_ID from b_utm_tasks_task butt join b_tasks bt on bt.ID=butt.VALUE_ID where butt.VALUE IN ('.implode(',', $in).') and bt.ZOMBIE=\"N\" order by bt.ID asc';\n $result = $DB->Query($selectUtmTask);\n while ($row = $result->Fetch()) {\n $tasks[] = $row;\n }\n\n return $tasks;\n}", "public function getIdProjectTask()\n {\n return $this->idProjectTask;\n }", "public function getTasks()\n\t{\n\t\treturn json_decode(self::getClient()->getTasks($this->getDomain()));\n\t}", "public function get_keep_completed_task_list()\n {\n }", "public function getTasks()\n {\n // pull them from the config file and make them classes\n $tasks = Config::getOption('project.tasks');\n $project = Config::getOption('project');\n $taskObjects = array();\n\n foreach ($tasks as $index => $task) {\n\n $typeParts = explode('.', $task->type);\n $typePath = '';\n foreach ($typeParts as $part) {\n $typePath .= ucwords(strtolower($part)).'\\\\';\n }\n $typePath = substr($typePath, 0, strlen($typePath)-1);\n \n //$taskName = '\\Usher\\\\Lib\\\\Task\\\\'.$typePath;\n $taskName = '\\\\Lib\\\\Task\\\\'.$typePath;\n $className = $taskName.'Task';\n $taskObject = new $className($project);\n $task->id = $index;\n $taskObject->configure($task);\n\n $taskObjects[] = $taskObject;\n }\n return $taskObjects;\n }", "function aDBc_get_all_scheduled_tasks() {\n\t$aDBc_all_tasks = array();\n\tif(function_exists('is_multisite') && is_multisite()){\n\t\tglobal $wpdb;\n\t\t$blogs_ids = $wpdb->get_col(\"SELECT blog_id FROM $wpdb->blogs\");\n\t\tforeach($blogs_ids as $blog_id){\n\t\t\tswitch_to_blog($blog_id);\n\t\t\t\taDBc_add_scheduled_tasks($aDBc_all_tasks, $blog_id);\n\t\t\trestore_current_blog();\n\t\t}\n\t}else{\n\t\taDBc_add_scheduled_tasks($aDBc_all_tasks, \"1\");\n\t}\n\treturn $aDBc_all_tasks;\n}", "public function tasksName()\n {\n $tasksName = new Collection();\n foreach ($this->tasks()->where('done', False)->get() as $task)\n {\n $tasksName->push($task->name);\n }\n return $tasksName;\n }", "public function getAllTasks(): array\n {\n $availableTaskFilenames = array_diff(scandir(self::TASK_PATH), ['.', '..']);\n\n $taskList = [];\n foreach ($availableTaskFilenames as $filename) {\n $taskList = array_merge($taskList, $this->taskFilenameToArray($filename));\n }\n\n return $taskList;\n }", "public function listTaskClasses(): array;", "public function getItems()\n {\n return $this->tasks;\n }", "function getActivetasks(){\n $str_query = \"Select * from tasks,supervisors where tasks.assigned='0' and tasks.sid=supervisors.id \";\n return $this->query ($str_query);\n\n }", "function getTask() ;", "public function getPackagesIds(): array\n {\n return $this->packagesIds;\n }", "public function getIds();", "protected function getInstallTasks() {\n $tasks = array();\n $task_list = $this->getPage()->findAll('css', '.task-list li');\n\n foreach ($task_list as $task_el) {\n $tasks[strtolower(str_replace(' ', '_', trim(preg_replace('/\\s*\\([^)]*\\)/', '', $task_el->getText()))))] = $task_el->getAttribute('class') ? $task_el->getAttribute('class') : 'todo';\n }\n\n !$this->verbose || print('Found ' . count($tasks) . \" installation tasks.\\n\");\n\n return $tasks;\n }", "public function tasks()\n\t{\n\t\t$currentReleasePath = $this->getReleasesManager()->getCurrentReleasePath();\n\n\t\treturn array(\n\t\t\t// Clone release and update symlink\n\t\t\t$this->cloneRelease(),\n\t\t\t$this->removeFolder('current'),\n\t\t\t$this->updateSymlink(),\n\n\t\t\t// Run composer\n\t\t\t$this->gotoFolder($currentReleasePath),\n\t\t\t$this->runComposer(),\n\n\t\t\t// Set permissions\n\t\t\t\"chmod -R +x \" .$currentReleasePath.'/app',\n\t\t\t\"chmod -R +x \" .$currentReleasePath.'/public',\n\t\t\t\"chown -R www-data:www-data \" .$currentReleasePath.'/app',\n\t\t\t\"chown -R www-data:www-data \" .$currentReleasePath.'/public',\n\t\t);\n\t}", "function get_all_tasks() {\n\t$conn = open_db();\n\n\t$stmt = $conn->prepare('SELECT * FROM tasks');\n\n\t$stmt->execute();\n\n\t$arr_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\tclose_db($conn);\n\treturn $arr_rows;\n\n}", "public function getTaskID() {\n\t\treturn $this->_taskid;\n\t}", "public static function getAllTasks($stepID){\n\t\t$db = new DB_WE();\n\t\t$db->query('SELECT ID FROM ' . WORKFLOW_TASK_TABLE . ' WHERE stepID=' . intval($stepID) . ' ORDER BY ID');\n\n\t\t$tasks = array();\n\n\t\twhile($db->next_record()){\n\t\t\t$tasks[] = new self($db->f(\"ID\"));\n\t\t}\n\t\treturn $tasks;\n\t}", "private function _getAllTasks() {\n\t\t$tasks = TaskModel::where('userID',$this->getAuthenticatedUser()->id)\n\t\t\t->where('done',0)\n\t\t\t->orderBy(\\DB::raw('ISNULL(duedate)'), 'ASC')\n\t\t\t->orderBy('duedate','asc')\n\t\t\t->get();\n\t\t\n\t\tforeach($tasks as $i=>$task) {\n\t\t\tif($task->duedate) {\n\t\t\t\t$tasks[$i]['duedate'] = date('Y-m-d\\TH:i:s',strtotime($task->duedate));\n\t\t\t}\n\t\t}\n\t\treturn $tasks;\n\t}", "public function getRequestedTasks(): array\n {\n return $this->requestedTasks;\n }", "function getIds() {\n return array();\n}", "public function getTaskTemplateList();", "public static function getTaskList() {\n\n\n\t\t$db = Db::getConnection();\n\t\t$taskList = array();\n\n\t\t$result = $db->query(\"SELECT * FROM task ORDER BY id DESC\");\n\n\t\t$i = 0;\n\t\twhile($row = $result->fetch()) {\n\t\t\t$taskList[$i]['id'] = $row['id'];\n\t\t\t$taskList[$i]['title'] = $row['title'];\n\t\t\t$taskList[$i]['text'] = $row['text'];\n\t\t\t$taskList[$i]['status'] = $row['status'];\n $taskList[$i]['user'] = $row['user'];\n\t\t\t$taskList[$i]['tdate'] = $row['tdate'];\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $taskList;\n\t\n}", "function getTaskID()\n\t{\n\t\treturn $this->TaskID;\n\t}", "public function getSubTasksByTaskId_get()\n {\n $taskId = $this->get('taskId');\n if (!$taskId) {\n $response = array('results' => false, 'code' => 404, 'message' => 'Sub Task ID is missing');\n log_message(\"Debug\", \"getSubTasksByTaskId =\" . json_encode($response));\n $this->response($response, 404);\n exit();\n } else {\n $result = $this->subtasks_m->getSubTasksByTaskId($taskId);\n if ($result) {\n $response = array('results' => $result, 'code' => 200, 'message' => 'Success');\n log_message(\"DEBUG\", \"getSubTasksByTaskId = \" . json_encode($response));\n $this->response($response, 200);\n exit;\n } else {\n $response = array('results' => FALSE, 'code' => 404, 'message' => 'No data found');\n log_message(\"DEBUG\", \"getSubTasksByTaskId = \" . json_encode($response));\n $this->response($response, 404);\n exit;\n }\n }\n }", "function getProjectsTasksAssigned($projectid)\n\t{\n\t\t$ret = array();\n\t\t$project = new Projects($projectid);\n\t\t$team_tasks = $this->getTaskList();\n\n\t\t//for each tasks if the developer's tasks and the task have the ID push it into the list\n\t\tforeach($team_tasks as $team_task)\n\t\t\tforeach($project->getTaskList() as $task)\n\t\t\t\tif($team_task->getTaskID() == $task->getTaskID())\n\t\t\t\t\tarray_push($ret, $task);\n\n\t\treturn $ret;\n\t}", "function getIdList()\n{\n $ret='';\n foreach ($this->tasklist as $tasktime){\n if(isset($tasktime['id']) && $tasktime['id']>0){\n $ret.=(empty($ret)?'':',').$tasktime['id'];\n } \n }\n return $ret;\n}", "public function tasks($id) {\n\t\t// get task list w/ tasks w/ phonebooks\n\t\t$this->loadModel('Tasks.Task');\n\t\t$taskList = $this->Task->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Task.id' => $id\n\t\t\t),\n\t\t\t'contain' => array('ChildTask')\n\t\t));\n\t}", "public function getTasks()\n {\n return $this->_dtos;\n }", "public function run()\n {\n $itTasks = json_decode('[{\"zorluk\":3,\"sure\":6,\"id\":\"IT Task 0\"},{\"zorluk\":4,\"sure\":6,\"id\":\"IT Task 1\"},{\"zorluk\":3,\"sure\":10,\"id\":\"IT Task 2\"},{\"zorluk\":4,\"sure\":4,\"id\":\"IT Task 3\"},{\"zorluk\":3,\"sure\":5,\"id\":\"IT Task 4\"},{\"zorluk\":1,\"sure\":12,\"id\":\"IT Task 5\"},{\"zorluk\":1,\"sure\":4,\"id\":\"IT Task 6\"},{\"zorluk\":5,\"sure\":6,\"id\":\"IT Task 7\"},{\"zorluk\":3,\"sure\":8,\"id\":\"IT Task 8\"},{\"zorluk\":1,\"sure\":6,\"id\":\"IT Task 9\"},{\"zorluk\":2,\"sure\":10,\"id\":\"IT Task 10\"},{\"zorluk\":1,\"sure\":6,\"id\":\"IT Task 11\"},{\"zorluk\":4,\"sure\":11,\"id\":\"IT Task 12\"},{\"zorluk\":5,\"sure\":3,\"id\":\"IT Task 13\"},{\"zorluk\":1,\"sure\":11,\"id\":\"IT Task 14\"},{\"zorluk\":4,\"sure\":6,\"id\":\"IT Task 15\"},{\"zorluk\":5,\"sure\":4,\"id\":\"IT Task 16\"},{\"zorluk\":3,\"sure\":11,\"id\":\"IT Task 17\"},{\"zorluk\":2,\"sure\":11,\"id\":\"IT Task 18\"},{\"zorluk\":3,\"sure\":8,\"id\":\"IT Task 19\"},{\"zorluk\":3,\"sure\":11,\"id\":\"IT Task 20\"},{\"zorluk\":1,\"sure\":5,\"id\":\"IT Task 21\"},{\"zorluk\":4,\"sure\":5,\"id\":\"IT Task 22\"},{\"zorluk\":2,\"sure\":7,\"id\":\"IT Task 23\"},{\"zorluk\":2,\"sure\":6,\"id\":\"IT Task 24\"},{\"zorluk\":3,\"sure\":9,\"id\":\"IT Task 25\"},{\"zorluk\":4,\"sure\":6,\"id\":\"IT Task 26\"},{\"zorluk\":4,\"sure\":7,\"id\":\"IT Task 27\"},{\"zorluk\":1,\"sure\":4,\"id\":\"IT Task 28\"},{\"zorluk\":4,\"sure\":5,\"id\":\"IT Task 29\"},{\"zorluk\":5,\"sure\":9,\"id\":\"IT Task 30\"},{\"zorluk\":2,\"sure\":5,\"id\":\"IT Task 31\"},{\"zorluk\":2,\"sure\":5,\"id\":\"IT Task 32\"},{\"zorluk\":2,\"sure\":6,\"id\":\"IT Task 33\"},{\"zorluk\":5,\"sure\":6,\"id\":\"IT Task 34\"},{\"zorluk\":1,\"sure\":10,\"id\":\"IT Task 35\"},{\"zorluk\":1,\"sure\":10,\"id\":\"IT Task 36\"},{\"zorluk\":1,\"sure\":10,\"id\":\"IT Task 37\"},{\"zorluk\":5,\"sure\":12,\"id\":\"IT Task 38\"},{\"zorluk\":4,\"sure\":12,\"id\":\"IT Task 39\"},{\"zorluk\":2,\"sure\":6,\"id\":\"IT Task 40\"},{\"zorluk\":3,\"sure\":8,\"id\":\"IT Task 41\"},{\"zorluk\":5,\"sure\":10,\"id\":\"IT Task 42\"},{\"zorluk\":3,\"sure\":10,\"id\":\"IT Task 43\"},{\"zorluk\":5,\"sure\":8,\"id\":\"IT Task 44\"},{\"zorluk\":5,\"sure\":9,\"id\":\"IT Task 45\"},{\"zorluk\":3,\"sure\":3,\"id\":\"IT Task 46\"},{\"zorluk\":4,\"sure\":4,\"id\":\"IT Task 47\"},{\"zorluk\":1,\"sure\":12,\"id\":\"IT Task 48\"},{\"zorluk\":1,\"sure\":7,\"id\":\"IT Task 49\"},{\"zorluk\":1,\"sure\":4,\"id\":\"IT Task 50\"},{\"zorluk\":1,\"sure\":10,\"id\":\"IT Task 51\"},{\"zorluk\":4,\"sure\":8,\"id\":\"IT Task 52\"},{\"zorluk\":3,\"sure\":3,\"id\":\"IT Task 53\"},{\"zorluk\":4,\"sure\":10,\"id\":\"IT Task 54\"},{\"zorluk\":4,\"sure\":12,\"id\":\"IT Task 55\"},{\"zorluk\":3,\"sure\":10,\"id\":\"IT Task 56\"},{\"zorluk\":2,\"sure\":11,\"id\":\"IT Task 57\"},{\"zorluk\":1,\"sure\":7,\"id\":\"IT Task 58\"},{\"zorluk\":2,\"sure\":4,\"id\":\"IT Task 59\"},{\"zorluk\":3,\"sure\":4,\"id\":\"IT Task 60\"},{\"zorluk\":1,\"sure\":3,\"id\":\"IT Task 61\"},{\"zorluk\":1,\"sure\":6,\"id\":\"IT Task 62\"},{\"zorluk\":3,\"sure\":3,\"id\":\"IT Task 63\"},{\"zorluk\":4,\"sure\":12,\"id\":\"IT Task 64\"},{\"zorluk\":2,\"sure\":11,\"id\":\"IT Task 65\"},{\"zorluk\":3,\"sure\":10,\"id\":\"IT Task 66\"}]', true);\n $businessTasks = json_decode('[{\"Business Task 0\":{\"level\":1,\"estimated_duration\":7}},{\"Business Task 1\":{\"level\":3,\"estimated_duration\":4}},{\"Business Task 2\":{\"level\":1,\"estimated_duration\":6}},{\"Business Task 3\":{\"level\":5,\"estimated_duration\":4}},{\"Business Task 4\":{\"level\":2,\"estimated_duration\":7}},{\"Business Task 5\":{\"level\":5,\"estimated_duration\":7}},{\"Business Task 6\":{\"level\":4,\"estimated_duration\":5}},{\"Business Task 7\":{\"level\":2,\"estimated_duration\":11}},{\"Business Task 8\":{\"level\":4,\"estimated_duration\":12}},{\"Business Task 9\":{\"level\":1,\"estimated_duration\":4}},{\"Business Task 10\":{\"level\":2,\"estimated_duration\":7}},{\"Business Task 11\":{\"level\":4,\"estimated_duration\":3}},{\"Business Task 12\":{\"level\":3,\"estimated_duration\":10}},{\"Business Task 13\":{\"level\":1,\"estimated_duration\":3}},{\"Business Task 14\":{\"level\":2,\"estimated_duration\":10}},{\"Business Task 15\":{\"level\":2,\"estimated_duration\":12}},{\"Business Task 16\":{\"level\":3,\"estimated_duration\":9}},{\"Business Task 17\":{\"level\":4,\"estimated_duration\":9}},{\"Business Task 18\":{\"level\":1,\"estimated_duration\":7}},{\"Business Task 19\":{\"level\":4,\"estimated_duration\":4}},{\"Business Task 20\":{\"level\":5,\"estimated_duration\":4}},{\"Business Task 21\":{\"level\":4,\"estimated_duration\":4}},{\"Business Task 22\":{\"level\":2,\"estimated_duration\":5}},{\"Business Task 23\":{\"level\":5,\"estimated_duration\":9}},{\"Business Task 24\":{\"level\":5,\"estimated_duration\":12}},{\"Business Task 25\":{\"level\":3,\"estimated_duration\":9}},{\"Business Task 26\":{\"level\":2,\"estimated_duration\":12}},{\"Business Task 27\":{\"level\":3,\"estimated_duration\":9}},{\"Business Task 28\":{\"level\":1,\"estimated_duration\":7}},{\"Business Task 29\":{\"level\":4,\"estimated_duration\":4}},{\"Business Task 30\":{\"level\":4,\"estimated_duration\":4}},{\"Business Task 31\":{\"level\":1,\"estimated_duration\":7}},{\"Business Task 32\":{\"level\":4,\"estimated_duration\":7}},{\"Business Task 33\":{\"level\":3,\"estimated_duration\":9}},{\"Business Task 34\":{\"level\":2,\"estimated_duration\":9}},{\"Business Task 35\":{\"level\":1,\"estimated_duration\":9}},{\"Business Task 36\":{\"level\":5,\"estimated_duration\":3}},{\"Business Task 37\":{\"level\":4,\"estimated_duration\":5}},{\"Business Task 38\":{\"level\":1,\"estimated_duration\":9}},{\"Business Task 39\":{\"level\":5,\"estimated_duration\":7}},{\"Business Task 40\":{\"level\":1,\"estimated_duration\":6}},{\"Business Task 41\":{\"level\":1,\"estimated_duration\":5}},{\"Business Task 42\":{\"level\":5,\"estimated_duration\":9}},{\"Business Task 43\":{\"level\":1,\"estimated_duration\":9}},{\"Business Task 44\":{\"level\":5,\"estimated_duration\":8}},{\"Business Task 45\":{\"level\":5,\"estimated_duration\":8}},{\"Business Task 46\":{\"level\":1,\"estimated_duration\":9}},{\"Business Task 47\":{\"level\":1,\"estimated_duration\":12}},{\"Business Task 48\":{\"level\":1,\"estimated_duration\":3}},{\"Business Task 49\":{\"level\":5,\"estimated_duration\":7}},{\"Business Task 50\":{\"level\":5,\"estimated_duration\":12}},{\"Business Task 51\":{\"level\":1,\"estimated_duration\":11}},{\"Business Task 52\":{\"level\":3,\"estimated_duration\":7}},{\"Business Task 53\":{\"level\":1,\"estimated_duration\":3}},{\"Business Task 54\":{\"level\":4,\"estimated_duration\":10}},{\"Business Task 55\":{\"level\":2,\"estimated_duration\":11}},{\"Business Task 56\":{\"level\":4,\"estimated_duration\":9}},{\"Business Task 57\":{\"level\":3,\"estimated_duration\":7}},{\"Business Task 58\":{\"level\":2,\"estimated_duration\":4}},{\"Business Task 59\":{\"level\":4,\"estimated_duration\":9}},{\"Business Task 60\":{\"level\":2,\"estimated_duration\":10}},{\"Business Task 61\":{\"level\":3,\"estimated_duration\":8}},{\"Business Task 62\":{\"level\":1,\"estimated_duration\":10}},{\"Business Task 63\":{\"level\":4,\"estimated_duration\":11}},{\"Business Task 64\":{\"level\":4,\"estimated_duration\":5}},{\"Business Task 65\":{\"level\":3,\"estimated_duration\":9}},{\"Business Task 66\":{\"level\":1,\"estimated_duration\":3}}]', true);\n\n $taskList = [];\n foreach ($itTasks as $task) {\n $taskList[] = [\n 'time' => $task['sure'],\n 'difficulty' => $task['zorluk'],\n 'title' => $task['id'],\n 'type' => TaskType::it()->getValue(),\n ];\n }\n\n foreach ($businessTasks as $key => $task) {\n $title = key($task);\n $taskValues = $task[$title];\n\n $taskList[] = [\n 'time' => $taskValues['estimated_duration'],\n 'difficulty' => $taskValues['level'],\n 'title' => $title,\n 'type' => TaskType::business()->getValue(),\n ];\n }\n\n DB::table('tasks')->insert($taskList);\n }", "public function getTaskGroup() {}", "function get_task_list_entities(DatastoreClient $datastore)\n{\n // [START transactional_single_entity_group_read_only]\n $transaction = $datastore->transaction();\n $taskListKey = $datastore->key('TaskList', 'default');\n $query = $datastore->query()\n ->kind('Task')\n ->filter('__key__', Query::OP_HAS_ANCESTOR, $taskListKey);\n $result = $transaction->runQuery($query);\n $taskListEntities = [];\n /* @var Entity $task */\n foreach ($result as $task) {\n $taskListEntities[] = $task;\n }\n $transaction->commit();\n // [END transactional_single_entity_group_read_only]\n return $taskListEntities;\n}", "public function Tasks()\n {\n return Request::Request(\"/cluster/tasks\");\n }", "public function ids();", "public function retrieveAllIds();", "public function getTaskUid() {}", "public function getTasks()\n {\n return $this->postRequest('GetTasks');\n }", "public function deleteAllTask()\n {\n return $this->deleteAll();\n }", "public function task($id) {\n\t\t\n\t}", "public function getAllIds(): array;", "public function getTaskDefinitions()\n {\n return array(new Task($this));\n }", "protected function getJobIds()\n {\n $ids = (array) $this->input->getArgument('id');\n\n if (count($ids) === 1 && $ids[0] === 'all') {\n $ids = Arr::pluck($this->container['queue.failer']->all(), 'id');\n }\n\n return $ids;\n }", "public static function allIds()\n {\n return array_keys(self::_configById());\n }", "public function getTasks()\n {\n if (array_key_exists(\"tasks\", $this->_propDict)) {\n return $this->_propDict[\"tasks\"];\n } else {\n return null;\n }\n }", "public static function getTaskLocks() {\n $files = array();\n $tasks_lock_dir = APPPATH . 'tmp' . DS;\n $dh = opendir($tasks_lock_dir);\n while (false !== ($filename = readdir($dh))) {\n $is_task_temp_file = is_file($tasks_lock_dir . $filename) && \\Lib\\Str::startsWith($filename, 'tasks_');\n if (!$is_task_temp_file) {\n continue;\n }\n // Get first line\n $fp = fopen($tasks_lock_dir . $filename, 'r');\n $start_time = trim(fgets($fp));\n fclose($fp);\n if (is_numeric($start_time)) {\n $start_time = date('Y-m-d H:i', $start_time);\n }\n $files[] = $filename . ' - ' . $start_time;\n }\n return $files;\n }", "function getBrickIds() : array ;", "private function loadGetAndRunAllTasks()\r\n\t{\r\n\t\t$time = time();\r\n\t\t\r\n\t\t$this->loadWrite(\"Get all Tasks\");\r\n\t\t$this->loadWrite(\":CUT\");\r\n\t\t$Query = $this->DB->Query(\"SELECT * FROM {*TABLE*} WHERE Switch = 1 AND BeginDate <= {$time} AND (EndDate >= {$time} OR EndDate = 0)\", CTMEW_CORE, \"CTM_CronJob\", 1);\r\n\t\t\r\n\t\tif($Query)\r\n\t\t{\r\n\t\t\tif($this->DB->CountRows($Query) < 1)\r\n\t\t\t{\r\n\t\t\t\t$this->loadWrite(\"It has no Task\");\r\n\t\t\t\t$this->loadClose();\r\n\t\t\t\t\r\n\t\t\t\treturn NULL;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile($task = $this->DB->FetchObject($Query))\r\n\t\t\t{\r\n\t\t\t\t$this->loadWrite(\"Task found: \".$task->TaskName);\r\n\t\t\t\t$taskKey = md5($task->Id);\r\n\t\t\t\t\r\n\t\t\t\tif(time() >= $task->NextExecution)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(file_exists(CTM_ROOT_PATH.\"modules/tasks/\".$task->TaskFile.\".task.php\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->loadExecuteTask($taskKey, $task->TaskFile);\r\n\t\t\t\t\t\t$this->setNextExecution($task->Id, $taskKey, explode(\",\", $task->OccurOptions));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tswitch(self::$tasks[$taskKey]['result'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase \"success\" :\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\"Task executed with success!\", 1);\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\"Task executed in \".self::$tasks[$taskKey]['time'].\" seconds\");\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\":CUT\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"error\" :\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\"Error to execute the task\");\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\"Task executed in \".self::$tasks[$taskKey]['time'].\" seconds\");\r\n\t\t\t\t\t\t\t\t$this->loadWrite(\":CUT\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"break\" :\r\n\t\t\t\t\t\t\t\treturn $this->loadBreakCronJob();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->loadWrite(\"Task Script Error (404)\");\r\n\t\t\t\t\t\t$this->loadWrite(\":CUT\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->loadWrite(\"Task in scheduling\");\r\n\t\t\t\t\t$this->loadWrite(\":CUT\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->loadWrite(\"All CronTasks executed\");\r\n\t\t}\r\n\t}", "public function get_instance_tasks($poasassignmentid) {\r\n global $DB;\r\n return $DB->get_records('poasassignment_tasks', array('poasassignmentid' => $poasassignmentid), 'id', 'id, name');\r\n }", "public function get_allOpenWork(){ \n\n \t}", "public function get_allOpenWork(){ \n\n \t}", "public function getTasks()\n {\n return $this->_getAll($this->_taskUri, new TaskRowset());\n }" ]
[ "0.75046265", "0.7135574", "0.6684776", "0.66810715", "0.6501023", "0.64272505", "0.6411633", "0.63781965", "0.6373664", "0.6359191", "0.6357239", "0.63099176", "0.62904656", "0.6289212", "0.62667364", "0.62539506", "0.62539506", "0.62359846", "0.6235415", "0.62204635", "0.62147033", "0.62077427", "0.6198613", "0.61920065", "0.61885524", "0.61885524", "0.61862844", "0.61736184", "0.6166727", "0.615984", "0.6159018", "0.6159018", "0.6131306", "0.61311084", "0.6118628", "0.6085338", "0.60782194", "0.6064153", "0.6042055", "0.6035046", "0.6029674", "0.6020967", "0.59819686", "0.59784806", "0.59686077", "0.5961863", "0.59343785", "0.59274346", "0.59270537", "0.59228814", "0.59224474", "0.5911898", "0.5908653", "0.59032965", "0.58962184", "0.58807796", "0.58618784", "0.5861575", "0.585986", "0.58571255", "0.58563304", "0.5851656", "0.58460635", "0.58371156", "0.58363193", "0.5835299", "0.58350885", "0.58330286", "0.582659", "0.5823735", "0.58193594", "0.5809732", "0.5795959", "0.57957137", "0.579367", "0.57850975", "0.5776739", "0.5776357", "0.5737182", "0.57239753", "0.5723005", "0.57189745", "0.57168514", "0.5708184", "0.5705951", "0.5700374", "0.5698649", "0.5698311", "0.5688949", "0.5682573", "0.5674643", "0.56709695", "0.5669585", "0.5652741", "0.5634225", "0.562363", "0.56191015", "0.56091636", "0.56091636", "0.56028485" ]
0.79633963
0